locked
XML error in Copy activity RRS feed

  • Question

  • Hi,

    I am trying to run a copy activity with the source being blob (result of hive query) and destination being Azure SQL. Following is the error which I am getting:

    HDIS copy activity encountered an unknown server error: Code: 0 ; Message: 'Type=System.InvalidOperationException,Message=There was an error generating the XML document.,Source=System.Xml,''Type=System.ArgumentException,Message='', hexadecimal value 0x01, is an invalid character.,Source=System.Xml,'.

    Here is the activity JSON

    {
    "name": "EgressDataAzure",
    "description": "Push Aggregated data to Sql Azure",
    "type": "CopyActivity",
    "inputs": [ {"name": "AzureTableDestBlobTable"} ],
    "outputs": [ {"name": "ReportsDBSQLTable"} ],
    "transformation":
    {
    "source":
    {                               
    "type": "BlobSource"
    },
    "sink":
    {
    "type": "SqlSink",
    "SqlWriterTableType": "CourseActivityType",
    "SqlWriterStoredProcedureName": "spUpdateInsertCourseActivity"
    }
    },
    "Policy":
    {
    "concurrency": 1,
    "executionPriorityOrder": "NewestFirst",
    "style": "StartOfInterval",
    "retry": 0,
    "timeout": "01:00:00"
    }
    }

    Table JSON:

    {"name": "ReportsDBSQLTable","properties":{"location":{"type": "AzureSqlTableLocation","tableName": "CourseActivity","linkedServiceName": "ITASAReportsDB"},"availability": {"frequency": "Day","interval": 1}}}

    {  

       "name":"AzureTableDestBlobTable",
       "properties":{  
     "location":{  
            "type":"AzureBlobLocation",
            "folderPath": "<container>/output/courseactivity/",
    "format":
            {
                "type": "TextFormat"
            },
            "linkedServiceName":"AvroBlobStore"
          },
          "availability":
     {  
            "frequency":"Day",
            "interval":1
          }
       }
    }
    Regards

    Shreenidhi B.R
    Tuesday, December 23, 2014 7:31 PM

Answers

  • Finally was able to figure out the issue.

    The columndelimiter for AzureTableDestBlobTable was missing. As we are using avro format had to specify ^A as the columndelimiter.

    {  

       "name":"AzureTableDestBlobTable",
       "properties":{  
     "location":{  
            "type":"AzureBlobLocation",
            "folderPath": "<container>/output/courseactivity/",
    "format":
            {
                "type": "TextFormat",

                 "columnDelimiter": "\u0001"

            },
            "linkedServiceName":"AvroBlobStore"
          },
          "availability":
     {  
            "frequency":"Day",
            "interval":1
          }
       }
    }

    Tuesday, December 30, 2014 9:24 AM

All replies

  • Do you have <container> in your actual json, or did you just put that there for pasting?
    Tuesday, December 23, 2014 8:54 PM
  • I have the proper container name specified in actual JSON.

    Tuesday, December 23, 2014 10:11 PM
  • Finally was able to figure out the issue.

    The columndelimiter for AzureTableDestBlobTable was missing. As we are using avro format had to specify ^A as the columndelimiter.

    {  

       "name":"AzureTableDestBlobTable",
       "properties":{  
     "location":{  
            "type":"AzureBlobLocation",
            "folderPath": "<container>/output/courseactivity/",
    "format":
            {
                "type": "TextFormat",

                 "columnDelimiter": "\u0001"

            },
            "linkedServiceName":"AvroBlobStore"
          },
          "availability":
     {  
            "frequency":"Day",
            "interval":1
          }
       }
    }

    Tuesday, December 30, 2014 9:24 AM