pub struct ReadSession {
pub name: String,
pub expire_time: Option<Timestamp>,
pub data_format: i32,
pub table: String,
pub table_modifiers: Option<TableModifiers>,
pub read_options: Option<TableReadOptions>,
pub streams: Vec<ReadStream>,
pub estimated_total_bytes_scanned: i64,
pub estimated_total_physical_file_size: i64,
pub estimated_row_count: i64,
pub trace_id: String,
pub schema: Option<Schema>,
}
Expand description
Information about the ReadSession.
Fields§
§name: String
Output only. Unique identifier for the session, in the form
projects/{project_id}/locations/{location}/sessions/{session_id}
.
expire_time: Option<Timestamp>
Output only. Time at which the session becomes invalid. After this time, subsequent requests to read this Session will return errors. The expire_time is automatically assigned and currently cannot be specified or updated.
data_format: i32
Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not supported.
table: String
Immutable. Table that this ReadSession is reading from, in the form
projects/{project_id}/datasets/{dataset_id}/tables/{table_id}
table_modifiers: Option<TableModifiers>
Optional. Any modifiers which are applied when reading from the specified table.
read_options: Option<TableReadOptions>
Optional. Read options for this session (e.g. column selection, filters).
streams: Vec<ReadStream>
Output only. A list of streams created with the session.
At least one stream is created with the session. In the future, larger request_stream_count values may result in this list being unpopulated, in that case, the user will need to use a List method to get the streams instead, which is not yet available.
estimated_total_bytes_scanned: i64
Output only. An estimate on the number of bytes this session will scan when all streams are completely consumed. This estimate is based on metadata from the table which might be incomplete or stale.
estimated_total_physical_file_size: i64
Output only. A pre-projected estimate of the total physical size of files (in bytes) that this session will scan when all streams are consumed. This estimate is independent of the selected columns and can be based on incomplete or stale metadata from the table. This field is only set for BigLake tables.
estimated_row_count: i64
Output only. An estimate on the number of rows present in this session’s streams. This estimate is based on metadata from the table which might be incomplete or stale.
trace_id: String
Optional. ID set by client to annotate a session identity. This does not need to be strictly unique, but instead the same ID should be used to group logically connected sessions (e.g. All using the same ID for all sessions needed to complete a Spark SQL query is reasonable).
Maximum length is 256 bytes.
schema: Option<Schema>
The schema for the read. If read_options.selected_fields is set, the schema may be different from the table schema as it will only contain the selected fields.
Implementations§
Source§impl ReadSession
impl ReadSession
Sourcepub fn data_format(&self) -> DataFormat
pub fn data_format(&self) -> DataFormat
Returns the enum value of data_format
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_data_format(&mut self, value: DataFormat)
pub fn set_data_format(&mut self, value: DataFormat)
Sets data_format
to the provided enum value.
Trait Implementations§
Source§impl Clone for ReadSession
impl Clone for ReadSession
Source§fn clone(&self) -> ReadSession
fn clone(&self) -> ReadSession
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ReadSession
impl Debug for ReadSession
Source§impl Default for ReadSession
impl Default for ReadSession
Source§impl Message for ReadSession
impl Message for ReadSession
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
.Source§impl PartialEq for ReadSession
impl PartialEq for ReadSession
impl StructuralPartialEq for ReadSession
Auto Trait Implementations§
impl Freeze for ReadSession
impl RefUnwindSafe for ReadSession
impl Send for ReadSession
impl Sync for ReadSession
impl Unpin for ReadSession
impl UnwindSafe for ReadSession
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
)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>
T
in a tonic::Request