diff --git a/singer_sdk/connectors/sql.py b/singer_sdk/connectors/sql.py index b980e4104..26ecde9ab 100644 --- a/singer_sdk/connectors/sql.py +++ b/singer_sdk/connectors/sql.py @@ -1002,7 +1002,7 @@ def prepare_primary_key( _, schema_name, table_name = self.parse_full_table_name(full_table_name) meta = sa.MetaData(schema=schema_name) meta.reflect(bind=self._engine, only=[table_name]) - table = meta.tables[f"{schema_name}.{table_name}"] + table = meta.tables[full_table_name] current_pk_cols = [col.name for col in table.primary_key.columns] # Nothing to do