none
How to truncate all SQL tables prior to copy activities using Azure Data Factory v2?

    Întrebare

  • I am copying data from on-prem SQL Server to Azure SQL database using Azure Data Factory v2. Before the pipeline copy each table, I need to truncate each table. Is there a variable I can use instead of the table name? That way I can use the same query for each <g class="gr_ gr_481 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del" data-gr-id="481" id="481">dataflow</g>. Something like "Delete from Mytable".

    Thanks.

    joi, 24 mai 2018 12:30

Răspunsuri

  • You could use foreach + copy activity. Pass al table names to your foreach items. And then you could use expressions in preCopyScript like "Delete from @{item()}. Also in your copy activity input/output dataset, you could referece @item().
    joi, 24 mai 2018 13:34

Toate mesajele

  • You could use foreach + copy activity. Pass al table names to your foreach items. And then you could use expressions in preCopyScript like "Delete from @{item()}. Also in your copy activity input/output dataset, you could referece @item().
    joi, 24 mai 2018 13:34
  • Thanks for your help, Mike.

    Best Regards, GMVS

    miercuri, 11 iulie 2018 15:24