One Star

How to run plpgsql to load data into postgresql server

by using tSystem component i could execute my PHP script, which executes the DB connection with postgresql & loads the data(from input file) into DB.
now am trying to execute plpgsql script to get the data from the postgresql table(which is been loaded by the PHP script) & wanted to load the data into a different DB schema which is in the same postgresql server.
The aim to do this is, from diferent departments the input files will be coming to the main server. From the server we are using TOS to parse the file by using PHP & loads the data into Postgresql DB(as a temporary). after this we wanna consolidate the data. so from the temporary tables, we are moving the data to the data warehouse.
to move the data from temporary table to datawarehouse, am using plpgsql. but i dont know how to do this in TOS. can i use the plpgsql directly in any coponent? i hope it'd mess up the job design. so is there any component to run a whole plpgsql script? i need to do this after my PHP script loads the data successfully. please tell me some solution to do this.
7 REPLIES
Employee

Re: How to run plpgsql to load data into postgresql server

There is no tPostgresqlSP (Stored Procedure) component yet (TOS 2.4), but you can call your PL/PgSQL function directly from a tPostgresqlRow. The only drawback is that you won't get the return values of the stored procedure.
One Star

Re: How to run plpgsql to load data into postgresql server

Hi Plegall,
i referred the topic about Postgresql Stored procedure under this link http://www.talendforge.org/forum/viewtopic.php?id=2512. so is the component been updated?
Employee

Re: How to run plpgsql to load data into postgresql server

Hi Plegall,
i referred the topic about Postgresql Stored procedure under this link 2512. so is the component been updated?

The component tPostgresqlSP is available in the Ecosystem : tPostgresqlSP.
One Star

Re: How to run plpgsql to load data into postgresql server

Thanks plegall..
One Star

Re: How to run plpgsql to load data into postgresql server

hello guys,
i s there any topics about "how to import external components"?
One Star

Re: How to run plpgsql to load data into postgresql server

sorry guys.. i got the topic about that.. thanks for guidance.
One Star

Re: How to run plpgsql to load data into postgresql server

is possible to obtain a version of tPostgresqlSP running under tos 4.1 ?
or if someone can give me help to make a porting on TOS 4.1