edited sensors to account for a fresh start, edited README
This commit is contained in:
parent
b2571a8a48
commit
e068cbed20
4 changed files with 124 additions and 78 deletions
|
|
@ -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
|
||||
""")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue