Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,22 @@ def _get_sql_processor(
Get sql processor for processing queries
"""
catalog_provider = CatalogProvider(configured_catalog)

if self._is_motherduck(db_path):
airbyte_version = os.getenv("AIRBYTE_VERSION")
custom_user_agent = f"airbyte/{airbyte_version}" if airbyte_version else "airbyte"

edition = os.getenv("AIRBYTE_EDITION")
custom_user_agent = f"{custom_user_agent}({edition})" if edition else custom_user_agent

return MotherDuckSqlProcessor(
sql_config=MotherDuckConfig(
schema_name=schema_name,
table_prefix=table_prefix,
db_path=db_path,
database=urlparse(db_path).path,
api_key=SecretString(motherduck_token),
custom_user_agent=custom_user_agent,
),
catalog_provider=catalog_provider,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ data:
connectorSubtype: database
connectorType: destination
definitionId: 042ee9b5-eb98-4e99-a4e5-3f0d573bee66
dockerImageTag: 0.2.0
dockerImageTag: 0.2.1
dockerRepository: airbyte/destination-motherduck
githubIssueLabel: destination-motherduck
icon: duckdb.svg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "airbyte-destination-motherduck"
version = "0.2.0"
version = "0.2.1"
description = "Destination implementation for MotherDuck."
authors = ["Guen Prawiroatmodjo, Simon Späti, Airbyte"]
license = "ELv2"
Expand Down
Loading