- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
copy activity - pre-copy script
hi,
In the pre-copy script box of the copy activity, I place this tsql statement but the pipeline gives this error.
any suggestions? thank you
my script:
error:
Message=A database operation failed with the following error: 'Incorrect syntax near 'csv'.',Source=,''Type=System.Data.SqlClient.SqlException,Message=Incorrect syntax near 'csv'
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@arkiboys Couple of things for which we need details :
1) what is the database (type) on which you are executing your pre copy script?
2) based on the expression :
@concat('delete from db_name.tbl_name where file_path = ', 'Source/mydata-new/mydata-03-May-2024.csv')
This seems to be pretty static, not sure why you used the concat here?
3. Also as stated by Nikhil, please provide the screenshot of the log of the Copy activity so we see what SQL command was generated and actually executed
----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@arkiboys Couple of things for which we need details :
1) what is the database (type) on which you are executing your pre copy script?
2) based on the expression :
@concat('delete from db_name.tbl_name where file_path = ', 'Source/mydata-new/mydata-03-May-2024.csv')
This seems to be pretty static, not sure why you used the concat here?
3. Also as stated by Nikhil, please provide the screenshot of the log of the Copy activity so we see what SQL command was generated and actually executed
----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @arkiboys
Thanks for using Fabric Community.
Can you please provide the screenshot of the pre copy script which you used in the pipeline?
Thanks

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
11-03-2024 05:19 AM | |||
10-18-2024 02:24 AM | |||
08-28-2024 03:58 PM | |||
02-20-2025 11:40 PM | |||
11-04-2024 01:13 AM |
User | Count |
---|---|
7 | |
6 | |
6 | |
3 | |
3 |