One Star

[resolved] How to use SQL query as input to TMap

I'm using TIS 3.0.4. I've created a SQL query to join the information from 2 tables and I'd like to feed the results to a tMap. I could use the lookup function, but it loads a couple of million rows from the lookup table and my query works much more quickly.
How do I take the output from the query and use it for further processing? Using it as a tPostgresqlInput doesn't seem to work.
1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

Re: [resolved] How to use SQL query as input to TMap

Hello Chyams
You are using a connection from repository, change 'repository' to built-in on propert type and define the schema to map the query column.
Best regardds

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
5 REPLIES
Community Manager

Re: [resolved] How to use SQL query as input to TMap

Hello
How do I take the output from the query and use it for further processing? Using it as a tPostgresqlInput doesn't seem to work.

Why do you say tPostgresqlInput doesn't seem to work? Can you upload a screenshot of your job?
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] How to use SQL query as input to TMap

I created a qwuery to pull data from 2 tables: appointments and vehicles. When I pull the query into a job and as a tPostgesqlInput I'm not seeing the fields from the query. It's using the definitions from the first table listed in the Mavmail schema - account_manager_associations.
One Star

Re: [resolved] How to use SQL query as input to TMap

Shong - do you have an answer?
Community Manager

Re: [resolved] How to use SQL query as input to TMap

Hello Chyams
You are using a connection from repository, change 'repository' to built-in on propert type and define the schema to map the query column.
Best regardds

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] How to use SQL query as input to TMap

Hi Shong,
Thanks for your help. That fixed my problem.