Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(targets): Quote column names in INSERT statement #2198

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion singer_sdk/sinks/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def generate_insert_statement(
statement = dedent(
f"""\
INSERT INTO {full_table_name}
({", ".join(property_names)})
({", ".join([f'"{name}"' for name in property_names])})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not typically a python developer, but that change looks to be easy enough. I'll make sure to get those tests fixed up too.

VALUES ({", ".join([f":{name}" for name in property_names])})
""", # noqa: S608
)
Expand Down
Loading