Skip to content

Commit 5fab504

Browse files
committed
add to base sl client && plumbing
1 parent a2bd83d commit 5fab504

File tree

8 files changed

+11
-2
lines changed

8 files changed

+11
-2
lines changed

dbtsl/api/graphql/client/asyncio.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class AsyncGraphQLClient:
2222
auth_token: str,
2323
url_format: Optional[str] = None,
2424
timeout: Optional[Union[TimeoutOptions, float, int]] = None,
25+
client_partner_source: Optional[str] = None,
2526
) -> None: ...
2627
def session(self) -> AbstractAsyncContextManager[AsyncIterator[Self]]: ...
2728
@property

dbtsl/api/graphql/client/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ def __call__(
146146
auth_token: str,
147147
url_format: Optional[str] = None,
148148
timeout: Optional[Union[TimeoutOptions, float, int]] = None,
149+
client_partner_source: Optional[str] = None,
149150
) -> TClient:
150151
"""Initialize the Semantic Layer client.
151152
@@ -155,5 +156,6 @@ def __call__(
155156
auth_token: the API auth token
156157
url_format: the URL format string to construct the final URL with
157158
timeout: `TimeoutOptions` or total timeout
159+
client_partner_source: Pass a dbt partner source header for traffic source tracking
158160
"""
159161
pass

dbtsl/api/graphql/client/sync.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class SyncGraphQLClient:
2222
auth_token: str,
2323
url_format: Optional[str] = None,
2424
timeout: Optional[Union[TimeoutOptions, float, int]] = None,
25+
client_partner_source: Optional[str] = None,
2526
) -> None: ...
2627
def session(self) -> AbstractContextManager[Iterator[Self]]: ...
2728
@property

dbtsl/client/asyncio.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def __init__(
2626
auth_token: str,
2727
host: str,
2828
timeout: Optional[Union[TimeoutOptions, float, int]] = None,
29+
client_partner_source: Optional[str] = None,
2930
) -> None:
3031
"""Initialize the Semantic Layer client.
3132

dbtsl/client/asyncio.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class AsyncSemanticLayerClient:
1515
auth_token: str,
1616
host: str,
1717
timeout: Optional[Union[TimeoutOptions, float, int]] = None,
18+
client_partner_source: Optional[str] = None,
1819
) -> None: ...
1920
@overload
2021
async def compile_sql(

dbtsl/client/base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(
4040
gql_factory: GraphQLClientFactory[TGQLClient],
4141
adbc_factory: ADBCClientFactory[TADBCClient],
4242
timeout: Optional[Union[TimeoutOptions, float, int]] = None,
43-
requests_headers: Optional[dict[str, str]] = None,
43+
client_partner_source: Optional[str] = None,
4444
) -> None:
4545
"""Initialize the Semantic Layer client.
4646
@@ -51,7 +51,7 @@ def __init__(
5151
gql_factory: class of the underlying GQL client
5252
adbc_factory: class of the underlying ADBC client
5353
timeout: `TimeoutOptions` or total timeout for the underlying GraphQL client.
54-
requests_headers: additional headers to pass to the requests, optional
54+
client_partner_source: Pass a dbt partner source header for traffic source tracking
5555
"""
5656
self._has_session = False
5757

@@ -63,6 +63,7 @@ def __init__(
6363
auth_token=auth_token,
6464
url_format=env.GRAPHQL_URL_FORMAT,
6565
timeout=timeout,
66+
client_partner_source=client_partner_source,
6667
)
6768
self._adbc = adbc_factory(
6869
server_host=host,

dbtsl/client/sync.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def __init__(
2626
auth_token: str,
2727
host: str,
2828
timeout: Optional[Union[TimeoutOptions, float, int]] = None,
29+
client_partner_source: Optional[str] = None,
2930
) -> None:
3031
"""Initialize the Semantic Layer client.
3132

dbtsl/client/sync.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class SyncSemanticLayerClient:
1515
auth_token: str,
1616
host: str,
1717
timeout: Optional[Union[TimeoutOptions, float, int]] = None,
18+
client_partner_source: Optional[str] = None,
1819
) -> None: ...
1920
@overload
2021
def compile_sql(

0 commit comments

Comments
 (0)