locked
parameter RRS feed

  • Question

  • HI,

    I've a problem with the  passing paramters. What is wrong with this?

    "file": "$$Text.Format('wasb://lab@adfhennie.blob.core.windows.net/{0:yyyy}/{1:MM}/{1:dd}.txt', SliceStart, SliceStart)"

    Should i do this:

    "file": "$$Text.Format('wasb://lab@adfhennie.blob.core.windows.net/{0:yyyy}/{0:MM}/{0:dd}.txt', SliceStart)"

    Some times i See multiple SliceStarts in the Text.Format. Why is that? Why not one parameter

    and does 0: and 1: reference the parameters?

    • Edited by Hennie7863 Monday, February 26, 2018 10:39 AM
    Sunday, February 25, 2018 10:32 AM

All replies

  • it keeps saying:

    Blob 'https://adfhennie.blob.core.windows.net/lab/2016/06/' does not exist.

    Sunday, February 25, 2018 10:34 AM
  • I think that the errror is in the dataset defintion

    "linkedServiceName": "lsBlobStorage",
        "typeProperties": {
          "folderPath": "lab/{Year}/{Month}",
          "fileName": "{Day}.txt",
          "format": {
            "type": "TextFormat",
            "columnDelimiter": "\t",
            "firstRowAsHeader": true
          },
          "partitionedBy": [
            {
              "name": "Year",
              "value": {
                "type": "DateTime",
                "date": "SliceStart",
                "format": "yyyy"
              }
            },
            {
              "name": "Month",
              "value": {
                "type": "DateTime",
                "date": "SliceStart",
                "format": "MM"
              }
            },
            {
              "name": "Day",
              "value": {
                "type": "DateTime",
                "date": "SliceStart",
                "format": "dd"
              }
            }

    The string is not finished? It doesn't recognize the day part?

    Monday, February 26, 2018 10:37 AM
  • If I hardcode "fileName": "{Day}.txt" into "fileName": "05.txt" it works
    Monday, February 26, 2018 3:57 PM
  • I believe your code is correct.  It matches what I have in a working ADFv1 pipeline.  From memory, I think if you run the Pipeline as a one-time only it doesn't pick up the time slice correctly?  I remember having the same issue but don't quite remember exactly what it was, sorry.  I believe once I scheduled the pipeline to run daily (or minute) it started to work correctly.  Try scheduling it for a day in the past and it should start firing right away.

    Working for me:

    "typeProperties": {
    "fileName": "{Year}{Month}{Day}_{Hour}{Minute}_File.csv",
    "folderPath": "Structure/{Year}/{Month}",
    "format": {
    "type": "TextFormat",
    "columnDelimiter": ",",
    "quoteChar": "\"",
    "firstRowAsHeader": true
    },
    "partitionedBy": [
    {
    "name": "Year",
    "value": {
    "type": "DateTime",
    "date": "SliceStart",
    "format": "yyyy"
    }
    },
    {
    "name": "Month",
    "value": {
    "type": "DateTime",
    "date": "SliceStart",
    "format": "MM"
    }
    },
    {
    "name": "Day",
    "value": {
    "type": "DateTime",
    "date": "SliceStart",
    "format": "dd"
    }
    },
    {
    "name": "Hour",
    "value": {
    "type": "DateTime",
    "date": "SliceStart",
    "format": "HH"
    }
    },
    {
    "name": "Minute",
    "value": {
    "type": "DateTime",
    "date": "SliceStart",
    "format": "mm"
    }
    }
    ]
    },

    Monday, February 26, 2018 5:25 PM