Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] XML as BLOB in Oracle DB reads as null using XML schema

Hi,

I have a table containing an XML stored as BLOB.
I have created a query that selects only that BLOB.
With the xml file, I have created an xml schema in the metadata that maps only the fields that I am interested in.
When I use the mapping in a tFileInputXML, it works fine, I get the correct value for the fields in the tLogRow.
BUT the mapping is automatically used in the query where SELECT the BLOB (CSCHEMA.T_DETAIL.CV😞
[size=2][font=Courier]"select  CSCHEMA.T_DETAIL.CV from CSCHEMA.T_DETAIL where CSCHEMA.T_DETAIL.CV is not null"[/font][/size]
It does select 2 rows, what implies that the select statement works perfectly (I have only 2 rows in my table that contain a CV), but the tLogRow shows null for the mapped values:
.--------+--------+---------.
|         tLogRow_2         |
|=-------+--------+--------
|Language|PersonId|FirstName|
|=-------+--------+--------
|null    |null    |null     |
|null    |null    |null     |
'--------+--------+---------'
Anybody knows why is that and how to solve it ?
Thanks in advance.

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Hi,
After looking around, I have found the solution.
When importing the table schema, the DB type appears as a BLOB (correct) and the Talend type appears as object. In fact, from all the possible combinations of DB type and Talend type, in order to be able to read an XML stored as BLOB in an Oracle database is
DB type = XMLType
Talend type = Document
I hope this can help somebody in the future. It would be nice if Talend could recognize these types automatically.