Ziv
Ziv

Reputation: 85

Azure Data Explorer command activity in Azure Data Factory

I am trying to execute the below kusto command in Azure Data explorer command activity under Azure Data Factory. It does not like multiple commands. It runs fine with each command under each activity. Is it possible to write multiple commands under one ADX command activity? I can't find the documentation or find anyone doing this. Let me know please if you have any idea how to do that in a single activity.

.create table RawEvents (Event: dynamic)

.create table RawEvents ingestion json mapping 'RawEventMapping' '[{"column":"Event","Properties":{"path":"$"}}]'

.ingest into table RawEvents ('https://kustosamplefiles.blob.core.windows.net/jsonsamplefiles/simple.json') with '{"format":"json", "ingestionMappingReference":"RawEventMapping"}'

Upvotes: 2

Views: 510

Answers (2)

Vanessa
Vanessa

Reputation: 11

Use these parameters too because it will allow you to catch errors; otherwise ADF will always finish the task as successful, even if fails:

.execute database script with (ContinueOnErrors = false, ThrowOnErrors = true ) <|

Upvotes: 1

Yoni L.
Yoni L.

Reputation: 25955

You could use .execute database script: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/management/execute-database-script

Upvotes: 4

Related Questions