public class CreateMaterializedViewRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.createMaterializedView(CreateMaterializedViewRequest)
.
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.
Modifier and Type | Class and Description |
---|---|
static class |
CreateMaterializedViewRequest.Options
Optional parameters.
|
Constructor and Description |
---|
CreateMaterializedViewRequest()
Constructs a CreateMaterializedViewRequest object with default
parameters.
|
CreateMaterializedViewRequest(String tableName,
Map<String,String> options)
Constructs a CreateMaterializedViewRequest object with the specified
parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Object |
get(int index)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
static org.apache.avro.Schema |
getClassSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
Map<String,String> |
getOptions() |
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
String |
getTableName() |
int |
hashCode() |
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
CreateMaterializedViewRequest |
setOptions(Map<String,String> options) |
CreateMaterializedViewRequest |
setTableName(String tableName) |
String |
toString() |
public CreateMaterializedViewRequest()
public CreateMaterializedViewRequest(String tableName, Map<String,String> options)
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 of
tableName
and use GPUdb.createSchema(CreateSchemaRequest)
to
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
PERSIST
: If true
, then the materialized view
specified in tableName
will be persisted and
will not expire unless a ttl
is specified. If
false
, then the materialized view will be an
in-memory table and will expire unless a ttl
is
specified otherwise.
Supported values:
The default value is FALSE
.
REFRESH_SPAN
: Sets the future time-offset(in seconds)
at which periodic refresh stops
REFRESH_STOP_TIME
: When refresh_method
is
periodic
, 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
calling GPUdb.alterTable(AlterTableRequest)
with 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
by refresh_period
MANUAL
.
REFRESH_PERIOD
: When refresh_method
is periodic
, specifies the period in seconds at which
refresh occurs
REFRESH_START_TIME
: When refresh_method
is
periodic
, 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 in tableName
.
Map
.public static org.apache.avro.Schema getClassSchema()
public String getTableName()
public CreateMaterializedViewRequest setTableName(String tableName)
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.this
to mimic the builder pattern.public Map<String,String> getOptions()
COLLECTION_NAME
: [DEPRECATED--please specify the containing
schema for the materialized view as part of tableName
and use GPUdb.createSchema(CreateSchemaRequest)
to 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
PERSIST
: If true
, then the materialized view specified
in tableName
will be persisted and will not expire
unless a ttl
is specified. If false
, then the
materialized view will be an in-memory table and will expire
unless a ttl
is specified otherwise.
Supported values:
The default value is FALSE
.
REFRESH_SPAN
: Sets the future time-offset(in seconds) at which
periodic refresh stops
REFRESH_STOP_TIME
: When refresh_method
is periodic
, 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 calling
GPUdb.alterTable(AlterTableRequest)
with 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 by
refresh_period
MANUAL
.
REFRESH_PERIOD
: When refresh_method
is periodic
, specifies the period in seconds at which refresh
occurs
REFRESH_START_TIME
: When refresh_method
is periodic
, 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 in tableName
.
Map
.public CreateMaterializedViewRequest setOptions(Map<String,String> options)
options
- Optional parameters.
COLLECTION_NAME
: [DEPRECATED--please specify the
containing schema for the materialized view as part of
tableName
and use GPUdb.createSchema(CreateSchemaRequest)
to
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
PERSIST
: If true
, then the materialized view
specified in tableName
will be persisted and
will not expire unless a ttl
is specified. If
false
, then the materialized view will be an
in-memory table and will expire unless a ttl
is
specified otherwise.
Supported values:
The default value is FALSE
.
REFRESH_SPAN
: Sets the future time-offset(in seconds)
at which periodic refresh stops
REFRESH_STOP_TIME
: When refresh_method
is
periodic
, 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
calling GPUdb.alterTable(AlterTableRequest)
with 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
by refresh_period
MANUAL
.
REFRESH_PERIOD
: When refresh_method
is periodic
, specifies the period in seconds at which
refresh occurs
REFRESH_START_TIME
: When refresh_method
is
periodic
, 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 in tableName
.
Map
.this
to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema
in interface org.apache.avro.generic.GenericContainer
public Object get(int index)
get
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to getIndexOutOfBoundsException
public void put(int index, Object value)
put
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to setvalue
- the value to setIndexOutOfBoundsException
Copyright © 2024. All rights reserved.