简体   繁体   中英

SQL Transformation in Informatica for Google Bigquery

I have a SQL Script with multiple drop & create DDL(Create tables As Select *), I want to run them at one go. I am quite new to informatica powercenter, can some one provide the process of using SQL transformation for BigQuery in informatica.

Sample Query:-

drop table if exists  sellout.account_table; 
CREATE TABLE sellout.account_table
AS 
SELECT * FROM 
sellout.account_src
WHERE 
UPPER(account_name) IN ('RANDOM');

Similar to the above queries i have around 24 SQL's in a script.

I want to run them at once and later make them as part of informatica job.

If the "PowerExchange Google BigQuery" server and client are installed and after executing the infasetup.bat(sh) validateandregisterallfeatures, the mappings would be opened/exported successfully.

Here are some FAQs that might be handy for you:

Q: Why are the output fields in SQL Transformation not seen? ​A: Stored Procedure selected in the SQL Transformation must have output parameters declared. Else it would not have output fields other than default Return Code column.​​ Q: A set of columns are displayed as result while running the Stored Procedure, however, you still do not see the same columns as output in SQL Transformation. Why? A: Columns seen in the output might not be defined/declared as output parameters in the Stored Procedure. Procedure might have 'SELECT * FROM' like statement, which retrieves the data when the procedure is run from DB UI and a similar result could be seen when the procedure is run programmatically. However, to call the same procedure from SQL Transformation, explicitly declared output parameters should be present as the transformation imports the metadata of the proc when selected. Unless you declare the output parameters explicitly in the procedure, it cannot be seen as output in the transformation.

​Q: Is it necessary to have input/output parameters in Stored Procedure to call it from SQL Transformation? A: Yes, it is necessary to have input/output parameters in Stored Procedure if it is not having default ones. As these parameters appear as input/output fields in SQL transformation, without these Mapping becomes invalid.

Q: I have SELECT statement in the procedure, does the SQL transformation can push this to next transforamtion?

A: Approprioate output parameters are required for this to work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM