Skip to content

Commit

Permalink
Add missing semicolons when printing or writing SQL to file
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyMcCormick committed Jan 27, 2025
1 parent af32d12 commit b9ed319
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/felis/tap_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def load(self) -> None:
# Execute the inserts if not in dry run mode.
self._execute_inserts()
else:
logger.info("Dry run: not loading data into database")
logger.info("Dry run - not loading data into database")

def _insert_schemas(self) -> None:
"""Insert the schema data into the schemas table."""
Expand Down Expand Up @@ -573,15 +573,15 @@ def _compiled_inserts(self) -> list[str]:
def _print_sql(self) -> None:
"""Print the generated inserts to stdout."""
for insert_str in self._compiled_inserts():
print(insert_str)
print(insert_str + ";")

def _write_sql_to_file(self) -> None:
"""Write the generated insert statements to a file."""
if not self.output_path:
raise ValueError("No output path specified")
with open(self.output_path, "w") as outfile:
for insert_str in self._compiled_inserts():
outfile.write(insert_str + "\n")
outfile.write(insert_str + ";" + "\n")

def _insert(self, table_name: str, record: list[Any] | dict[str, Any]) -> None:
"""Generate an insert statement for a record.
Expand Down

0 comments on commit b9ed319

Please sign in to comment.