none
Error in data type for 'structure' in Azure SQL DW

    Question

  • Using ADF v2, I have dataset, which is an Azure SQL DW.

    The dataset is to get the Schema (or 'structure', as it is in json file, but Schema in the UI) from a Lookup activity. So the expression looks like this:

       @{json(activity('Column structure').output.firstRow.JsonString)}

    When I run it, I get an error: "The value of property 'structure' is in unexpected type 'IList`1'."

    I have checked that activity('Column structure').output.firstRow.JsonString returns a valid json string, and if I substitute this part of the expression with the actual json string instead of the expression, it works fine. 

    Where does it turn the result into an IList - where is my problem?

    Thanks!

    Friday, April 20, 2018 8:50 AM

Answers

  • The problem is the wrapping with @{...} gives problems in this case, probably due to the use of apostrophe inside the expression.

    Instead, it will work when doing it like this:

       @json(activity('Column structure').output.firstRow.JsonString)

    • Marked as answer by Anders V Friday, April 20, 2018 10:43 AM
    Friday, April 20, 2018 10:43 AM

All replies

  • The problem is the wrapping with @{...} gives problems in this case, probably due to the use of apostrophe inside the expression.

    Instead, it will work when doing it like this:

       @json(activity('Column structure').output.firstRow.JsonString)

    • Marked as answer by Anders V Friday, April 20, 2018 10:43 AM
    Friday, April 20, 2018 10:43 AM
  • Thanks for updating this thread with the solution. 

    Regards,

    Mike

    Friday, April 20, 2018 7:59 PM
    Moderator