pub struct OfflineQueryParams { /* private fields */ }Expand description
Builder for offline query parameters.
§Examples
use chalk_client::OfflineQueryParams;
use serde_json::json;
let params = OfflineQueryParams::new()
.with_input("user.id", vec![json!(1), json!(2), json!(3)])
.with_output("user.email")
.with_output("user.ltv")
.with_num_shards(4);Implementations§
Source§impl OfflineQueryParams
impl OfflineQueryParams
Sourcepub fn from_uri(parquet_uri: impl Into<String>) -> Self
pub fn from_uri(parquet_uri: impl Into<String>) -> Self
Create a builder that reads input from a Parquet file at the given URI.
Sourcepub fn from_uri_with_range(
parquet_uri: impl Into<String>,
start_row: Option<i64>,
end_row: Option<i64>,
) -> Self
pub fn from_uri_with_range( parquet_uri: impl Into<String>, start_row: Option<i64>, end_row: Option<i64>, ) -> Self
Create a builder that reads input from a Parquet URI with row range.
Sourcepub fn from_sql(input_sql: impl Into<String>) -> Self
pub fn from_sql(input_sql: impl Into<String>) -> Self
Create a builder that generates input data from a SQL query.
Sourcepub fn with_input(self, feature: impl Into<String>, values: Vec<Value>) -> Self
pub fn with_input(self, feature: impl Into<String>, values: Vec<Value>) -> Self
Add an input column with values.
Sourcepub fn with_input_times(self, times: Vec<DateTime<Utc>>) -> Self
pub fn with_input_times(self, times: Vec<DateTime<Utc>>) -> Self
Set per-row observation timestamps.
Sourcepub fn with_output(self, feature: impl Into<String>) -> Self
pub fn with_output(self, feature: impl Into<String>) -> Self
Add a feature to the output list.
Sourcepub fn with_required_output(self, feature: impl Into<String>) -> Self
pub fn with_required_output(self, feature: impl Into<String>) -> Self
Add a feature to the required output list.
pub fn with_destination_format(self, format: impl Into<String>) -> Self
pub fn with_job_id(self, id: impl Into<String>) -> Self
pub fn with_max_samples(self, n: i64) -> Self
pub fn with_max_cache_age_secs(self, secs: i64) -> Self
pub fn with_observed_at_lower_bound(self, bound: impl Into<String>) -> Self
pub fn with_observed_at_upper_bound(self, bound: impl Into<String>) -> Self
pub fn with_dataset_name(self, name: impl Into<String>) -> Self
pub fn with_branch(self, branch: impl Into<String>) -> Self
pub fn with_recompute_features(self, recompute: Value) -> Self
pub fn with_correlation_id(self, id: impl Into<String>) -> Self
pub fn with_store_online(self, store: bool) -> Self
pub fn with_store_offline(self, store: bool) -> Self
pub fn with_run_asynchronously(self, async_: bool) -> Self
pub fn with_num_shards(self, n: i64) -> Self
pub fn with_num_workers(self, n: i64) -> Self
pub fn with_resources(self, resources: ResourceRequests) -> Self
pub fn with_completion_deadline(self, deadline: impl Into<String>) -> Self
pub fn with_max_retries(self, n: i64) -> Self
pub fn with_store_plan_stages(self, store: bool) -> Self
pub fn with_explain(self, explain: bool) -> Self
pub fn with_planner_options(self, options: HashMap<String, Value>) -> Self
pub fn with_query_context(self, context: HashMap<String, Value>) -> Self
pub fn with_spine_sql_query(self, sql: impl Into<String>) -> Self
pub fn with_query_name(self, name: impl Into<String>) -> Self
pub fn with_query_name_version(self, version: impl Into<String>) -> Self
Sourcepub fn build(self) -> Result<OfflineQueryRequest>
pub fn build(self) -> Result<OfflineQueryRequest>
Build the OfflineQueryRequest.
Trait Implementations§
Source§impl Clone for OfflineQueryParams
impl Clone for OfflineQueryParams
Source§fn clone(&self) -> OfflineQueryParams
fn clone(&self) -> OfflineQueryParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OfflineQueryParams
impl Debug for OfflineQueryParams
Auto Trait Implementations§
impl Freeze for OfflineQueryParams
impl RefUnwindSafe for OfflineQueryParams
impl Send for OfflineQueryParams
impl Sync for OfflineQueryParams
impl Unpin for OfflineQueryParams
impl UnsafeUnpin for OfflineQueryParams
impl UnwindSafe for OfflineQueryParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request