Hi guys! Is it possible on a custom tap to set a f...
# getting-started
j
Hi guys! Is it possible on a custom tap to set a field to only be created and never updated?
a
Hi, @joao_torquato. Interesting question. Can you say more about the use case? JSON Schema has a
readOnly
attribute, but I'm not aware of any implementations that currently implement it.
j
Hi @aaronsteers! We are using meltano to read financial transactions data and some fields like "original due date" and "current due date" are sent every day by users to a data lake and we read it. Since a user sends the field "original due date" every day, I don't want to lose track of the original value and don't want to update that field once I receive it for the first time.
a
Interesting! Thanks for the extra context. To your original question, no, as of today we don't have anything that would skip updates on certain fields while applying them to others. There are probably creative ways to accomplish this, but the way I've personally done something similar in the past was to change the load to what I call "append only" so that prior versions of records are never replaced, and the target table is only appended with new records. This approach requires that you dedupe in a tool like dbt, calculating the latest version of a field when you want the latest data and the earliest/original version of a field from the first version of the record. Does this sound like it could be a fit for your use case?
j
@aaronsteers thanks for the suggestion! Today I only use the custom tap, not the dbt part, but probably I will try that too Thanks anyway!!!