Old script wrote blob json.gz seeds; staging models now only read jsonl.gz. Seeds are empty JSONL gzip files — zero rows, satisfies DuckDB file-not-found check. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
772 B
Python
20 lines
772 B
Python
"""Create minimal seed files for SQLMesh staging models that require landing data.
|
|
|
|
Seeds are empty JSONL gzip files — they satisfy DuckDB's file-not-found check
|
|
while contributing zero rows to the staging models.
|
|
"""
|
|
import gzip
|
|
from pathlib import Path
|
|
|
|
# stg_playtomic_availability requires at least one morning and one recheck file
|
|
morning = Path("data/landing/playtomic/1970/01/availability_1970-01-01.jsonl.gz")
|
|
recheck = Path("data/landing/playtomic/1970/01/availability_1970-01-01_recheck_00.jsonl.gz")
|
|
morning.parent.mkdir(parents=True, exist_ok=True)
|
|
for p in [morning, recheck]:
|
|
if not p.exists():
|
|
with gzip.open(p, "wb") as f:
|
|
pass # empty JSONL — 0 rows, no error
|
|
print("created", p)
|
|
else:
|
|
print("exists ", p)
|