Skip to content

Commit

Permalink
Mattwill09 patch 1 (#1)
Browse files Browse the repository at this point in the history
* Update sql.py

* Update test_target_sqlite.py
  • Loading branch information
mattwill09 authored Jan 30, 2024
1 parent 5f5a5e0 commit 6f39c03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion singer_sdk/sinks/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import sqlalchemy as sa
from pendulum import now
from sqlalchemy.sql import quoted_name
from sqlalchemy.sql.expression import bindparam

from singer_sdk.connectors import SQLConnector
Expand Down Expand Up @@ -282,7 +283,7 @@ def generate_insert_statement(
statement = dedent(
f"""\
INSERT INTO {full_table_name}
({", ".join([f'"{name}"' for name in property_names])})
({", ".join(quoted_name(name) for name in property_names)})
VALUES ({", ".join([f":{name}" for name in property_names])})
""", # noqa: S608
)
Expand Down
2 changes: 1 addition & 1 deletion tests/samples/test_target_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def test_record_with_missing_properties(
dedent(
"""\
INSERT INTO test_stream
(id, name)
("id", "name")
VALUES (:id, :name)""",
),
),
Expand Down

0 comments on commit 6f39c03

Please sign in to comment.