dynamic action on a table tDBOutput component

Highlighted
Five Stars

dynamic action on a table tDBOutput component

Hy all

My question is :

It is possible to specify the action(Truncate table / Delete table if not existe ..) on a table  tDBOutput dynamically with a variable context ?

The purpose of this job is :

-to register a new mode_exec context variable at the job level to configure the execution mode .
- mode_exec = INIT (initialization) allowing to make a truncate of a DW table before being loaded by a data file.
- mode_exec = INCR (incremental) forbidding to make a truncate of a DW table before it is loaded by a data file.

 

Any explication plz

 

Tags (1)

Accepted Solutions
Employee

Re: dynamic action on a table tDBOutput component

Hi,

 

    You can use a Run if condition to control the flow. You can add the if condition statement within Run if path.

 

    A simple scenario will be as shown below.

 

image.png

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Five Stars

Re: dynamic action on a table tDBOutput component

Hi ,

@nikhilthampi  thank you for your answer .

Acually , i find this solution wich is not very different of yours :

Set up a tDBRow with instruction "Truncate TABLE " at the beginning of the job. Then put a condition the execution of this tDBRow component with a variable, in an "IF" link" :

Capture d’écran du 2019-08-13 15-48-52.png

In the IF link  condition  : "INIT".equals(context.mode_exec)


All Replies
Employee

Re: dynamic action on a table tDBOutput component

Hi,

 

    You can use a Run if condition to control the flow. You can add the if condition statement within Run if path.

 

    A simple scenario will be as shown below.

 

image.png

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Five Stars

Re: dynamic action on a table tDBOutput component

Hi ,

@nikhilthampi  thank you for your answer .

Acually , i find this solution wich is not very different of yours :

Set up a tDBRow with instruction "Truncate TABLE " at the beginning of the job. Then put a condition the execution of this tDBRow component with a variable, in an "IF" link" :

Capture d’écran du 2019-08-13 15-48-52.png

In the IF link  condition  : "INIT".equals(context.mode_exec)

Employee

Re: dynamic action on a table tDBOutput component

@AsEls 

 

Both are two options for the same query :-) Since you have got the details, could you please mark both posts as answers to the topic?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

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