|
| 1 | +--- |
| 2 | +title: "Azure Data Lake Analytics Task | Microsoft Docs" |
| 3 | +ms.custom: "" |
| 4 | +ms.date: "05/18/2018" |
| 5 | +ms.prod: sql |
| 6 | +ms.prod_service: "integration-services" |
| 7 | +ms.component: "control-flow" |
| 8 | +ms.reviewer: "" |
| 9 | +ms.suite: "sql" |
| 10 | +ms.technology: |
| 11 | + - "integration-services" |
| 12 | +ms.tgt_pltfrm: "" |
| 13 | +ms.topic: conceptual |
| 14 | +f1_keywords: |
| 15 | + - "SQL13.DTS.DESIGNER.AFPADLSTASK.F1" |
| 16 | + - "SQL14.DTS.DESIGNER.AFPADLSTASK.F1" |
| 17 | +author: "yanancai" |
| 18 | +ms.author: "yanacai" |
| 19 | +ms.reviewer: "douglasl" |
| 20 | +manager: craigg |
| 21 | +--- |
| 22 | + |
| 23 | +# Azure Data Lake Analytics Task |
| 24 | + |
| 25 | +The Azure Data Lake Analytics Task lets users submit U-SQL jobs to Azure Data Lake Analytics service. [Azure Data Lake Analytics (ADLA)](https://azure.microsoft.com/services/data-lake-analytics/). |
| 26 | + |
| 27 | +The Azure Data Lake Analytics Task is a component of the [SQL Server Integration Services (SSIS) Feature Pack for Azure](../../integration-services/azure-feature-pack-for-integration-services-ssis.md). |
| 28 | + |
| 29 | +## Configure the Azure Data Lake Analytics Task |
| 30 | + |
| 31 | +To add an Azure Data Lake Analytics Task to a package, drag it from SSIS Toolbox to the designer canvas. Then double-click the task, or right-click the task and select **Edit**, to open the **Azure Data Lake Analytics Task Editor** dialog box. You can set properties through SSIS Designer or programmatically. |
| 32 | + |
| 33 | +## General Page Configuration |
| 34 | + |
| 35 | +Use the **General** page to configure the Azure Data Lake Analytics Task and provide the U-SQL script that the task submits. To learn more about the U-SQL language, see [U-SQL Language Reference](https://msdn.microsoft.com/azure/data-lake-analytics/u-sql/u-sql-language-reference). |
| 36 | + |
| 37 | +### Basic Configuration |
| 38 | + |
| 39 | +- **Name:** Specifies the name of the Azure Data Lake Analytics task. |
| 40 | +- **Description:** Specifies the description of the Azure Data Lake Analytics task. |
| 41 | + |
| 42 | +### U-SQL Configuration |
| 43 | + |
| 44 | +U-SQL configuration has two settings: **SourceType** and dynamic options based on **SourceType** value. |
| 45 | + |
| 46 | +- **SourceType:** Specifies the source of the U-SQL script. The script will be submitted to an Azure Data Lake Analytics account during SSIS package execution. This property has 3 options listed in the following table. |
| 47 | + |
| 48 | +|Value|Description| |
| 49 | +|-----------|-----------------| |
| 50 | +|**DirectInput**|Specifies the U-SQL script through the inline editor. Selecting this value displays the dynamic option, **USQLStatement**.| |
| 51 | +|**FileConnection**|Specifies a local .usql file that contains the U-SQL script. Selecting this option displays the dynamic option, **FileConnection**.| |
| 52 | +|**Variable**|Specifies an SSIS variable that contains the U-SQL script. Selecting this value displays the dynamic option, **SourceVariable**.| |
| 53 | + |
| 54 | +- **SourceType Dynamic Options:** Specifies the script content for the U-SQL query. |
| 55 | + |
| 56 | +|SourceType|Dynamic Options| |
| 57 | +|-----------|-----------------| |
| 58 | +|**SourceType = DirectInput**|Type the U-SQL query to be submitted in the option box directly, or click the browse button (...) to type the U-SQL query in the **Enter U-SQL Query** dialog box.| |
| 59 | +|**SourceType = FileConnection**|Select an existing file connection manager, or click <**New connection...**> to create a new file connection. **Related Article:** [File Connection Manager](../../integration-services/connection-manager/file-connection-manager.md), [File Connection Manager Editor](../../integration-services/connection-manager/file-connection-manager-editor.md)| |
| 60 | +|**SourceType = Variable**|Select an existing variable, or click \<**New variable...**> to create a new variable. **Related Article:** [Integration Services (SSIS) Variables](../../integration-services/integration-services-ssis-variables.md), [Add Variable](http://msdn.microsoft.com/library/d09b5d31-433f-4f7c-8c68-9df3a97785d5)| |
| 61 | + |
| 62 | + |
| 63 | +### Job Configuration |
| 64 | +Job configuration specifies U-SQL job submission properties. |
| 65 | + |
| 66 | +- **AzureDataLakeAnalyticsConnection:** Specifies the Azure Data Lake Analytics account where the U-SQL script will be submitted. Choose the connection from a list of defined connection managers. To create a new connection, select <**New connection**>. Related article: [Azure Data Lake Analytics Connection Manager](../../integration-services/connection-manager/azure-data-lake-analytics-connection-manager.md). |
| 67 | + |
| 68 | +- **JobName:** Specifies the name of the U-SQL job. |
| 69 | +- **AnalyticsUnits:** Specifies the Analytics Unit count of the U-SQL job. |
| 70 | +- **Priority:** Specifies the Priority of the U-SQL job. Priority can be set from 0 to 1000, the lower the number, the higher the priority. |
| 71 | +- **RuntimeVersion:** Specifies the Azure Data Lake Analytics runtime version of the U-SQL job. It is set to "default" by default. Usually you don't need to change this property. |
| 72 | +- **Synchronous:** A Boolean value specifies if the task waits the job execution completes or not. Set to Ture, the task will be marked as succeed after job completes. Set to False, the task will be marked as succeed after job passes the Preparation phase. |
| 73 | + |
| 74 | +|Value|Description| |
| 75 | +|-----------|-----------------| |
| 76 | +|True|The task result is based on the U-SQL job execution result. Job succeeds --> Task succeeds; Job fails --> Task fails; Task succeeds or fails --> Task completes.| |
| 77 | +|False|The task result is based on the U-SQL job submission and preparation result. Job submission succeeds and passes the Preparation phase --> Task succeeds; Job submission fails or job fails at the Preparation phase --> Task fails; Task succeeds or fails --> Task completes.| |
| 78 | + |
| 79 | +- **TimeOut:** Specifies a time-out time in seconds for job execution. The job will be cancelled and the task will be marked as failed after the job is time-out. TimeOut property is not available if Synchronous is set to False. TimeOut property is not available if **Synchronous** is set to **false**. |
| 80 | + |
| 81 | +## Parameter Mapping Page Configuration |
| 82 | + |
| 83 | +Use the **Parameter Mapping** page of the **Azure Data Lake Analytics Task Editor** dialog box to map variables to parameters(U-SQL variables) in U-SQL script. |
| 84 | + |
| 85 | +- **Variable Name:** After you have added a parameter mapping by clicking **Add**, select a system or user-defined variable from the list or click \<**New variable...**> to add a new variable by using the **Add Variable** dialog box. **Related Topics:** [Integration Services (SSIS) Variables](../../integration-services/integration-services-ssis-variables.md) |
| 86 | + |
| 87 | +- **Parameter Name:** Provide a parameter/variable name in U-SQL script. Make sure the the parameter name starts with the @ sign, like @Param1. |
| 88 | + |
| 89 | +Here is an example of how to pass parameters to U-SQL script. |
| 90 | + |
| 91 | +**Sample U-SQL script** |
| 92 | +``` |
| 93 | +@searchlog = |
| 94 | + EXTRACT UserId int, |
| 95 | + Start DateTime, |
| 96 | + Region string, |
| 97 | + Query string, |
| 98 | + Duration int, |
| 99 | + Urls string, |
| 100 | + ClickedUrls string |
| 101 | + FROM @in |
| 102 | + USING Extractors.Tsv(nullEscape:"#NULL#"); |
| 103 | +
|
| 104 | +@rs1 = |
| 105 | + SELECT Start, Region, Duration |
| 106 | + FROM @searchlog |
| 107 | +WHERE Region == "en-gb"; |
| 108 | +
|
| 109 | +@rs1 = |
| 110 | + SELECT Start, Region, Duration |
| 111 | + FROM @rs1 |
| 112 | + WHERE Start <= DateTime.Parse("2012/02/19"); |
| 113 | +
|
| 114 | +OUTPUT @rs1 |
| 115 | + TO @out |
| 116 | + USING Outputters.Tsv(quoting:false, dateTimeFormat:null); |
| 117 | +``` |
| 118 | + |
| 119 | +In above script example, the input and output paths are defined in **@in** and **@out** parameters. The values for **@in** and **@out** parameters in the U-SQL script are passed dynamically by Parameter Mapping configuration. |
| 120 | + |
| 121 | +|Variable Name|Parameter Name| |
| 122 | +|-------------|--------------| |
| 123 | +|User: Variable1|@in| |
| 124 | +|User: Variable2|@out| |
| 125 | + |
| 126 | +## Expression Page Configuration |
| 127 | + |
| 128 | +All properties in General page configuration can be assigned as a property expression to enable dynamic update of the property at run time. **Related Topics:** [Use Property Expressions in Packages](../../integration-services/expressions/use-property-expressions-in-packages.md) |
| 129 | + |
| 130 | +## See Also |
| 131 | +- [Azure Data Lake Analytics Connection Manager](../../integration-services/connection-manager/azure-data-lake-analytics-connection-manager.md) |
| 132 | +- [Azure Data Lake Store File System Task](../../integration-services/control-flow/azure-data-lake-store-file-system-task.md) |
| 133 | +- [Azure Data Lake Store Connection Manager](../../integration-services/connection-manager/azure-data-lake-store-connection-manager.md) |
| 134 | + |
0 commit comments