Package com.gpudb.protocol
Class CreateMaterializedViewRequest
java.lang.Object
com.gpudb.protocol.CreateMaterializedViewRequest
All Implemented Interfaces:
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecordpublic class CreateMaterializedViewRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters for
GPUdb.createMaterializedView.
Initiates the process of creating a materialized view, reserving the view’s name to prevent other views or tables from being created with that name.
For materialized view details and examples, see Materialized Views.
The response contains viewId, which is used to tag each subsequent operation (projection, union, aggregation, filter, or join) that will compose the view.
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA set of string constants for theCreateMaterializedViewRequestparameteroptions.Constructor Summary
ConstructorsConstructorDescriptionConstructs a CreateMaterializedViewRequest object with default parameters.CreateMaterializedViewRequest(String tableName, Map<String, String> options) Constructs a CreateMaterializedViewRequest object with the specified parameters.Method Summary
Modifier and TypeMethodDescriptionbooleanget(int index) This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.Optional parameters.org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.Name of the table to be created that is the top-level table of the materialized view, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria.inthashCode()voidThis method supports the Avro framework and is not intended to be called directly by the user.setOptions(Map<String, String> options) Optional parameters.setTableName(String tableName) Name of the table to be created that is the top-level table of the materialized view, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria.toString()
Constructor Details
CreateMaterializedViewRequest
public CreateMaterializedViewRequest()Constructs a CreateMaterializedViewRequest object with default parameters.CreateMaterializedViewRequest
Constructs a CreateMaterializedViewRequest object with the specified parameters.Parameters:tableName- Name of the table to be created that is the top-level table of the materialized view, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria.options- Optional parameters.COLLECTION_NAME: [DEPRECATED—please specify the containing schema for the materialized view as part oftableNameand useGPUdb.createSchemato create the schema if non-existent] Name of a schema which is to contain the newly created view. If the schema provided is non-existent, it will be automatically created.EXECUTE_AS: User name to use to run the refresh job.BUILD_MATERIALIZED_VIEW_POLICY: Sets startup materialized view rebuild scheme. Supported values:ALWAYS: Rebuild as many materialized views as possible before accepting requests.LAZY: Rebuild the necessary materialized views at start, and load the remainder lazily.ON_DEMAND: Rebuild materialized views as requests use them.SYSTEM: Rebuild materialized views using the system-configured default.
SYSTEM.PERSIST: IfTRUE, then the materialized view specified intableNamewill be persisted and will not expire unless aTTLis specified. IfFALSE, then the materialized view will be an in-memory table and will expire unless aTTLis specified otherwise. Supported values:The default value isFALSE.ENABLE_MV_INPUT_WRAPPERS: IfTRUE, each base table the view reads is accessed through a wrapper view so an in-progress out-of-place update cannot make a record momentarily disappear from the view, and a long refresh does not block updates to the base tables. Overrides the gaia.enable_mv_input_wrappers configuration default when set. Supported values:The default value isFALSE.REFRESH_SPAN: Sets the future time-offset(in seconds) at which periodic refresh stops.REFRESH_STOP_TIME: WhenREFRESH_METHODisPERIODIC, specifies the time at which a periodic refresh is stopped. Value is a datetime string with format ‘YYYY-MM-DD HH:MM:SS’.REFRESH_METHOD: Method by which the join can be refreshed when the data in underlying member tables have changed. Supported values:MANUAL: Refresh only occurs when manually requested by callingGPUdb.alterTablewith an ‘action’ of ‘refresh’.ON_QUERY: Refresh any time the view is queried.ON_CHANGE: If possible, incrementally refresh (refresh just those records added) whenever an insert, update, delete or refresh of input table is done. A full refresh is done if an incremental refresh is not possible.PERIODIC: Refresh table periodically at rate specified byREFRESH_PERIOD.
MANUAL.REFRESH_PERIOD: WhenREFRESH_METHODisPERIODIC, specifies the period in seconds at which refresh occurs.REFRESH_START_TIME: WhenREFRESH_METHODisPERIODIC, specifies the first time at which a refresh is to be done. Value is a datetime string with format ‘YYYY-MM-DD HH:MM:SS’.TTL: Sets the TTL of the table specified intableName.
Map.
Method Details
getClassSchema
public static org.apache.avro.Schema getClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.Returns:The schema for the class.getTableName
Name of the table to be created that is the top-level table of the materialized view, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria.Returns:The current value oftableName.setTableName
Name of the table to be created that is the top-level table of the materialized view, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria.Parameters:tableName- The new value fortableName.Returns:thisto mimic the builder pattern.getOptions
Optional parameters.COLLECTION_NAME: [DEPRECATED—please specify the containing schema for the materialized view as part oftableNameand useGPUdb.createSchemato create the schema if non-existent] Name of a schema which is to contain the newly created view. If the schema provided is non-existent, it will be automatically created.EXECUTE_AS: User name to use to run the refresh job.BUILD_MATERIALIZED_VIEW_POLICY: Sets startup materialized view rebuild scheme. Supported values:ALWAYS: Rebuild as many materialized views as possible before accepting requests.LAZY: Rebuild the necessary materialized views at start, and load the remainder lazily.ON_DEMAND: Rebuild materialized views as requests use them.SYSTEM: Rebuild materialized views using the system-configured default.
SYSTEM.PERSIST: IfTRUE, then the materialized view specified intableNamewill be persisted and will not expire unless aTTLis specified. IfFALSE, then the materialized view will be an in-memory table and will expire unless aTTLis specified otherwise. Supported values:The default value isFALSE.ENABLE_MV_INPUT_WRAPPERS: IfTRUE, each base table the view reads is accessed through a wrapper view so an in-progress out-of-place update cannot make a record momentarily disappear from the view, and a long refresh does not block updates to the base tables. Overrides the gaia.enable_mv_input_wrappers configuration default when set. Supported values:The default value isFALSE.REFRESH_SPAN: Sets the future time-offset(in seconds) at which periodic refresh stops.REFRESH_STOP_TIME: WhenREFRESH_METHODisPERIODIC, specifies the time at which a periodic refresh is stopped. Value is a datetime string with format ‘YYYY-MM-DD HH:MM:SS’.REFRESH_METHOD: Method by which the join can be refreshed when the data in underlying member tables have changed. Supported values:MANUAL: Refresh only occurs when manually requested by callingGPUdb.alterTablewith an ‘action’ of ‘refresh’.ON_QUERY: Refresh any time the view is queried.ON_CHANGE: If possible, incrementally refresh (refresh just those records added) whenever an insert, update, delete or refresh of input table is done. A full refresh is done if an incremental refresh is not possible.PERIODIC: Refresh table periodically at rate specified byREFRESH_PERIOD.
MANUAL.REFRESH_PERIOD: WhenREFRESH_METHODisPERIODIC, specifies the period in seconds at which refresh occurs.REFRESH_START_TIME: WhenREFRESH_METHODisPERIODIC, specifies the first time at which a refresh is to be done. Value is a datetime string with format ‘YYYY-MM-DD HH:MM:SS’.TTL: Sets the TTL of the table specified intableName.
Map.Returns:The current value ofoptions.setOptions
Optional parameters.COLLECTION_NAME: [DEPRECATED—please specify the containing schema for the materialized view as part oftableNameand useGPUdb.createSchemato create the schema if non-existent] Name of a schema which is to contain the newly created view. If the schema provided is non-existent, it will be automatically created.EXECUTE_AS: User name to use to run the refresh job.BUILD_MATERIALIZED_VIEW_POLICY: Sets startup materialized view rebuild scheme. Supported values:ALWAYS: Rebuild as many materialized views as possible before accepting requests.LAZY: Rebuild the necessary materialized views at start, and load the remainder lazily.ON_DEMAND: Rebuild materialized views as requests use them.SYSTEM: Rebuild materialized views using the system-configured default.
SYSTEM.PERSIST: IfTRUE, then the materialized view specified intableNamewill be persisted and will not expire unless aTTLis specified. IfFALSE, then the materialized view will be an in-memory table and will expire unless aTTLis specified otherwise. Supported values:The default value isFALSE.ENABLE_MV_INPUT_WRAPPERS: IfTRUE, each base table the view reads is accessed through a wrapper view so an in-progress out-of-place update cannot make a record momentarily disappear from the view, and a long refresh does not block updates to the base tables. Overrides the gaia.enable_mv_input_wrappers configuration default when set. Supported values:The default value isFALSE.REFRESH_SPAN: Sets the future time-offset(in seconds) at which periodic refresh stops.REFRESH_STOP_TIME: WhenREFRESH_METHODisPERIODIC, specifies the time at which a periodic refresh is stopped. Value is a datetime string with format ‘YYYY-MM-DD HH:MM:SS’.REFRESH_METHOD: Method by which the join can be refreshed when the data in underlying member tables have changed. Supported values:MANUAL: Refresh only occurs when manually requested by callingGPUdb.alterTablewith an ‘action’ of ‘refresh’.ON_QUERY: Refresh any time the view is queried.ON_CHANGE: If possible, incrementally refresh (refresh just those records added) whenever an insert, update, delete or refresh of input table is done. A full refresh is done if an incremental refresh is not possible.PERIODIC: Refresh table periodically at rate specified byREFRESH_PERIOD.
MANUAL.REFRESH_PERIOD: WhenREFRESH_METHODisPERIODIC, specifies the period in seconds at which refresh occurs.REFRESH_START_TIME: WhenREFRESH_METHODisPERIODIC, specifies the first time at which a refresh is to be done. Value is a datetime string with format ‘YYYY-MM-DD HH:MM:SS’.TTL: Sets the TTL of the table specified intableName.
Map.Parameters:options- The new value foroptions.Returns:thisto mimic the builder pattern.getSchema
public org.apache.avro.Schema getSchema()This method supports the Avro framework and is not intended to be called directly by the user.Specified by:getSchemain interfaceorg.apache.avro.generic.GenericContainerReturns:The schema object describing this class.get
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:getin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to getReturns:value of the field with the given index.Throws:put
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:putin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to setvalue- the value to setThrows: