Iterate through a list of tables

One Star

Iterate through a list of tables

plegall wrote:
Jay wrote:
[...] iterate through a list of tables [...]

You can already do this, at least with MySQL and Oracle (that I know more than the others) by using simple queries in a tMysqlInput, an iterate link and another tMysqlInput (create another dedicated topic if you want more informations).

[topic]726[/topic]

I would be very interested in some more information. Thanks for your help.

Best Regards,

Jay

P.S. I was very excited to hear about Slowly Changing Dimension support being added!
Employee

Re: Iterate through a list of tables

tMysqlInput_1 query:
"show tables like 'topic745_%'"

tMysqlInput_2 query:
sprintf(
"select '%s', id, firstname from %s",
$tMysqlInput_1[0],
$tMysqlInput_1[0]
)

(okay, it looks like a trick, but you can do it, it's safe)

Job output:
Starting job topic745 at 17:31 28/05/2007.
.-----------------------------.
| tLogRow_1 |
+------------+----+-----------+
| tablename | id | firstname |
+------------+----+-----------+
| topic745_1 | 1 | pierrick |
| topic745_1 | 2 | jay |
'------------+----+-----------'
.-----------------------------.
| tLogRow_1 |
+------------+----+-----------+
| tablename | id | firstname |
+------------+----+-----------+
| topic745_2 | 3 | marion |
| topic745_2 | 4 | erwann |
'------------+----+-----------'
.-----------------------------.
| tLogRow_1 |
+------------+----+-----------+
| tablename | id | firstname |
+------------+----+-----------+
| topic745_3 | 1 | tiphaine |
| topic745_3 | 2 | agathe |
'------------+----+-----------'
Job topic745 ended at 17:31 28/05/2007. [exit code=0]
One Star

Re: Iterate through a list of tables

What's the tMysqlConnection component? Is it available?
Employee

Re: Iterate through a list of tables

sologlobe wrote:
What's the tMysqlConnection component? Is it available?

It will be available in 2.1.0M2. See [feature]1090[/feature] for more details.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download