Process XML field from SQL Server Xform to PostgreSQL table

Four Stars md
Four Stars

Process XML field from SQL Server Xform to PostgreSQL table

Hi , 
We have XML  field from SQL server for one of our tables with  data look like ""<values><value>1182</value></values>"
But when we try to  map to  PostgreSQL tables to XML datatype , we didn't find any matching DB type neither in SQL server Input component(tMSSQLInput) nor in PostgreSQL output component(tPostgreSQLoutput).
We try to use "document" datatype but our source data is not in proper XML tree structure. so parsing is challenge
we can handle with String datatype-> VARCHAR .but Can someone please suggest some better way to handle as XML in Talend Big data Open Studio ??
thanks 
Milan 
Moderator

Re: Process XML field from SQL Server Xform to PostgreSQL table

Hi Milan,

PostgreSQL cannot parse the XML content and therefore you have to save it as text content(String).
You can use
String.valueOf(row1.yourDocument)

to convert the document into a String.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars md
Four Stars

Re: Process XML field from SQL Server Xform to PostgreSQL table

Thanks Sabrina for confirmation! I read XML field as string and load data to table using TEXT.
either solution works for me ..but bad to hear we dont have XML datatype in DI 

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog