none
Use expression to define structure for Azure SQL DW

    Question

  • I am copying from Azure Data Lake Store to Azure SQL Data Warehouse, and want to dynamically set the column names and types through an expression (or any other way that it is possible to do it).

    The regular approach with static columns is something like this:

    "type": "AzureSqlDWTable",

    "structure": [

    {

    "name": "OBJECT_ID1",

    "type": "String"

    },

    {

    "name": "OBJECT_ID2",

    "type": "String"

    }


    To do it dynamically through an expression, I have tried this, but won't work:

    "type": "AzureSqlDWTable",

    "structure":

    {

    "value": "[{\"name\":\"OBJECT_ID1\",\"type\":\"String\"},{\"name\":\"OBJECT_ID2\",\"type\":\"String\"},{\"name\":\"TS\",\"type\":\"DateTime\"},{\"name\":\"RESSOURCE_ID\",\"type\":\"Int32\"},{\"name\":\"UPS_ID\",\"type\":\"Int32\"}]",

    "type": "Expression"

    }


    How do I do this? What am I mising?

    Thanks!



    • Edited by Anders V Monday, April 16, 2018 6:20 AM
    Monday, April 16, 2018 6:13 AM

Answers