Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Rachidoo
Contributor
Contributor

tAccessInput.. MSAccess table names as parameter

Hi,

I have an MS Access database with many tables having all names in this format : products_stock_on_01/31/2020

fields are :

product_code

product_name

product_category

stock_quantity

Each month-end a new table is generated on this database.

With a simple Talend Job, an tAccessInput component and obviously a tMap.. i want to load all tables to one SQL Server table created in the same format with an additional field "Stock_date"

How can i do please ? I don't know how to make a loop on each table with her name in parameter for the tAccessInput compoent.

Thank you

Labels (2)
1 Reply
pakapi_
Creator
Creator

Hi Rachidoo,

 

first you have to get list of interesting tables, by querying system tabels f.g.:

select

MSysObjects.name

from

MSysObjects

where

MSysObjects.name like 'products_stock_on_%'

 

Paste this query in your first tAccessInput.

Then you have to iterate through your input, by using tFlowToIterate.

Then, use variable from tFlowToIterate to parametrize your table name in input query.

Save your fetched data into target database table.

 

Your job should looks like:

 

tAccessInput>row>tFlowToIterate>iterate>tAccessInput>row>tOracleOutput