Skip to content

XML from MSSQL not being loaded #1683

@davidkeaveny

Description

@davidkeaveny

I have a SQL Server database that contains a table which stores data in an XML field. When I try to migrate that table to Postgresql with pgloader, I get the following error message:

 ERROR Database error 2200N: invalid XML content
DETAIL: line 1: expected '>'
line 1: Premature end of data in tag DemographicDetails line 1
line 1: Premature end of data in tag Payee line 1
line 1: Premature end of data in tag Payees line 1
line 1: Premature end of data in tag PayrollEvent line 1
CONTEXT: COPY payroll_event_data, line 1, column xml_data: "<PayrollEvent xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract..."

In both source and target tables, the data is stored in an XML type (not text or varchar). If I turn on debug and verbose modes, it lists the data being processed, and the XML it displays is being truncated at just over 2K, right in the middle of the DemographicDetails XML element as the error suggests. I'm guessing SQL Server is not returning the full XML? Is it possible to force it to return the whole lot?

I am using the Docker image of dimitri\pgloader:latest, with image ID sha256:d548fdd654a54b89174f5b8de8a6b3e011ad5da347af265b54a1ef1fb00da41d in Docker Desktop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions