Search code examples
azure-data-factorydataflowdata-wrangling

Azure Data Factory: Dataset Dynamic DB Table name not resolving in Data Wrangling Flow


I created a DataSet which points to a table in my database. The name of the table is set as dynamic content: @concat(dataset().db_prefix, '_Baseline_CIs'). This works when checking in the Dataset through 'Preview Data'. The table contents are shown.

BUT: When using the dataset in the Data Warngling Flow, the M-query fails with the following error:

Expression.Error: The key didn't match any rows in the table.
AdfDoc = Sql.Database("oedudigital.database.windows.net", "IntegratedEnvironments"),
  InputTable = AdfDoc{[Schema = "dbo", Item = "undefined"]}[Data]

As you can see, the table name concatenation has returned 'undefined'. Is this a bug?

BR, Denis


Solution

  • If I understand it right you have the DataSet which is parameter , at least that was the case on my side . Under the AdFResouce you will see the dataset name . You will have to pass the table name as

    AdfDoc{[Schema = "dbo", Item = "TableName"]}[Data] and then it will bring in the records .

    enter image description here