Skip to content

Commit

Permalink
fix merge duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Payne committed Oct 20, 2022
1 parent 3f9aa9e commit fd1a7a6
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions singer_sdk/sinks/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,47 +228,6 @@ def key_properties(self) -> List[str]:
"""
return [self.conform_name(key, "column") for key in super().key_properties]

def process_batch(self, context: dict) -> None:
"""Process a batch with the given batch context.
Writes a batch to the SQL target. Developers may override this method
in order to provide a more efficient upload/upsert process.
Returns:
The fully qualified table name.
"""
return self.connector.get_fully_qualified_name(
table_name=self.table_name,
schema_name=self.schema_name,
db_name=self.database_name,
)

@property
def full_schema_name(self) -> str:
"""Return the fully qualified schema name.
Returns:
The fully qualified schema name.
"""
return self.connector.get_fully_qualified_name(
schema_name=self.schema_name, db_name=self.database_name
)

def setup(self) -> None:
"""Set up Sink.
This method is called on Sink creation, and creates the required Schema and
Table entities in the target database.
"""
if self.schema_name:
self.connector.prepare_schema(self.schema_name)
self.connector.prepare_table(
full_table_name=self.full_table_name,
schema=self.schema,
primary_keys=self.key_properties,
as_temp_table=False,
)

def process_batch(self, context: dict) -> None:
"""Process a batch with the given batch context.
Expand Down

0 comments on commit fd1a7a6

Please sign in to comment.