Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
ksrikanthr
Contributor
Contributor

What's the use of DB Type in tOracleInput component?

I've a table in Oracle db in which a column's datatype is RAW. When you read that table using tOracleInput component, the Type, which is java type, for that column can be String or byte[]

 

The component gives warning for below datatype combination - 

Case 1:

-----------------------

Type: String

DB Type: RAW

-----------------------

but when you click on the blue icon (Reset DB Types), it populates the DB Type as VARCHAR2. The job runs fine even with DB Type as VARCHAR2.

 

It doesn't give warning for the below datatype combination which is understandable - 

Case 2:

-----------------------

Type: byte[]

DB Type: RAW

-----------------------

In either cases, the job runs fine which means that the DB Type doesn't matter. Then why is there an option to specify DB Type in tOracleInput component?

Labels (4)
2 Replies
Anonymous
Not applicable

Hello,

There are two data types in the database component schema: the Talend type and the DB type. When retrieving the table schema, there is always a default Talend type to map to the real DB type. Also, there is a default DB type to map to the Talend type on the DB schema, when linking a non-DB component to a DB output component. You can modify the default data type mapping for your project rather than changing it manually every time.

A Talend type is an intermediate Java type, mapped for each data type of different databases. These default data type mappings are configured in an XML file. Each kind of database has a separate mapping configuration file. For example, the file mapping_Mysql.xml maps MySQL data types to Talend types.

For more information about how to change the default data type mapping, please refer to this page.

Best regards

Sabrina

 

ksrikanthr
Contributor
Contributor
Author

xdshi/Sabrina,

 

You copy pasted some content from Talend documentation but I don't think you understood my question. I'm asking what is the use of DB Type in the input component when anything is accepted and works?