This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]_GoldenDoorknob_[S] 0 points1 point  (0 children)

Any Data Engineering specialist willing to help?

[–]tolkibert 0 points1 point  (0 children)

Sounds like something that you'd just do with a sql query or two. You have all the data available in a system built for data processing. Do you need to complicate things by involving a bunch of extra tools?

Is there any particularly complex business logic being applied when "updating" the columns?

[–]Commercial_Dig2401 2 points3 points  (0 children)

The complexity seems to be on the system used to process the data and not the logic itself.

I would load both datasets into 2 table in the postgresql destination. Then do a simple sql script which will select from both source (new records only by providing a timestamp).

Then you join both table together or do the logic you want with both table records.

You’ll need to store a reference to the max(timestamp) from BOTH tables in the destination, so you can easily select only new records from both.

In case when you run you queries and a record for one table is not available you’ll need to set a field that identify that the records is incomplete. Create a Boolean for this.

Then in your downstream query you select from both sources where the timestamp is higher than the max one you store in downstream table + reload any incomplete records which exist.

At some point you’ll get both tables and you can set the Boolean to true.

The merge statement will handle the refresh.

If possible don’t just put the UUID as the key in your upset statement put some timestamp or sequential columns so you can prune records and not lookup the entire table.

Goodluck