Azure Data Factory Copy Activity fails to auto create table when copying from REST source to Azure SQL database
I am using a Copy Activity in Azure Data Factory. I have a REST source/data set created and a Azure SQL Database sink/data set created. I have the Copy Activity set to auto create and the table does not exist in the database before running the pipeline containing the Copy Activity. I have manually added the schema (dbo) and table name (user) in the sink data set and have Insert selected as the Write Behavior. I have not imported a schema on the Schema tab of this data set. I have also not entered any information in the Mapping tab on the Copy Activity. I have Interactive Authoring enabled because everything is in the cloud (no on prem).
When I run the pipeline with the Copy Activity, I receive the following error message after a couple of minutes:
Operation on target Create and Copy failed: Failure happened on 'Sink' side. ErrorCode=SqlOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A database operation failed. Please search error to get more details.,Source=Microsoft.DataTransfer.Connectors.MSSQL,''Type=System.InvalidOperationException,Message=Cannot access destination table '[dbo].[user]'.,Source=Microsoft.Data.SqlClient,''Type=Microsoft.Data.SqlClient.SqlException,Message=Invalid object name 'dbo.user'.,Source=Framework Microsoft SqlClient Data Provider,'
I am expecting auto create to create the table in the database when the pipeline runs. Instead I am receiving an error stating the table (that hasn't been added with auto create yet) cannot be accessed. It is as if the activity is expecting the table to already exist even though I have the activity set to auto create.
Please let me know if you need more information from me. Thank you!