Skip to main content

Source

Struct Source 

Source
pub struct Source {
Show 17 fields pub name: Option<Loose<String>>, pub description: Option<Loose<Text>>, pub database: Option<Loose<Text>>, pub schema: Option<Loose<Text>>, pub profile: Option<Loose<Text>>, pub quoting: Option<Loose<Quoting>>, pub tags: Option<Loose<Tags>>, pub meta: Option<Loose<Meta>>, pub tables: Option<Loose<Option<Vec<TableItem>>>>, pub loader: Option<IgnoredAny>, pub loaded_at_field: Option<IgnoredAny>, pub loaded_at_query: Option<IgnoredAny>, pub config: Option<IgnoredAny>, pub overrides: Option<IgnoredAny>, pub freshness: Option<IgnoredAny>, pub docs: Option<IgnoredAny>, pub unknown: UnknownKeys,
}
Expand description

A source: tables in one schema of one system.

Fields§

§name: Option<Loose<String>>

The source’s name, the first argument of source(). Unique in the project.

§description: Option<Loose<Text>>

What the source is.

§database: Option<Loose<Text>>

The database (catalog). Set: source() renders database.schema.table; unset: schema.table. May use Jinja with var(), env_var(), run.* and target.name.

§schema: Option<Loose<Text>>

The schema; the source’s name unless set. May use Jinja with var(), env_var(), run.* and target.name.

§profile: Option<Loose<Text>>

DRE’s addition: the connection (in profiles.yml) the source lives on. A query using the source runs there; it overrides the report’s, Set’s, folder’s and project’s default. Unset: the source runs wherever its query runs. May use Jinja with var(), env_var(), run.* and target.name.

§quoting: Option<Loose<Quoting>>§tags: Option<Loose<Tags>>§meta: Option<Loose<Meta>>§tables: Option<Loose<Option<Vec<TableItem>>>>

The source’s tables.

§loader: Option<IgnoredAny>

A dbt key DRE accepts but doesn’t use yet (noted by dre validate).

§loaded_at_field: Option<IgnoredAny>

A dbt key DRE accepts but doesn’t use yet (noted by dre validate).

§loaded_at_query: Option<IgnoredAny>

A dbt key DRE accepts but doesn’t use yet (noted by dre validate).

§config: Option<IgnoredAny>

A dbt key DRE accepts but doesn’t use yet (noted by dre validate).

§overrides: Option<IgnoredAny>

A dbt key DRE accepts but doesn’t use yet (noted by dre validate).

§freshness: Option<IgnoredAny>

A dbt key DRE accepts but doesn’t use yet (noted by dre validate).

§docs: Option<IgnoredAny>

A dbt key DRE accepts but doesn’t use yet (noted by dre validate).

§unknown: UnknownKeys

Implementations§

Source§

impl Source

Source

pub fn dbt_keys(&self) -> Vec<&'static str>

The dbt keys it sets that DRE doesn’t use yet.

Trait Implementations§

Source§

impl<'de> Deserialize<'de> for Source

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for Source

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.