• Townie
    AI
  • Blog
  • Docs
  • Pricing
Log inSign up
alexwein

alexwein

alexBlogs

me writing about things maybe
Remix of stevekrouse/markdownBlogStarter
Public
Like
alexBlogs
Home
Code
8
posts
8
Layout.tsx
README.md
about.md
analytics.ts
dvs-spin.md
H
index.tsx
robots.txt
Branches
3
Pull requests
Remixes
1
History
Environment variables
1
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
posts
/
2025-04-20-cheatsheet.md
Code
/
posts
/
2025-04-20-cheatsheet.md
Search
5/4/2025
Viewing readonly version of cheatsheet branch: v7
View latest version
2025-04-20-cheatsheet.md

Cheatsheet for a dbt technical assessment

Incremental syntax:

Big easy

with events as (
  select * from {{ref('events')}}
  {% if is_incremental() %}
    where event_timestamp >= (select max(event_timestamp)::date from {{this}})
  {% endif %}
)
--rest of model...

Using packages

You probably want to avoid packages, but if you need codegen or utils, create a packages.yml file in the dir as the project yaml, and run dbt deps.

packages:
  - package: dbt-labs/codegen
    version: 0.10.0

Run dbt deps. And then here's the command line

dbt --quiet run-operation generate_source --args '{"table_names": ["orders"]}' > models/staging/jaffle_shop/_sources.yml

FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareersBrandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.