<#7311 feature: Load incrementally on column creat...
# meltano-repo-activity
g
#7311 feature: Load incrementally on column created by streammaps Issue created by qbatten Feature scope Other Description Summary I would like to be able to create a column in stream_maps and then load incrementally on that column. In other words, I guess, be able to override the replication_key in stream_maps. I'm open to other, non-stream-map options too, and being able to write a simple SQL statement that's then used as a replication_key would be just as useful as being able to write the simpleeval-evaluated python statements that stream_map enables. Here's an example of the behavior I'm hoping for. Assume that we're loading data from the OLTP databases for a website, and changing the source tables in any way is just not an option. Example: Load using both an updated_at and created_at column, together My source user table has two timestamp columns: created_at and updated_at. A new row gets created when a user signs up; at which point the created_at column gets populated with the timestamp of the signup, and updated_at defaults to null. Then, if a user changes their bio, address, username, etc, that value in the table changes and the updated_at column is set to the time of that change. I would like to be able to create a column in stream_maps like
last_change: created_at if not updated_at else updated_at
. In other words, if updated_at is null, use created_at, but if updated_at has a value, use that value. The SQL equivalent would be
COALESCE(updated_at, created_at)
. Then, I would like to be able to load my user table incrementally on this last_change column. That way, when a user's profile changes, we can load in the new changes, but we don't have to do a full table replication every time (which would be prohibitively slow and expensive). meltano/meltano