Check out the first Dataiku 8 Deep Dive focusing on Productivity on October 29th Read More

How to control data syncying data using sync recipe when source table has no records.

Level 1
How to control data syncying data using sync recipe when source table has no records.
Hi,

The DB connection that I use has truncate table option enabled when the schema of target table does not change. And I cannot alter the connection setting as it is used by multiple users.

My requirement is to sync some data from table A to table B. I want to only sync the tables when there is some data in table A and not sync when there are no records in table A . Because if I sync when there are no records in table A, all data in table B gets truncated and no data is present in table B at the end of the job. Please let me know how can I achieve this.

Thanks,

Neha
0 Kudos
1 Reply
Dataiker
Dataiker
Hi,

This can be achieved using a DSS scenario: with a custom Python step, you could query the dataset A to see if there are records, and only trigger the build of B if there were records in A.
0 Kudos
Labels (2)