Skip to content

Instantly share code, notes, and snippets.

@lightle
Created April 24, 2024 04:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lightle/5ef46597bbc196171ac316e0d04ca06c to your computer and use it in GitHub Desktop.
Save lightle/5ef46597bbc196171ac316e0d04ca06c to your computer and use it in GitHub Desktop.
version: 2
# available only for dbt 1.8
unit_tests:
- name: test_is_last_day_of_month
description: "Check of model last_day_of_month_orders correctly filter for last day of month orders"
model: last_day_of_month_orders
given:
- input: ref('clean_orders')
rows:
- {order_datetime: '2022-12-31'}
- {order_datetime: '2023-03-01'}
- {order_datetime: '2022-05-15'}
- {order_datetime: '2021-04-30'}
expect:
rows:
- {order_datetime: '2022-12-31'}
- {order_datetime: '2021-04-30'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment