Your analytics team uses Dataform in BigQuery to orchestrate an ELT pipeline. Raw daily POS files land in a staging table, then several downstream tables are published to production datasets. You must ensure the run is aborted-and nothing is published-if any row in the staging table has a sale_date older than 90 days. The control must live in the same Dataform repo, without extra services or custom orchestration. Which approach meets these requirements?
Add a SQLX file of type "assertion" that selects rows where sale_date < DATE_SUB(CURRENT_DATE(), INTERVAL 90 DAY); Dataform automatically fails the run if the query returns rows.
Create a Cloud Monitoring alert on the staging table's age metric and configure Cloud Build to cancel the Dataform run when the alert fires.
Set a 90-day partition expiration on the staging table so older records are automatically deleted before downstream tables are built.
Embed a BEGIN … RAISE ERROR script in the pre_operation block of every downstream table so the build stops when invalid dates are detected.
A Dataform assertion is declared in a SQLX file and given the type "assertion". The query should return every row that violates the rule (sale_date older than 90 days). When an assertion returns one or more rows, Dataform immediately fails the run and skips all dependent actions, so no downstream tables are published. Pre-operation scripts or partition expiration do not fail the run; they merely manipulate data. External monitoring with Cloud Monitoring requires separate services and manual cancellation, which violates the constraint that the control reside entirely inside the Dataform repo.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a Dataform assertion?
Open an interactive chat with Bash
Why is the condition sale_date < DATE_SUB(CURRENT_DATE(), INTERVAL 90 DAY) important?
Open an interactive chat with Bash
How does Dataform automate pipeline failure for invalid data?
Open an interactive chat with Bash
What is a Dataform assertion?
Open an interactive chat with Bash
How does the DATE_SUB function work in SQL?
Open an interactive chat with Bash
Why are pre_operation scripts not suitable in this scenario?
Open an interactive chat with Bash
GCP Professional Data Engineer
Designing data processing systems
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .