Skip to content

Commit 1405eff

Browse files
authored
Propagate namespace to create_ingestion_dag (#307)
This ensure the user's passed namespace is used for DAGs as expected. Without this the user will unexpectedly use the account default namespace.
1 parent 86f6730 commit 1405eff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apis/python/src/tiledb/vector_search/ingestion.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1891,6 +1891,7 @@ def create_ingestion_dag(
18911891
trace_id: Optional[str] = None,
18921892
use_sklearn: bool = True,
18931893
mode: Mode = Mode.LOCAL,
1894+
namespace: Optional[str] = None
18941895
) -> dag.DAG:
18951896
if mode == Mode.BATCH:
18961897
d = dag.DAG(
@@ -1901,14 +1902,15 @@ def create_ingestion_dag(
19011902
limit=1,
19021903
retry_policy="Always",
19031904
),
1905+
namespace=namespace
19041906
)
19051907
threads = 16
19061908
else:
19071909
d = dag.DAG(
19081910
name="vector-ingestion",
19091911
mode=Mode.REALTIME,
19101912
max_workers=workers,
1911-
namespace="default",
1913+
namespace=namespace,
19121914
)
19131915
threads = multiprocessing.cpu_count()
19141916

@@ -2511,6 +2513,7 @@ def consolidate_and_vacuum(
25112513
trace_id=trace_id,
25122514
use_sklearn=use_sklearn,
25132515
mode=mode,
2516+
namespace=namespace,
25142517
)
25152518
logger.debug("Submitting ingestion graph")
25162519
d.compute()

0 commit comments

Comments
 (0)