简体   繁体   中英

json webservice output to azure sql w/ credentials

An external data provider has provided an API that returns data in a json format.

In excel powerquery, I can connect to the dataset and get results in a table (not that it matters, but 20 columns and 1k rows).

I'd like to access this data as a table from a stored procedure in my azure SQL database.

If the web address is 'https://something.something.com/api/1' and my working login info: username: u password: p

What's the simplest way to write the results from the API call into a new table?

I'm challenged at even the first step: calling the data from SQLQuery. 'OPENROWSET' rowset provider is apparently not supported in this version of SQL Server (per an error message I received the SSMS query editor).

'OPENJSON' doesn't seem to have syntax related to passing a username and password to an API call.

I'd like to access this data as a table from a stored procedure in my azure SQL database.

Sorry, PaaS does not support calling API from Azure stored procedures (Azure SQL DB).

You can store JSON data through Stored Procedure in Azure SQL Database.

What's the simplest way to write the results from the API call into a new table?

To call the API to collect and load the data in Azure SQL Server, execute the Copy Data activity with a REST dataset.

  1. In data factory create linked list.
  2. Search for REST select REST.
  3. Configure linked service details.
  4. Configure dataset properties.
  5. Configure details for SQL database.
  6. Map the table and schema.

For more information you can refer this Document by @Rohit Vangala

Reference: Copy and transform data from and to a REST endpoint by using Azure Data Factory

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM