<#2909 bug: Incorrect table name resolved if strea...
# meltano-repo-activity
g
#2909 bug: Incorrect table name resolved if stream name is hyphenated Issue created by ReubenFrankel ### Singer SDK Version 0.44.3 ### Is this a regression? • Yes ### Python Version NA ### Bug scope Targets (data type handling, batching, SQL object generation, etc.) ### Operating System No response ### Description For SQL targets, if a stream name is hyphenated it is assumed to be fully-qualified and the part after the last hyphen is taken as the table name. In our case, we have a tap stream name of
tap_bigquery-weekly_fuel_prices
and expect a table of name in similar shape to be created in Snowflake - instead,
weekly_fuel_prices
is resolved which is not desirable is our case. Is there a reason for this behaviour? sdk/singer_sdk/sinks/sql.py Lines 76 to 85 in</meltano/sdk/commit/881ffd2041c9eca9c50a5e94ffe61a121579ef61|881ffd2> | @property | | ---------------------------------------------------------- | | def table_name(self) -> str: | | """Return the table name, with no schema or database part. | | | | Returns: | | The target table name. | | """ | | parts = self.stream_name.split("-") | | table = self.stream_name if len(parts) == 1 else parts[-1] | | return self.conform_name(table, "table") | ### Link to Slack/Linen No response meltano/sdk