Idempotent Updates of Partitions #9796
-
I have a couple of use-cases for idempotent updates, probably to be solved differently. Dimensional tablesFor dimensional tables, like
Fact tablesNow, for fact tables, like: TransactionsIn both of these cases, although it's more likely with the fact-table historical updates, I feel like it's possible that someone reads from my databend between my DELETE and my INSERT. Is there any support for multi-statement transactions? I guess I don't need cross-table transactions, and I can get away without them if the DELETE is atomic and the INSERT is atomic. I can cross-reference on the read side to make sure all data I require is present; but if e.g. a read might return half of the data I inserted from a file, if an insert is not atomic, then I'd have a problem. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
is there is a built-in "idempotent copy" mechanism there, which seems not been put into the doc :( though. e.g. it is safe to safe to re-run the following stmt (by default, within 7 days)
databend meta layer tracks the data files that have been ingested, duplicated data files will be detected and prevented from being processed again. the default 7 days period of the deduplication protection could be adjusted by tuning the load_file_metadata_expire_hours
based on the volume and the "pattern" of daily ingestion and the "pattern",
there is a
DELETE and INSERT is atomic |
Beta Was this translation helpful? Give feedback.
INSERT OVERWRITE
is preferred in this case.is
COPY INTO <TABLE>
being used here?there is a built-in "idempotent copy" mec…