locked
Support for XML Format Files RRS feed

  • Question

  • Hi,

    Can anyone please tell me if Azure SQL supports XML Format files?

    According to this document XML Format apply to Azure SQL. However, when I try to use an XML format file I get an error stating that the tag BCPFORMAT is not supported. To eliminate the possibility that the issue is with my generated format file I've used Microsoft's own example file listed in the document and got the same error.

    SQL Statement / Error:

    " Msg 4855, Level 16, State 1, Line 22
    Line 2 in format file "columnMappings": unexpected element "BCPFORMAT". "

    I'm using the following query:

    BULK INSERT ods.EventStore_Dummy
    FROM 'extracts/eventstore/dummy.csv'
    WITH (
    DATA_SOURCE='dummyStorage',
    FORMAT='CSV',
    ROWTERMINATOR='0x0a',
    FIRSTROW=2,
    FORMATFILE='columnMappings.xml',
    FORMATFILE_DATA_SOURCE='formatStore');

    Any help would be appreciated

    Thursday, April 23, 2020 9:28 PM

Answers

  • Hello Tzur

    Could you please replace https with http in the xmlns and see if that helps.

    It should look like this

    <BCPFORMAT xmlns="http://schemas.microsoft.com/sqlserver/2004/bulkload/format" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    .....

    .....

    -

     

    If this answers your query, do click “Mark as Answer” and Up-Vote for the same which might be beneficial to other community members reading this thread .

    And, if you have any further queries do let us know. 

     


    Friday, April 24, 2020 6:24 AM

All replies

  • Hello Tzur

    Could you please replace https with http in the xmlns and see if that helps.

    It should look like this

    <BCPFORMAT xmlns="http://schemas.microsoft.com/sqlserver/2004/bulkload/format" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    .....

    .....

    -

     

    If this answers your query, do click “Mark as Answer” and Up-Vote for the same which might be beneficial to other community members reading this thread .

    And, if you have any further queries do let us know. 

     


    Friday, April 24, 2020 6:24 AM
  • Thank you Kalyan. Changing the protocol from HTTPS to HTTP solved the issue.

    I will comment on the document to let the owner know that the sample is incorrect.

    Friday, April 24, 2020 3:19 PM