pub struct Sink {Show 26 fields
pub id: u32,
pub schema_id: u32,
pub database_id: u32,
pub name: String,
pub columns: Vec<ColumnCatalog>,
pub plan_pk: Vec<ColumnOrder>,
pub dependent_relations: Vec<u32>,
pub distribution_key: Vec<i32>,
pub downstream_pk: Vec<i32>,
pub sink_type: i32,
pub owner: u32,
pub properties: BTreeMap<String, String>,
pub definition: String,
pub connection_id: Option<u32>,
pub initialized_at_epoch: Option<u64>,
pub created_at_epoch: Option<u64>,
pub db_name: String,
pub sink_from_name: String,
pub stream_job_status: i32,
pub format_desc: Option<SinkFormatDesc>,
pub target_table: Option<u32>,
pub initialized_at_cluster_version: Option<String>,
pub created_at_cluster_version: Option<String>,
pub create_type: i32,
pub secret_refs: BTreeMap<String, SecretRef>,
pub original_target_columns: Vec<ColumnCatalog>,
}
Expand description
the catalog of the sink. There are two kind of schema here. The full schema is all columns
stored in the column
which is the sink executor/fragment’s output schema. The visible
schema contains the columns whose is_hidden
is false, which is the columns sink out to the
external system. The distribution key and all other keys are indexed in the full schema.
Fields§
§id: u32
§schema_id: u32
§database_id: u32
§name: String
§columns: Vec<ColumnCatalog>
§plan_pk: Vec<ColumnOrder>
Primary key derived from the SQL by the frontend.
dependent_relations: Vec<u32>
distribution_key: Vec<i32>
§downstream_pk: Vec<i32>
User-defined primary key indices for the upsert sink.
sink_type: i32
to be deprecated
owner: u32
§properties: BTreeMap<String, String>
§definition: String
§connection_id: Option<u32>
§initialized_at_epoch: Option<u64>
§created_at_epoch: Option<u64>
§db_name: String
§sink_from_name: String
§stream_job_status: i32
§format_desc: Option<SinkFormatDesc>
§target_table: Option<u32>
Target table id (only applicable for table sink)
initialized_at_cluster_version: Option<String>
Cluster version (tracked by git commit) when initialized/created
created_at_cluster_version: Option<String>
§create_type: i32
Whether it should use background ddl or block until backfill finishes.
secret_refs: BTreeMap<String, SecretRef>
Handle the sink relies on any sceret. The key is the propertity name and the value is the secret id and type. Used for connect options.
original_target_columns: Vec<ColumnCatalog>
only for the sink whose target is a table. Columns of the target table when the sink is created. At this point all the default columns of the target table are all handled by the project operator in the sink plan.
Implementations§
source§impl Sink
impl Sink
sourcepub fn sink_type(&self) -> SinkType
pub fn sink_type(&self) -> SinkType
Returns the enum value of sink_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_sink_type(&mut self, value: SinkType)
pub fn set_sink_type(&mut self, value: SinkType)
Sets sink_type
to the provided enum value.
sourcepub fn connection_id(&self) -> u32
pub fn connection_id(&self) -> u32
Returns the value of connection_id
, or the default value if connection_id
is unset.
sourcepub fn initialized_at_epoch(&self) -> u64
pub fn initialized_at_epoch(&self) -> u64
Returns the value of initialized_at_epoch
, or the default value if initialized_at_epoch
is unset.
sourcepub fn created_at_epoch(&self) -> u64
pub fn created_at_epoch(&self) -> u64
Returns the value of created_at_epoch
, or the default value if created_at_epoch
is unset.
sourcepub fn stream_job_status(&self) -> StreamJobStatus
pub fn stream_job_status(&self) -> StreamJobStatus
Returns the enum value of stream_job_status
, or the default if the field is set to an invalid enum value.
sourcepub fn set_stream_job_status(&mut self, value: StreamJobStatus)
pub fn set_stream_job_status(&mut self, value: StreamJobStatus)
Sets stream_job_status
to the provided enum value.
sourcepub fn target_table(&self) -> u32
pub fn target_table(&self) -> u32
Returns the value of target_table
, or the default value if target_table
is unset.
sourcepub fn initialized_at_cluster_version(&self) -> &str
pub fn initialized_at_cluster_version(&self) -> &str
Returns the value of initialized_at_cluster_version
, or the default value if initialized_at_cluster_version
is unset.
sourcepub fn created_at_cluster_version(&self) -> &str
pub fn created_at_cluster_version(&self) -> &str
Returns the value of created_at_cluster_version
, or the default value if created_at_cluster_version
is unset.
sourcepub fn create_type(&self) -> CreateType
pub fn create_type(&self) -> CreateType
Returns the enum value of create_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_create_type(&mut self, value: CreateType)
pub fn set_create_type(&mut self, value: CreateType)
Sets create_type
to the provided enum value.
source§impl Sink
impl Sink
pub fn get_id(&self) -> u32
pub fn get_schema_id(&self) -> u32
pub fn get_database_id(&self) -> u32
pub fn get_name(&self) -> &String
pub fn get_columns(&self) -> &Vec<ColumnCatalog>
pub fn get_plan_pk(&self) -> &Vec<ColumnOrder>
pub fn get_dependent_relations(&self) -> &Vec<u32>
pub fn get_distribution_key(&self) -> &Vec<i32>
pub fn get_downstream_pk(&self) -> &Vec<i32>
pub fn get_sink_type(&self) -> Result<SinkType, PbFieldNotFound>
pub fn get_owner(&self) -> u32
pub fn get_properties(&self) -> &BTreeMap<String, String>
pub fn get_definition(&self) -> &String
pub fn get_connection_id(&self) -> Result<&u32, PbFieldNotFound>
pub fn get_initialized_at_epoch(&self) -> Result<&u64, PbFieldNotFound>
pub fn get_created_at_epoch(&self) -> Result<&u64, PbFieldNotFound>
pub fn get_db_name(&self) -> &String
pub fn get_sink_from_name(&self) -> &String
pub fn get_stream_job_status(&self) -> Result<StreamJobStatus, PbFieldNotFound>
pub fn get_format_desc(&self) -> Result<&SinkFormatDesc, PbFieldNotFound>
pub fn get_target_table(&self) -> Result<&u32, PbFieldNotFound>
pub fn get_initialized_at_cluster_version( &self, ) -> Result<&String, PbFieldNotFound>
pub fn get_created_at_cluster_version(&self) -> Result<&String, PbFieldNotFound>
pub fn get_create_type(&self) -> Result<CreateType, PbFieldNotFound>
pub fn get_secret_refs(&self) -> &BTreeMap<String, SecretRef>
pub fn get_original_target_columns(&self) -> &Vec<ColumnCatalog>
source§impl Sink
impl Sink
pub const UNIQUE_IDENTITY_FOR_CREATING_TABLE_SINK: &'static str = "PLACE_HOLDER"
pub fn unique_identity(&self) -> String
Trait Implementations§
source§impl<'de> Deserialize<'de> for Sink
impl<'de> Deserialize<'de> for Sink
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 Message for Sink
impl Message for Sink
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.impl StructuralPartialEq for Sink
Auto Trait Implementations§
impl Freeze for Sink
impl RefUnwindSafe for Sink
impl Send for Sink
impl Sync for Sink
impl Unpin for Sink
impl UnwindSafe for Sink
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
T
in a tonic::Request