Just Shipped: Use Azure Data Factory command activity to run Azure Data Explorer control commands

Published Sep 22 2019 01:18 AM 3,460 Views

Azure Data Factory (ADF) is a cloud-based data integration service that allows you to perform a combination of activities on the data. Use ADF to create data-driven workflows for orchestrating and automating data movement and data transformation. The Azure Data Explorer Command activity in Azure Data Factory enables you to run Azure Data Explorer control commands within an ADF workflow. This article teaches you how to create a pipeline with a lookup activity and ForEach activity containing an Azure Data Explorer command activity.

Control commands are requests to Kusto to process and potentially modify data or metadata. For example, the following control command creates a new Kusto table with two columns, Level and Text:

 

 

.create table Logs (Level:string, Text:string)

 

 

 

adx-command-activity.png

The command activity has the following limits:

  • Size limit: 1 MB response size
  • Time limit: 20 minutes (default), 1 hour (maximum).
  • If needed, you can append a query to the result using AdminThenQuery, to reduce resulting size/time.

 

For more information regarding how to use ADX command read:  Use Azure Data Factory to run Azure Data Explorer Command 

 

Learn more about Azure Data Explorer (Kusto):

  1. Azure Data Explorer
  2. Documentation
  3. Course – Basics of KQL
  4. Query explorer
  5. Azure Portal
  6. User Voice
  7. Cost Estimator
  8. ADX End to End Lab

Join us to share questions, thoughts, or ideas about Azure Data Explorer (Kusto) and receive answers from the diverse and knowledgeable Azure Data Explorer community.

 

Azure Data Explorer product team

“Join the conversation on the Azure Data Explorer community”.

