Skip to content

Commit 68c0255

Browse files
committed
up
1 parent 3be2d9d commit 68c0255

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

abstra_json_sql/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from pathlib import Path
2-
from .tables import FileSystemJsonTables
2+
from .tables import FileSystemJsonLTables
33
from .eval import eval_sql
44
from argparse import ArgumentParser
55
from csv import DictWriter
@@ -9,7 +9,7 @@
99

1010

1111
def query(code: str, workdir: Path, ctx: dict):
12-
tables = FileSystemJsonTables(workdir=workdir)
12+
tables = FileSystemJsonLTables(workdir=workdir)
1313
result = eval_sql(code=code, tables=tables, ctx=ctx)
1414
return result
1515

abstra_json_sql/tables.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ def __init__(self, workdir: Path):
675675
def _ensure_metadata_table(self):
676676
"""Ensure the metadata table exists"""
677677
metadata_path = self.workdir / "__schema__.jsonl"
678+
self.workdir.mkdir(parents=True, exist_ok=True)
678679
if not metadata_path.exists():
679680
metadata_path.write_text("")
680681

0 commit comments

Comments
 (0)