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

Have you checked out Talend’s 2019 Summer release yet?

Find out about Talend's 2019 Summer release

Blog

Talend Summer 2019 – What’s New?

Talend continues to revolutionize how businesses leverage speed and manage scale

Watch Now

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog