locked
ErrorCode=UserErrroInvalidColumnMappingColumnCountMismatch (Blob to SQL) RRS feed

  • Question

  • I have two structures, you can see below the SQL table has more columns.   I get an error that Source and Target columns are different.   So what am I doing wrong to exclude columns so that I do not get this error?  Sorry, we have been banging our heads on this and I just can’t find exactly what I need in the documentation (where I found your name).

    Copy activity encountered a user error: ErrorCode=UserErrroInvalidColumnMappingColumnCountMismatch,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Invalid column mapping provided to copy activity: 'a_eventname: a_eventname, a_eventdatetime: a_eventdatetime,xuid: xuid,json_response: json_response', Detailed message: Different column count between target structure and column mapping. Target column count:9, Column mapping count:4. Check column mapping in table definition.,Source=Microsoft.DataTransfer.Common,'.

     

    My translator:

    "translator": {

                            "type": "TabularTranslator",

                            "columnMappings": "a_eventname: a_eventname, a_eventdatetime: a_eventdatetime,xuid: xuid,json_response: json_response"

                        }

     

    Blob structure.

    "structure": [

                {

                    "name": "a_eventname",

                    "type": "String"

                },

                {

                    "name": "a_eventdatetime",

                    "type": "Datetime"

                },

                {

                    "name": "xuid",

                    "type": "String"

                },

                {

                    "name": "json_response",

                    "type": "String"

                }

            ],

    SQL structure

    "structure": [

                {

                    "name": "Id",

                    "type": "Int32"

                },

                {

                    "name": "a_eventname",

                    "type": "String"

                },

                {

                    "name": "a_eventdatetime",

                    "type": "Datetime"

                },

                {

                    "name": "xuid",

                    "type": "String"

                },

                {

                    "name": "json_response",

                    "type": "String"

                },

                {

                    "name": "year",

                    "type": "Int32"

                },

                {

                    "name": "month",

                    "type": "Int32"

                },

                {

                    "name": "day",

                    "type": "Int32"

                },

                {

                    "name": "hour",

                    "type": "Int32"

                }

            ],

    Friday, December 25, 2015 9:45 PM

Answers

  • Hi,

    Thanks for the question. Refer to the public document, that currently column mapping count must equal to the target column count. Therefore, your activity failed as the target has more columns than the column mapping count.

    As a workaround, you could also set 4 columns in the target SQL structure. In that case, Copy would writes the mapped 4 column data to the target SQL table, and SQL is able to fill the default value for the other 5 columns.

    Tuesday, December 29, 2015 3:22 AM