Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
tox formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
radbrt committed Nov 28, 2022
1 parent e460626 commit eb95480
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
13 changes: 3 additions & 10 deletions target_mssql/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def create_table_with_records(
if primary_keys is None:
primary_keys = self.key_properties
partition_keys = partition_keys or None

self.connector.prepare_table(
full_table_name=full_table_name,
primary_keys=primary_keys,
Expand Down Expand Up @@ -116,19 +116,12 @@ def create_empty_table(
if is_primary_key:
columns.append(
sqlalchemy.Column(
property_name,
columntype,
primary_key=True,
autoincrement=False
property_name, columntype, primary_key=True, autoincrement=False
)
)
else:
columns.append(
sqlalchemy.Column(
property_name,
columntype,
primary_key=False
)
sqlalchemy.Column(property_name, columntype, primary_key=False)
)

_ = sqlalchemy.Table(table_name, meta, *columns, schema=schema_name)
Expand Down
4 changes: 2 additions & 2 deletions target_mssql/sinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def bulk_insert_records(
full_table_name: str,
schema: dict,
records: Iterable[Dict[str, Any]],
is_temp_table: bool = False
is_temp_table: bool = False,
) -> Optional[int]:
"""Bulk insert records to an existing destination table.
The default implementation uses a generic SQLAlchemy bulk insert operation.
Expand Down Expand Up @@ -226,7 +226,7 @@ def merge_upsert_from_table(
"""

self.connection.execute(merge_sql)

self.connection.execute("COMMIT")

def parse_full_table_name(
Expand Down

0 comments on commit eb95480

Please sign in to comment.