Easy Rhino
Easy Rhino

Reputation: 83

ADF: How do I clear a table in SQL?

I have a pipeline that ingests data from Kusto, does some simple transformation, and flows the data to SQL. It will be run once per day, and needs to clear the sink tables in SQL. I thought this would be straightforward (and probably is) but I can't figure out how to do it. Thanks for any assistance!

Upvotes: 1

Views: 1799

Answers (2)

Being Real
Being Real

Reputation: 83

You have to write a stored procedure on prior to transformation, which can delete your staging data. Stored procedure->do transformation

Upvotes: 0

Joseph  Xu
Joseph Xu

Reputation: 6043

As @wBob said, if you are using Copy activity in ADF, we can enter TRUNCATE TABLE <your-table-name> at Pre-copy script. It will execute the T-SQL script here before copying.
enter image description here

Upvotes: 4

Related Questions