Copy Activity failing

steve hawk 6 Reputation points
2020-08-12T18:24:00.007+00:00

Hi All i am new to ADF. I created a copy activity and it is dailing.
Source: ADL .csv file
Destination : SQLMI
My question is do i need to create a table , doesnt't COPY create it ?
Error Message
"errors": [
{
"Code": 11000,
"Message": "'Type=System.InvalidOperationException,Message=Cannot access destination table '[myschema].[REPORTS]'.,Source=System.Data,''Type=System.Data.SqlClient.SqlException,Message=Invalid object name 'Myschema.REPORTS'.,Source=.Net SqlClient Data Provider,SqlErrorNumber=208,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=208,State=1,Message=Invalid object name 'MYSCHEMA.REPORTS'.,},],'",
"EventType": 0,
"Category": 5,
"Data": {},
"MsgId": null,
"ExceptionType": null,
"Source": null,
"StackTrace": null,
"InnerEventInfos": []
}
],
Please need help

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,478 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,422 Reputation points Microsoft Employee
    2020-08-12T19:26:36.373+00:00

    Hi @steve hawk ,

    Welcome to Microsoft Q&A platform and thanks for using this forum.

    ADF Copy activity has Auto create table feature supported when copying data from any source into the following sink data stores.

    • Azure SQL Database
    • Azure SQL Database Managed Instance
    • Azure Synapse Analytics (formerly Azure SQL Data Warehouse)
    • SQL Server

    You can find the option on ADF authoring UI –> Copy activity sink –> Table option –> Auto create table

    17236-image.png

    Please enable Auto create table option in your Copy activity and rerun the pipeline. In case if you still encounter the issue even after enabling Auto create table option, please let us know.

    Note: Documentation for - ADF Copy activity Auto create sink tables

    ----------

    Thank you
    Please do consider to click on "Accept Answer" and "Upvote" on the post that helps you, as it can be beneficial to other community members.

    0 comments No comments

  2. steve hawk 6 Reputation points
    2020-08-12T19:45:44.177+00:00

    Thanks , i already did that. Please see the below screen shots, it still fails.
    17158-image.png

    17159-image.png


  3. Jeff Born (J&CLT-ATL) 96 Reputation points
    2021-10-06T15:43:15.773+00:00

    I am also experiencing this error while using a REST sink. Any suggestions on getting this to work would be great!

    Also when I manually mapped the columns the Copy activity worked. I was hoping for automagically mappings, but maybe with a REST source to a SQL Sink I have to map the columns?

    0 comments No comments