#[non_exhaustive]pub struct SourceEnvironment {
pub default_database: String,
pub schema_search_path: Vec<String>,
pub metadata_store_dataset: String,
/* private fields */
}Expand description
Represents the default source environment values for the translation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.default_database: StringThe default database name to fully qualify SQL objects when their database name is missing.
schema_search_path: Vec<String>The schema search path. When SQL objects are missing schema name, translation engine will search through this list to find the value.
metadata_store_dataset: StringOptional. Expects a validQ BigQuery dataset ID that exists, e.g., project-123.metadata_store_123. If specified, translation will search and read the required schema information from a metadata store in this dataset. If metadata store doesn’t exist, translation will parse the metadata file and upload the schema info to a temp table in the dataset to speed up future translation jobs.
Implementations§
Source§impl SourceEnvironment
impl SourceEnvironment
pub fn new() -> Self
Sourcepub fn set_default_database<T: Into<String>>(self, v: T) -> Self
pub fn set_default_database<T: Into<String>>(self, v: T) -> Self
Sets the value of default_database.
§Example
let x = SourceEnvironment::new().set_default_database("example");Sourcepub fn set_schema_search_path<T, V>(self, v: T) -> Self
pub fn set_schema_search_path<T, V>(self, v: T) -> Self
Sets the value of schema_search_path.
§Example
let x = SourceEnvironment::new().set_schema_search_path(["a", "b", "c"]);Sourcepub fn set_metadata_store_dataset<T: Into<String>>(self, v: T) -> Self
pub fn set_metadata_store_dataset<T: Into<String>>(self, v: T) -> Self
Sets the value of metadata_store_dataset.
§Example
let x = SourceEnvironment::new().set_metadata_store_dataset("example");Trait Implementations§
Source§impl Clone for SourceEnvironment
impl Clone for SourceEnvironment
Source§fn clone(&self) -> SourceEnvironment
fn clone(&self) -> SourceEnvironment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more