%3CLINGO-SUB%20id%3D%22lingo-sub-869089%22%20slang%3D%22en-US%22%3EJust%20Shipped%3A%20Use%20Azure%20Data%20Factory%20command%20activity%20to%20run%20Azure%20Data%20Explorer%20control%20commands%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-869089%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdata-factory%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%20data-linktype%3D%22absolute-path%22%3EAzure%20Data%20Factory%3C%2FA%3E%3CSPAN%3E%26nbsp%3B(ADF)%20is%20a%20cloud-based%20data%20integration%20service%20that%20allows%20you%20to%20perform%20a%20combination%20of%20activities%20on%20the%20data.%20Use%20ADF%20to%20create%20data-driven%20workflows%20for%20orchestrating%20and%20automating%20data%20movement%20and%20data%20transformation.%20The%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAzure%20Data%20Explorer%20Command%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Bactivity%20in%20Azure%20Data%20Factory%20enables%20you%20to%20run%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fkusto%2Fconcepts%2F%23control-commands%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%20data-linktype%3D%22absolute-path%22%3EAzure%20Data%20Explorer%20control%20commands%3C%2FA%3E%3CSPAN%3E%26nbsp%3Bwithin%20an%20ADF%20workflow.%20This%20article%20teaches%20you%20how%20to%20create%20a%20pipeline%20with%20a%20lookup%20activity%20and%20ForEach%20activity%20containing%20an%20Azure%20Data%20Explorer%20command%20activity.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EControl%20commands%20are%20requests%20to%20Kusto%20to%20process%20and%20potentially%20modify%20data%20or%20metadata.%20For%20example%2C%20the%20following%20control%20command%20creates%20a%20new%20Kusto%20table%20with%20two%20columns%2C%26nbsp%3B%3CCODE%3ELevel%3C%2FCODE%3E%26nbsp%3Band%26nbsp%3B%3CCODE%3EText%3C%2FCODE%3E%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E.create%20table%20Logs%20(Level%3Astring%2C%20Text%3Astring)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20894px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F132993iFB426D5105E98615%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22adx-command-activity.png%22%20title%3D%22adx-command-activity.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThe%20command%20activity%20has%20the%20following%20limits%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ESize%20limit%3A%201%20MB%20response%20size%3C%2FLI%3E%0A%3CLI%3ETime%20limit%3A%2020%20minutes%20(default)%2C%201%20hour%20(maximum).%3C%2FLI%3E%0A%3CLI%3EIf%20needed%2C%20you%20can%20append%20a%20query%20to%20the%20result%20using%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fkusto%2Fmanagement%2Findex%23combining-queries-and-control-commands%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%20data-linktype%3D%22absolute-path%22%3EAdminThenQuery%3C%2FA%3E%2C%20to%20reduce%20resulting%20size%2Ftime.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20more%20information%20regarding%20how%20to%20use%20ADX%20command%20read%3A%26nbsp%3B%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdata-explorer%2Fdata-factory-command-activity%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EUse%20Azure%20Data%20Factory%20to%20run%20Azure%20Data%20Explorer%20Command%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELearn%20more%20about%20Azure%26nbsp%3BData%20Explorer%20(Kusto)%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CU%3E%3CA%20tabindex%3D%22-1%22%20title%3D%22https%3A%2F%2Femea01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253a%252f%252fazure.microsoft.com%252fen-us%252fservices%252fdata-explorer%252f%26amp%3Bdata%3D02%257c01%257ctzgitlin%2540microsoft.com%257c33b94d34a7284713b30108d68cecb3ce%257c72f988bf86f141af91ab2d7cd011db47%257c1%257c0%257c636851345592939394%26amp%3Bsdata%3Dvgtfwifedpsnuqd4tclyljcmmq3cw%252fea7coupv%252fdoiw%253d%26amp%3Breserved%3D0%22%20href%3D%22https%3A%2F%2Femea01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fazure.microsoft.com%252Fen-us%252Fservices%252Fdata-explorer%252F%26amp%3Bdata%3D02%257C01%257Ctzgitlin%2540microsoft.com%257C33b94d34a7284713b30108d68cecb3ce%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C636851345592939394%26amp%3Bsdata%3DVgtfwIFedpSnuQd4TClYLJCmmQ3CW%252FeA7coUPv%252FDOiw%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noreferrer%20noopener%20nofollow%22%3EAzure%20Data%20Explorer%3C%2FA%3E%3C%2FU%3E%3C%2FLI%3E%0A%3CLI%3E%3CU%3E%3CA%20tabindex%3D%22-1%22%20title%3D%22https%3A%2F%2Femea01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253a%252f%252fdocs.microsoft.com%252fen-us%252fazure%252fdata-explorer%252f%26amp%3Bdata%3D02%257c01%257ctzgitlin%2540microsoft.com%257c33b94d34a7284713b30108d68cecb3ce%257c72f988bf86f141af91ab2d7cd011db47%257c1%257c0%257c636851345592949402%26amp%3Bsdata%3D1z9id3dkxvfw8sdd3m6syagfpt83lcwckxkktvpppbi%253d%26amp%3Breserved%3D0%22%20href%3D%22https%3A%2F%2Femea01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fdocs.microsoft.com%252Fen-us%252Fazure%252Fdata-explorer%252F%26amp%3Bdata%3D02%257C01%257Ctzgitlin%2540microsoft.com%257C33b94d34a7284713b30108d68cecb3ce%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C636851345592949402%26amp%3Bsdata%3D1Z9Id3dkxVfW8sDD3M6syagFpT83LCwCKxkKTvPppbI%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noreferrer%20noopener%20nofollow%22%3EDocumentation%3C%2FA%3E%3C%2FU%3E%3C%2FLI%3E%0A%3CLI%3E%3CU%3E%3CA%20tabindex%3D%22-1%22%20title%3D%22https%3A%2F%2Femea01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253a%252f%252fwww.pluralsight.com%252fcourses%252fkusto-query-language-kql-from-scratch%26amp%3Bdata%3D02%257c01%257ctzgitlin%2540microsoft.com%257c33b94d34a7284713b30108d68cecb3ce%257c72f988bf86f141af91ab2d7cd011db47%257c1%257c0%257c636851345592959411%26amp%3Bsdata%3Dlkjftf%252fazzi0nnn4jg2pcpfzflyxugj%252f2%252f%252fqksysedc%253d%26amp%3Breserved%3D0%22%20href%3D%22https%3A%2F%2Femea01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fwww.pluralsight.com%252Fcourses%252Fkusto-query-language-kql-from-scratch%26amp%3Bdata%3D02%257C01%257Ctzgitlin%2540microsoft.com%257C33b94d34a7284713b30108d68cecb3ce%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C636851345592959411%26amp%3Bsdata%3DlkjFtf%252FAzzi0nnn4jg2pCpfZfLYXugJ%252F2%252F%252FqksySeDc%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noreferrer%20noopener%20nofollow%22%3ECourse%20%E2%80%93%20Basics%20of%20KQL%3C%2FA%3E%3C%2FU%3E%3C%2FLI%3E%0A%3CLI%3E%3CU%3E%3CA%20tabindex%3D%22-1%22%20title%3D%22http%3A%2F%2Faka.ms%2Fnkwe%22%20href%3D%22http%3A%2F%2Faka.ms%2Fnkwe%22%20target%3D%22_blank%22%20rel%3D%22noreferrer%20noopener%22%3EQuery%20explorer%3C%2FA%3E%3C%2FU%3E%3C%2FLI%3E%0A%3CLI%3E%3CU%3E%3CA%20tabindex%3D%22-1%22%20title%3D%22http%3A%2F%2Faka.ms%2Fazureportal%22%20href%3D%22http%3A%2F%2Faka.ms%2Fazureportal%22%20target%3D%22_blank%22%20rel%3D%22noreferrer%20noopener%22%3EAzure%20Portal%3C%2FA%3E%3C%2FU%3E%3C%2FLI%3E%0A%3CLI%3E%3CU%3E%3CA%20tabindex%3D%22-1%22%20title%3D%22https%3A%2F%2Femea01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253a%252f%252ffeedback.azure.com%252fforums%252f915733-azure-data-explorer%26amp%3Bdata%3D02%257c01%257ctzgitlin%2540microsoft.com%257c33b94d34a7284713b30108d68cecb3ce%257c72f988bf86f141af91ab2d7cd011db47%257c1%257c0%257c636851345592959411%26amp%3Bsdata%3Dwrs2tfgokomhqyigu6dsruy93jdtzduzur6xxw7e0so%253d%26amp%3Breserved%3D0%22%20href%3D%22https%3A%2F%2Femea01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Ffeedback.azure.com%252Fforums%252F915733-azure-data-explorer%26amp%3Bdata%3D02%257C01%257Ctzgitlin%2540microsoft.com%257C33b94d34a7284713b30108d68cecb3ce%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C636851345592959411%26amp%3Bsdata%3DWRs2tFgokomhQyIgu6dsRuy93JDtzDuzur6xXw7e0so%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noreferrer%20noopener%20nofollow%22%3EUser%20Voice%3C%2FA%3E%3C%2FU%3E%3C%2FLI%3E%0A%3CLI%3E%3CU%3E%3CA%20tabindex%3D%22-1%22%20title%3D%22http%3A%2F%2Faka.ms%2Fadx.cost%22%20href%3D%22http%3A%2F%2Faka.ms%2Fadx.cost%22%20target%3D%22_blank%22%20rel%3D%22noreferrer%20noopener%22%3ECost%20Estimator%3C%2FA%3E%3C%2FU%3E%3C%2FLI%3E%0A%3CLI%3E%3CU%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FSpektraSystems%2FAzure-Data-Explorer-Labs%2Fblob%2Fmaster%2FHands-on%2520lab%2FHOL-step-by%2520step.md%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EADX%20End%20to%20End%20Lab%3C%2FA%3E%20%3C%2FU%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%3EJoin%20us%20to%20share%20questions%2C%20thoughts%2C%20or%20ideas%20about%20Azure%20Data%20Explorer%20(Kusto)%20and%20receive%20answers%20from%20the%20diverse%20and%20knowledgeable%20Azure%20Data%20Explorer%20community.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAzure%20Data%20Explorer%20product%20team%3C%2FP%3E%0A%3CP%3E%3CI%3E%3CSPAN%3E%E2%80%9CJoin%20the%20conversation%20on%20the%26nbsp%3B%3CU%3E%3CA%20tabindex%3D%22-1%22%20title%3D%22https%3A%2F%2Femea01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253a%252f%252ftechcommunity.microsoft.com%252ft5%252fazure-data-explorer%252fbd-p%252fkusto%26amp%3Bdata%3D02%257c01%257ctzgitlin%2540microsoft.com%257c9f50757c112e45322d5608d697587c18%257c72f988bf86f141af91ab2d7cd011db47%257c1%257c0%257c636862803655308273%26amp%3Bsdata%3Dsuximqlw7qkiszszyjhw9sp4vx1calrcps4p2htneii%253d%26amp%3Breserved%3D0%22%20href%3D%22https%3A%2F%2Femea01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Ftechcommunity.microsoft.com%252Ft5%252FAzure-Data-Explorer%252Fbd-p%252FKusto%26amp%3Bdata%3D02%257C01%257Ctzgitlin%2540microsoft.com%257C9f50757c112e45322d5608d697587c18%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C636862803655308273%26amp%3Bsdata%3DSuximQlW7qkiSzSZyJHW9SP4vX1calRCPs4P2HTneII%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noreferrer%20noopener%20nofollow%22%3EAzure%20Data%20Explorer%20community%3C%2FA%3E%3C%2FU%3E%E2%80%9D.%3C%2FSPAN%3E%3C%2FI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-869089%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EThe%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAzure%20Data%20Explorer%20Command%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Bactivity%20in%20Azure%20Data%20Factory%20enables%20you%20to%20run%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fkusto%2Fconcepts%2F%23control-commands%22%20data-linktype%3D%22absolute-path%22%20rel%3D%22noopener%20noreferrer%22%20target%3D%22_blank%22%3EAzure%20Data%20Explorer%20control%20commands%3C%2FA%3E%3CSPAN%3E%26nbsp%3Bwithin%20an%20ADF%20workflow.%20This%20article%20teaches%20you%20how%20to%20create%20a%20pipeline%20with%20a%20lookup%20activity%20and%20ForEach%20activity%20containing%20an%20Azure%20Data%20Explorer%20command%20activity.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20894px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F132992i590224F77B70D048%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22adx-command-activity.png%22%20title%3D%22adx-command-activity.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Version history
Last update:
‎Sep 22 2019 01:18 AM
Updated by: