Skip to content

Commit

Permalink
fix: data type for emitted_at col
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronsteers committed Aug 26, 2023
1 parent 401cd3b commit be903ae
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def write(
query = f"""
CREATE TABLE IF NOT EXISTS {table_name} (
_airbyte_ab_id TEXT PRIMARY KEY,
_airbyte_emitted_at JSON,
_airbyte_emitted_at DATETIME,
_airbyte_data JSON
)
"""
Expand All @@ -106,13 +106,11 @@ def write(

logger.info(f"flushing buffer for state: {message}")
query = """
INSERT INTO {table_name}
INSERT INTO {table_name} (_airbyte_ab_id, _airbyte_emitted_at, _airbyte_data)
VALUES (?,?,?)
""".format(
table_name=f"_airbyte_raw_{stream_name}"
)
logger.info(f"query: {query}")

con.executemany(query, buffer[stream_name])

con.commit()
Expand Down

0 comments on commit be903ae

Please sign in to comment.