You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I have a question about using Dataform.
Is there a way to replace data for a specific date using Dataform?
In SQL terms, here is the kind of operation I'm looking for:
-- Delete existing data for a specific date
DELETE FROM sink_table
WHERE date = '2024-04-01';
-- Fetch data for the specific date from source_table and insert into sink_table
INSERT INTO sink_table (date, user_id)
SELECT date, user_id
FROM source_table
WHERE date = '2024-04-01';
Currently, I achieve this using the following SQLX:
config {
type: "incremental",
schema: "sample_schema",
name: "sink_table",
}
pre_operations {
DELETE FROM ${self()} WHERE date = '2024-04-01'
}
SELECT
date,
user_id,
FROM 'source_table'
WHERE date = '2024-04-01'
Is there a more streamlined way to accomplish this using Dataform features?
Best regards
The text was updated successfully, but these errors were encountered:
config {
type: "operations",
schema: "sample_schema",
name: "sink_table",
}
DELETE FROM ${self()} WHERE date = '2024-04-01';
INSERT INTO sink_table (date, user_id)
SELECT date, user_id
FROM source_table
WHERE date = '2024-04-01';
Hello. I have a question about using Dataform.
Is there a way to replace data for a specific date using Dataform?
In SQL terms, here is the kind of operation I'm looking for:
Currently, I achieve this using the following SQLX:
Is there a more streamlined way to accomplish this using Dataform features?
Best regards
The text was updated successfully, but these errors were encountered: