feat: make user agent customizable (#32506)

This commit is contained in:
Ville Brofeldt
2025-03-05 16:33:24 -08:00
committed by GitHub
parent 8decc9e45f
commit c90e45a373
18 changed files with 101 additions and 42 deletions

View File

@@ -459,7 +459,7 @@ class BigQueryEngineSpec(BaseEngineSpec): # pylint: disable=too-many-public-met
:param sql: SQL query with possibly multiple statements
:param source: Source of the query (eg, "sql_lab")
"""
extra = database.get_extra() or {}
extra = database.get_extra(source) or {}
if not cls.get_allow_cost_estimate(extra):
raise SupersetException("Database does not support cost estimation")
@@ -469,6 +469,7 @@ class BigQueryEngineSpec(BaseEngineSpec): # pylint: disable=too-many-public-met
database,
catalog=catalog,
schema=schema,
source=source,
) as engine:
client = cls._get_client(engine, database)
return [