Can I import data pulled from an API into an Azure SQL Database?

Dean B 20 Reputation points
2025-04-07T14:23:59.0933333+00:00

Hi,

I have an API which can pull back log data. What I want is to ingest this data into a database every hour or so.

My current setup is using Power BI and Power Query. So my data is ingested and then I clean it up within Power Query before being ingested into Power BI and this works really well. Can I use Power Query too to clean up the data before being ingested in the database?

Azure SQL Database
{count} votes

Answer accepted by question author
  1. Sai Raghunadh M 4,570 Reputation points Microsoft External Staff Moderator
    2025-04-10T18:54:27.5966667+00:00

    Hi @ Dean B

    Yes, you can import data pulled from an API into an Azure SQL Database, and while Power Query isn’t designed to directly insert data into SQL databases, there are alternative ways to achieve this while still utilizing its transformation capabilities. Here’s how you can make it work:
    Azure Data Factory (ADF) integrates Power Query as a transformation tool.

    1. Set up a pipeline in ADF to connect to your API as the data source.
    2. Use the Power Query activity in the pipeline to clean and transform your data.
    3. Configure the pipeline to write the transformed data to your Azure SQL Database.
    4. You can schedule this pipeline to run every hour to automate the process.Hope this helps. Do let us know if you any further queries.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


1 additional answer

Sort by: Most helpful
  1. Nandan Hegde 36,716 Reputation points MVP Volunteer Moderator
    2025-04-12T03:51:37.37+00:00

    There are multiple ways how you can ingest data from an API into Azure SQL database:

    1. You can use the External API Rest end point functionality : https://devblogs.microsoft.com/azure-sql/azure-sql-database-external-rest-endpoints-integration-public-preview/

    wherein you can directly pull data from the API within Azure SQL database and do the necessary transformations within stored procedure

    1. In case if the need is to use ADF and power query only, then as stated above you can use power query transformations to achieve the same.
    2. In case if you have MSFT fabric, you can use dataflow Gen 2 to copy data from an API and do necessary transformations and load it into Azure SQL database

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.