Skip to content

Commit

Permalink
Merge pull request #138 from pycontw/fix-kktix
Browse files Browse the repository at this point in the history
fix(ods): kktix script path
  • Loading branch information
henry410213028 authored Jun 18, 2024
2 parents ae41bcc + 2ae1d00 commit b174c47
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions dags/ods/kktix_ticket_orders/udfs/bigquery_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@

def create_table_if_needed() -> None:
client = bigquery.Client(project=os.getenv("BIGQUERY_PROJECT"))
sql = (
Path("dags/ods/kktix_ticket_orders/sqls/create_table.sql")
.read_text()
.format(TABLE)
)
base_path = Path(__file__).parent.parent
sql_path = base_path / "sql" / "create_table.sql"
sql = sql_path.read_text().format(TABLE)
client.query(sql)
client.query(DEDUPE_SQL)

0 comments on commit b174c47

Please sign in to comment.