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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

 

Labels (1)
  • v7.x

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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.

 

0683p000009M7XI.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

View solution in original post

3 Replies
Anonymous
Not applicable
Author

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.

 

0683p000009M7XI.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

Anonymous
Not applicable
Author

Hi ,

@nthampi  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" :

0683p000009M7aa.png

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

Anonymous
Not applicable
Author

@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