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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error pstmt_tDBOutput_1 cannot be resolved

Hi,

I'm trying to migrate data from SQL to PostgreSQL using Talend Open Studio 7.0.1

I created the empty tables at the destination.

Instead creating static components I created a metadata table with "list of tables" to be migrated from source to destination. The table also contains source table name and destination table name.

I used 'tFlowToIterate' to fetch source and destination table names to global variables and next used these global variable names in the 'tDBInput' and 'tDBOutput' but throws the below generic error and could not understand the issue.

 

However, it works when I try to hardcode the table names without using global variable but fails when using global variables.

Am I missing any step here?

 

Error:

Error in the component's properties0683p000009MAB6.pngstmt_tDBOutput_1 cannot be resolved
pstmt_tDBOutput_1 cannot be resolved
pstmt_tDBOutput_1 cannot be resolved
pstmt_tDBOutput_1 cannot be resolved to a variable
pstmt_tDBOutput_1 cannot be resolved
pstmt_tDBOutput_1 cannot be resolved to a variable
pstmt_tDBOutput_1 cannot be resolved

Labels (2)
36 Replies
Anonymous
Not applicable
Author

I guess I should not be using 'tDBOutput' component. Could you please specify what components are required?

fdenis
Master
Master

tPostgresSqlRow or tDbRow
Anonymous
Not applicable
Author

@fdenis

I am not sure how this would work if source and destination tables are on different databases.
Could you unfold more pointers for your suggestion?

fdenis
Master
Master

the idea is to dynamically create a list of insert statement. SQL is a universal language.
Then ones you save SQL insert statement and you manually execute the queries file or you directly execute insert statement into destination db.
Anonymous
Not applicable
Author

I think I understood your hint but facing issues due to lack to knowledge on Talend.
I have attached the screenshots in a document for your reference.


My Steps:
I created connections for both source and destination.
Now on source, I use the query shared by you.

Now how to load this query to string and execute on the destination.


pstm_189.docx
fdenis
Master
Master

ok,
First what is your SQL level?
did you lean Talend using tutos, cours or colleague?
Anonymous
Not applicable
Author

My SQL level is good(7 out of 10) but I'm very new to Talend, not more than 15 days of working experience.

I'm learning Talend through multiple ways like YouTube videos, other community posts and blogs.

 

Thank you.

fdenis
Master
Master

ok so in talend orange links are dataset.
your first query have to retrieve a dataset containing only one Varchar data.
your first component (connection can be inside or outside) ) have to be tmssqlinput inside query write a sql query who extract a Varchar containing an sql insert statement (not mine, it's just a sample) .
add one column (columnName) to the output link and connect it to tLogRow.
run it.
when it's working connect it to tDBRow in query field insert row1.columnName to execute each row.


Anonymous
Not applicable
Author

Thanks for your detailed explanation.

However, I already learnt how these components work and also transformed data in a sample run.

As per the previous attachment, I'm struggling to create varchar using tDBRow, pass it to destination and execute the Varchar there.

This is the area which I need your help.

 

Thank you.

 

fdenis
Master
Master

so in Query field:
"Select concat(('Insert into Table1 (field1,field2) values (',sid,',''',studentname,''')') from students"