question

AshishPal-9153 avatar image
0 Votes"
AshishPal-9153 asked ShaikMaheer-MSFT commented

How to save the script activity output in csv file from Data Factory

Hi All,

I have requirement like once Run the script activity it will return some result set and now i want to store that result set into csv file in blob storage.

For. E.g:- I run the sql script against Snowflake DB and I successfully get result that i want . The out put of the script is with 11 column and 11 rows.

But now i want to store the same result set in csv file in blob storage.

So can anyone have any idea which activity i have to use after script activity for copying the data in blob storage. And how I pass the script activity output into another activity for store the result set.

Regards
Ashish Pal

azure-data-factory
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AshishPal-9153 ,

Just checking in to see if the below answer helped. If this answers your query, do click 130616-image.png and upvote 130671-image.png for the same. And, if you have any further query do let us know.

0 Votes 0 ·

1 Answer

NandanHegde-7720 avatar image
1 Vote"
NandanHegde-7720 answered AshishPal-9153 commented

Hey,
Any reason why you want to use script activity?
You can use Copy activity with the source as the query and sink as the blob storage.
Thanks!

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

because we creating view in snowflake on the fly. that's why we use script activity in which we write sql statement with create view statement

0 Votes 0 ·

Hey,
You can create the view via the script activity and then leverage that view name in copy activity Select query

198730-image.png


1 Vote 1 ·
image.png (55.3 KiB)