SDK · dbt

PropRaven dbt package

Drop-in dbt sources + staging views over the PropRaven Snowflake Marketplace share. Lowercase, snake-case, typed — no boilerplate between an accepted share and downstream models.

Prerequisites

  • dbt-core 1.7+ with the Snowflake adapter
  • An accepted PropRaven Snowflake Marketplace share (default mount: PROPRAVEN.SILVER.*)

Install

Add to packages.yml in your dbt project:

packages:
  - git: "https://github.com/jdw2111/propraven-dbt.git"
    revision: v0.1.0

Then:

dbt deps

Or via dbt Hub once it picks up the latest GitHub Release:

packages:
  - package: propraven/propraven
    version: [">=0.1.0", "<0.2.0"]

Configure

Override these vars in your own dbt_project.yml only if your share landed under a non-default database / schema:

vars:
  propraven_database: "PROPRAVEN"          # the database the share mounted as
  propraven_silver_schema: "SILVER"        # parcels, properties, permits, etc.
  propraven_meta_schema: "META"            # SOURCE_LINEAGE, ENTITY_DICTIONARY
  propraven_gold_schema: "GOLD"            # ABSENTEE, INSTITUTIONAL, etc. (optional)
  propraven_insurance_schema: "INSURANCE"  # PROPRAVEN_INSURANCE share (optional)

Use

# Build the staging + mart models
dbt run --select propraven

# Run schema tests against the share
dbt test --select source:propraven_silver

# Check that the share is fresh (defaults to a 168h warning threshold)
dbt run-operation check_propraven_freshness --args '{warn_after_hours: 168}'

# Re-generate sources after a share schema change
dbt run-operation generate_propraven_sources --args '{schemas: ["SILVER","META"]}'

What you get

Sources:

Typed declarations for every shared SILVER.* and META.* table — Parcel, Property, Tax, Permit, Transaction, Owner, Loan, Address, Geography, Source Lineage, Entity Dictionary.

Staging views:

  • stg_propraven__parcels
  • stg_propraven__permits
  • stg_propraven__transactions
  • stg_propraven__owners
  • stg_propraven__geography

Example marts:

  • parcels_with_recent_activity — joins each parcel to its most recent permit + sale
  • owner_portfolio_summary — rolls parcels up by owner_entity_id with total assessed value

Operations:

  • check_propraven_freshness — surfaces stale silver entities from META.SOURCE_LINEAGE
  • generate_propraven_sources — codegen-style macro that re-emits the sources block when the share's table list changes

Example query

Find recently-permitted SFR parcels in a target metro:

{{ config(materialized='view') }}

select
    p.parcel_id,
    p.apn,
    p.lot_size_acres,
    pr.last_permit_filed_date,
    pr.lifetime_permit_count
from {{ ref('stg_propraven__parcels') }} p
join {{ ref('stg_propraven__geography') }} g using (geography_id)
left join {{ ref('parcels_with_recent_activity') }} pr using (parcel_id)
where g.cbsa_code = '16740'          -- Charlotte-Concord-Gastonia
  and pr.last_permit_filed_date > current_date - interval '180 days'
order by pr.last_permit_filed_date desc

Versioning

v0.1.x — under active development; minor versions add staging views and macros without breaking existing signatures. v1.0 freezes the surface. Track the GitHub Releases for changes.