edited sensors to account for a fresh start, edited README

This commit is contained in:
Ben Varick 2025-12-07 09:27:41 -07:00
parent b2571a8a48
commit e068cbed20
Signed by: ben
SSH key fingerprint: SHA256:jWnpFDAcacYM5aPFpYRqlsamlDyKNpSj3jj+k4ojtUo
4 changed files with 124 additions and 78 deletions

View file

@ -1,4 +1,5 @@
import pandas as pd
from pathlib import Path
from dagster import (
asset,
)
@ -11,6 +12,10 @@ from dagster_duckdb import DuckDBResource
def agency_list(duckdb: DuckDBResource) -> None:
"""Load agency list from CSV into DuckDB."""
# Ensure the database directory exists
db_path = Path(duckdb.database)
db_path.parent.mkdir(parents=True, exist_ok=True)
# Read the CSV (path is relative to container working directory)
df = pd.read_csv('config/agency_list.csv')
@ -20,4 +25,3 @@ def agency_list(duckdb: DuckDBResource) -> None:
CREATE OR REPLACE TABLE agency_list AS
SELECT * FROM df
""")