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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Transform input data using SQL query and pass results to output

Hello,

 

I am trying to transfer my data from data source to my data warehouse. I do not want all the columns from the input data, so have written an SQL query that transforms the input data. I want this transformed data to be transferred to the output.

 

Any suggestions on how this can be achieved? 

 

Thanks!

Labels (2)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

@Harguna ,check0683p000009M39x.png0683p000009M34L.png0683p000009M2x5.png the below screenshots.

 

View solution in original post

9 Replies
manodwhb
Champion II
Champion II

@Harguna ,lets suppose your data base is oracle,you write a query in tDBinput by specifying the required column in the select clause and the same fields you need to keep in the schema of tDBinput .

manodwhb
Champion II
Champion II

@Harguna ,check the below screenshot will help you.0683p000009M39s.png

Anonymous
Not applicable
Author

I have some columns which actually don't exist in the table but are defined in the query. How do I map these columns in tMap?

 

manodwhb
Champion II
Champion II

@Harguna ,check the below link will be useful how to use alias  names in the query and those alias names should be there in the schema of tDBInput.

 

https://help.talend.com/reader/iYcvdknuprDzYycT3WRU8w/pdP5qPPaAORn8RIiHmlY0A

Anonymous
Not applicable
Author

1. Do I always need to add "id" in the SQL query (otherwise it gives bad value error)?

2. Do I have to add alias columns in the context part of the input table to solve my mapping problem?

 

akumar2301
Specialist II
Specialist II

if column is not part of table , you could use query like ,

 

select id, name , 'Valid record' status from employee

or

 "select id, name ,"  + CONTEXT.FIXEDSTRING + " status from employee"

 

you need to defined id,name and status as your schema.

Anonymous
Not applicable
Author

But how do I map these alias columns in the tMap?

akumar2301
Specialist II
Specialist II

if these are defined as schema of txxxInput component andd attach it to tMap , all the columns, including alias, will be part of tMap

manodwhb
Champion II
Champion II

@Harguna ,check0683p000009M39x.png0683p000009M34L.png0683p000009M2x5.png the below screenshots.