pub async fn create_state_table( &self, table_name: String, input_table_name: String, init_table_name: String, ) -> Result<CreateStateTableResponse, KineticaError>
Create a table that holds materialized view state
Creates a state table in a materialized view allowing a materialized view to maintain state between refreshes. The state table must be a materialized view member. The state table can be part of a feedback loop including input_table_name. To facilitate such feedback loops the create_state_table can be called before the input_table_name is created but must be created after init_table_name is created. During the initial call to create the state table init_table_name is copied to table_name, setting the initial state output of the table. On refresh the create_state_table runs before the endpoint that creates the input_table_name and copies the input_table_name to table_name, setting the state to the version of the input_table from the last refresh. A materialized view is not complete (ready to refresh and query) until both the root table of the view is created and all the input tables to the state tables have been created.
table_name- Name of the table to be created.input_table_name- Name of the input table to be copied to the output table on refresh.init_table_name- Name of the initialization table to be copied to the output table during materialized view creation.
pub async fn create_state_table_with_opts( &self, table_name: String, input_table_name: String, init_table_name: String, options: CreateStateTableRequestOptions, ) -> Result<CreateStateTableResponse, KineticaError>
Create a table that holds materialized view state
Creates a state table in a materialized view allowing a materialized view to maintain state between refreshes. The state table must be a materialized view member. The state table can be part of a feedback loop including input_table_name. To facilitate such feedback loops the create_state_table can be called before the input_table_name is created but must be created after init_table_name is created. During the initial call to create the state table init_table_name is copied to table_name, setting the initial state output of the table. On refresh the create_state_table runs before the endpoint that creates the input_table_name and copies the input_table_name to table_name, setting the state to the version of the input_table from the last refresh. A materialized view is not complete (ready to refresh and query) until both the root table of the view is created and all the input tables to the state tables have been created.
table_name- Name of the table to be created.input_table_name- Name of the input table to be copied to the output table on refresh.init_table_name- Name of the initialization table to be copied to the output table during materialized view creation.options- The optional parameters; any left unset take the server’s defaults.
pub async fn create_state_table_raw( &self, request: &CreateStateTableRequest, ) -> Result<CreateStateTableResponse, KineticaError>
Sends a pre-built CreateStateTableRequest to the /create/statetable endpoint.
pub async fn create_state_table_from_url( &self, url: &str, request: &CreateStateTableRequest, ) -> Result<CreateStateTableResponse, KineticaError>
Sends a pre-built CreateStateTableRequest to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.