1
votes

I'm facing an issue when running a U-SQL Script with Azure Data Factory V2.

This U-SQL Script work fine in the portal or vs :

 @a  = 
  SELECT * FROM 
    (VALUES
       ("Contoso",   1500.0, "2017-03-39"),
       ("Woodgrove", 2700.0, "2017-04-10")
    ) AS D( customer, amount );

@results =
  SELECT
    customer,
    amount
  FROM @a;    

OUTPUT @results
  TO "test"
  USING Outputters.Text();

But don't work when started in Azure Data Factory V2 Activity, bellow my ADF scripts.

Creating or updating linked service ADLA [adla] ...
{
  "properties": {
    "type": "AzureDataLakeAnalytics",
    "typeProperties": {
      "accountName": "adla",
      "servicePrincipalId": "ea4823f2-3b7a-4c-78d29cffa68b",
      "servicePrincipalKey": {
        "type": "SecureString",
        "value": "jKhyspEwMScDAGU0MO39FcAP9qQ="
      },
      "tenant": "41f06-8ca09e840041",
      "subscriptionId": "9cf053128b749",
      "resourceGroupName": "test"
    }
  }
}

Creating or updating linked service BLOB [BLOB] ...
{
  "properties": {
    "type": "AzureStorage",
    "typeProperties": {
      "connectionString": {
        "type": "SecureString",
        "value": "DefaultEndpointsProtocol=https;AccountName=totoblob;AccountKey=qZqpKyGtWMRXZO2CNLa0qTyvLTMko4lzfgsg07pjloIPGZtJel4qvRBkoVOA==;EndpointSuffix=core.windows.net"
      }
    }
  }
}

Creating or updating pipeline ADLAPipeline...
{
  "properties": {
    "activities": [
      {
        "type": "DataLakeAnalyticsU-SQL",
        "typeProperties": {
          "scriptPath": "src/test.usql",
          "scriptLinkedService": {
            "referenceName": "blob",
            "type": "LinkedServiceReference"
          },
          "degreeOfParallelism": 1
        },
        "linkedServiceName": {
          "referenceName": "adla",
          "type": "LinkedServiceReference"
        },
        "name": "Usql-toto"
      }
    ]
  }
}

1 - I checked the connection to the blob storage, the u-sql script is successfully found (if i rename it, it throw a not found error)

2 - I checked the connection to azure data lake analytics, it seems to connect, if i set a wrong credential it throw an other error

3 - When running the pipeline I Have the following error : "Activity Usql-toto failed: User is not able to access to datalake store" and actually I don't provide Data Lake Store Credential but there is a default datalake store account attached ADLAnalytics.

Any hint?

2

2 Answers

2
votes

Finally found help in this post: U-SQL Job Failing in Data Factory

Folders system and catalog doesn't inherit from parent permissions ... So I had to reassign permission on this two folders.

2
votes

I was also having this problem. What helped me was running the "Add User Wizard" from Data Lake Analytics. Using this wizard I added the service principal that I use in the linked service for Data Lake Analytics as an Owner with R+W permissions.

Before using the wizard, I tried to configure this manually by setting appropriate permissions from the Explore data screen, but that didn't resolve the problem. (SP was already contributor on the service)