broke out assets.py into an assets and sensors directory

This commit is contained in:
Ben Varick 2025-11-07 16:39:19 -08:00
parent 0d7de37303
commit 37f23fda18
Signed by: ben
SSH key fingerprint: SHA256:jWnpFDAcacYM5aPFpYRqlsamlDyKNpSj3jj+k4ojtUo
8 changed files with 782 additions and 707 deletions

View file

@ -0,0 +1,23 @@
import pandas as pd
from dagster import (
asset,
)
from dagster_duckdb import DuckDBResource
@asset(
group_name="config",
)
def agency_list(duckdb: DuckDBResource) -> None:
"""Load agency list from CSV into DuckDB."""
# Read the CSV (path is relative to container working directory)
df = pd.read_csv('config/agency_list.csv')
# Write to DuckDB
with duckdb.get_connection() as conn:
conn.execute("""
CREATE OR REPLACE TABLE agency_list AS
SELECT * FROM df
""")