Transform data using Hadoop Pig activity in Azure Data Factory

APPLIES TO: Azure Data Factory Azure Synapse Analytics

The HDInsight Pig activity in a Data Factory pipeline executes Pig queries on your own or on-demand HDInsight cluster. This article builds on the data transformation activities article, which presents a general overview of data transformation and the supported transformation activities.

If you are new to Azure Data Factory, read through Introduction to Azure Data Factory and do the Tutorial: transform data before reading this article.


    "name": "Pig Activity",
    "description": "description",
    "type": "HDInsightPig",
    "linkedServiceName": {
        "referenceName": "MyHDInsightLinkedService",
        "type": "LinkedServiceReference"
    "typeProperties": {
        "scriptLinkedService": {
            "referenceName": "MyAzureStorageLinkedService",
            "type": "LinkedServiceReference"
        "scriptPath": "MyAzureStorage\\PigScripts\\MyPigSript.pig",
        "getDebugInfo": "Failure",
        "arguments": [
        "defines": {
            "param1": "param1Value"

Syntax details

Property Description Required
name Name of the activity Yes
description Text describing what the activity is used for No
type For Hive Activity, the activity type is HDinsightPig Yes
linkedServiceName Reference to the HDInsight cluster registered as a linked service in Data Factory. To learn about this linked service, see Compute linked services article. Yes
scriptLinkedService Reference to an Azure Storage Linked Service used to store the Pig script to be executed. Only Azure Blob Storage and ADLS Gen2 linked services are supported here. If you don't specify this Linked Service, the Azure Storage Linked Service defined in the HDInsight Linked Service is used. No
scriptPath Provide the path to the script file stored in the Azure Storage referred by scriptLinkedService. The file name is case-sensitive. No
getDebugInfo Specifies when the log files are copied to the Azure Storage used by HDInsight cluster (or) specified by scriptLinkedService. Allowed values: None, Always, or Failure. Default value: None. No
arguments Specifies an array of arguments for a Hadoop job. The arguments are passed as command-line arguments to each task. No
defines Specify parameters as key/value pairs for referencing within the Pig script. No

Next steps

See the following articles that explain how to transform data in other ways: