question

MichaelShparber-6569 avatar image
MichaelShparber-6569 asked ·

Create a target table on-the-fly in Data Factory

I am new to Data Factory.
I want to copy data from REST API into SQL Server tables.
Is there a way to automatically create SQL tables with data types based on the API calls?
I don't want to do this manually.
Thanks!

azure-data-factory
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ChiragMishra-MSFT avatar image
ChiragMishra-MSFT answered ·

Hi @MichaelShparber-6569,

You can Load data faster with new support from the Copy Activity feature of Azure Data Factory. Now, if you are trying to copy data from an any supported source into SQL database/data warehouse and find that the destination table does not exist, Copy Activity will create it automatically. After the data ingestion, review and adjust the sink table schema as needed.

This feature is supported with:

  • Azure SQL Database

  • Azure SQL Database Managed Instance

  • Azure SQL Data Warehouse

  • SQL Server

To automatically create a destination table, follow this path: ADF authoring UI > Copy activity sink > Table option > Auto create table. Or, click on the “tableOption” property in the Copy Activity sink payload. Please refer to the below screenshot for details :

10014-autocreate-table.jpg

Hope this helps. Stay safe !


Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MichaelShparber-6569 avatar image
MichaelShparber-6569 answered ·

Awesome! Thanks @ChiragMishraMSFT-1092


Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BobbyLansing-3640 avatar image
BobbyLansing-3640 answered ·

When adding a SQL database it requires a table to be selected. Even with "Auto create table" selected I don't see data coming into the selected table or a new table being created.

How do I ensure that this creates a new table the first time it is run?

Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.