pub struct DatabricksSourceConfig {Show 15 fields
pub workspace_url: String,
pub warehouse_id: String,
pub sql: String,
pub auth: AuthSpec<DatabricksAuth>,
pub catalog: Option<String>,
pub schema: Option<String>,
pub parameters: Vec<DatabricksParam>,
pub wait_timeout_secs: u64,
pub poll_interval_secs: u64,
pub statement_timeout_secs: u64,
pub batch_size: usize,
pub arrow_native: bool,
pub result_disposition: ResultDisposition,
pub replication: DatabricksReplication,
pub state_key: Option<String>,
}Expand description
Configuration for the Databricks SQL query source.
Runs sql against a Databricks SQL Warehouse via the Statement Execution
REST API and streams the result rows as typed JSON objects.
Fields§
§workspace_url: StringWorkspace base URL, e.g. https://dbc-abc123.cloud.databricks.com.
warehouse_id: StringTarget SQL Warehouse id.
sql: StringThe SQL statement to run. May contain :name parameter markers (see
parameters) and a ${bookmark} token for
incremental replication.
auth: AuthSpec<DatabricksAuth>Authentication (PAT / OAuth bearer), inline or via a shared auth: { ref }.
catalog: Option<String>Default Unity Catalog catalog for the statement.
schema: Option<String>Default schema for the statement.
parameters: Vec<DatabricksParam>Named SQL parameters (:name markers).
wait_timeout_secs: u64Server-side wait before the statement goes async (seconds). Databricks
accepts 0 (fully async) or 5–50. Defaults to 50.
poll_interval_secs: u64Client poll cadence while the statement is PENDING/RUNNING (seconds).
statement_timeout_secs: u64Client deadline for the statement to finish, in seconds; on expiry it is
cancelled and the read fails. 0 waits indefinitely. Defaults to 3600.
batch_size: usizePage size — rows accumulated before a StreamPage is emitted.
Defaults to DEFAULT_BATCH_SIZE.
batch_size = 0 is the “no batching” sentinel: result chunks are fully
drained and the entire result set is emitted in a single page. Useful
for small lookup tables or for sinks (e.g. SQL COPY, BigQuery load
jobs) that prefer one large request to many small ones.
arrow_native: boolFetch results as Apache Arrow instead of JSON. When true, the
statement is submitted with EXTERNAL_LINKS disposition +
ARROW_STREAM format; each chunk’s presigned link is fetched and
decoded as an Arrow IPC stream. This enables the columnar fast path
(Source::stream_batches) so a
databricks → parquet/delta chain skips the per-cell JSON decode.
Requires the crate-local arrow feature, and (in this release) only
DatabricksReplication::Full — the columnar path does not run the
per-row client-side incremental filter. Defaults to false (the
INLINE + JSON_ARRAY row path, unchanged). RFC 0002 / #375.
result_disposition: ResultDispositionHow the row path fetches results: external_links (default) downloads
each chunk from a presigned URL, so results of any size stream;
inline keeps them in the API response, which Databricks caps at
25 MiB. Use inline only when the client cannot reach the workspace’s
cloud storage.
replication: DatabricksReplicationReplication mode. Defaults to DatabricksReplication::Full.
state_key: Option<String>Explicit state-store key for the incremental bookmark. When unset, a key is derived from the workspace/warehouse and a query fingerprint.
Implementations§
Source§impl DatabricksSourceConfig
impl DatabricksSourceConfig
Sourcepub fn validate(&self) -> Result<(), FaucetError>
pub fn validate(&self) -> Result<(), FaucetError>
Validate the config; returns a human-readable error if invalid.
Trait Implementations§
Source§impl Clone for DatabricksSourceConfig
impl Clone for DatabricksSourceConfig
Source§impl<'de> Deserialize<'de> for DatabricksSourceConfig
impl<'de> Deserialize<'de> for DatabricksSourceConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for DatabricksSourceConfig
impl JsonSchema for DatabricksSourceConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more