An engineer is writing a nightly job that applies a generative step to every row of a very large table with aiquery. Worried about throughput, they plan to split the table into many small batches by primary-key range and drive one aiquery statement per batch from an orchestrator, and to point the calls at a provisioned throughput endpoint they will create for the job. What does the Databricks guidance actually recommend here?
- A.
Keep the provisioned throughput endpoint but run one statement per batch on a dedicated job cluster sized to the batch count.
- B.
Replace ai_query with individual REST calls to the serving endpoint so that the orchestrator can control the concurrency directly.
- C.
Submit the full dataset in a single query against a Databricks-hosted foundation model, letting AI Functions handle parallelism, retries and scaling.
- D.
Keep the manual batching but move to a Databricks-hosted foundation model, because the split is what provides the parallelism.
Show answer
Answer: C
Submit the whole dataset in one query on a Databricks-hosted foundation model and let AI Functions manage scaling.
- A. Provisioned throughput is not the recommended target for ai_query batch work, and per-batch statements remain discouraged.
- B. Hand-built REST concurrency discards the automatic retry and scaling behaviour that AI Functions provide.
- C. This matches both documented recommendations: one query over the full dataset against a Databricks-hosted foundation model.
- D. The manual split is the part the guidance argues against; AI Functions already parallelise the work.
