Skip to content

Commit 899bafd

Browse files
committed
fix(dlt): always use destination_client for connection config
The dlt destination-client selection gated the 1.10.0 API change with a string comparison (`dlt.__version__ >= "1.10.0"`). String comparison is lexicographic, so it wrongly evaluated "1.9.0" >= "1.10.0" (and "1.2.0", "1.5.10", ...) as True, sending every 1.x version down the >=1.10.0 branch. `destination_client()` is the public accessor on every realistically supported dlt version, and the pre-1.10 `_sql_job_client` fallback was already unreachable because of the same string-compare bug, so drop the version gate and always use `destination_client()`. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
1 parent aebfac9 commit 899bafd

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

sqlmesh/integrations/dlt.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ def generate_dlt_models_and_settings(
6363
if db_type == "filesystem":
6464
connection_config = None
6565
else:
66-
if dlt.__version__ >= "1.10.0":
67-
client = pipeline.destination_client()
68-
else:
69-
client = pipeline._sql_job_client(schema) # type: ignore
66+
client = pipeline.destination_client()
7067
config = client.config
7168
credentials = config.credentials
7269
configs = {

0 commit comments

Comments
 (0)