Skip to main content

data_views

Creates, updates, deletes, gets or lists a data_views resource.

Overview

Namedata_views
TypeResource
Idaws.finspace_data.data_views

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
as_of_timestampinteger (int64)Milliseconds since UTC epoch
auto_updatebooleanCommon Boolean data type
create_timeinteger (int64)Milliseconds since UTC epoch
data_view_arnstringThe ARN identifier of the Dataview.
data_view_idstringDataView ID
dataset_idstringID for a given Dataset
destination_type_paramsobjectStructure for the Dataview destination type parameters.
error_infoobjectInformation about an error that occurred for the Dataview.
last_modified_timeinteger (int64)Milliseconds since UTC epoch
partition_columnsarrayDataView Partition Column List
sort_columnsarrayDataView Sort Column List
statusstringThe status of a Dataview creation. RUNNING – Dataview creation is running. STARTING – Dataview creation is starting. FAILED – Dataview creation has failed. CANCELLED – Dataview creation has been cancelled. TIMEOUT – Dataview creation has timed out. SUCCESS – Dataview creation has succeeded. PENDING – Dataview creation is pending. FAILED_CLEANUP_FAILED – Dataview creation failed and resource cleanup failed. (RUNNING, STARTING, FAILED, CANCELLED, TIMEOUT, SUCCESS, PENDING, FAILED_CLEANUP_FAILED)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_data_viewselectdataview_id, dataset_id, regionGets information about a Dataview.
list_data_viewsselectdataset_id, regionnextToken, maxResultsLists all available Dataviews for a Dataset.
create_data_viewinsertdataset_id, region, destinationTypeParamsCreates a Dataview for a Dataset.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
dataset_idstringThe unique Dataset identifier that is used to create a Dataview.
dataview_idstringThe unique identifier for the Dataview.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results per page.
nextTokenstringA token that indicates where a results page should begin.

SELECT examples

Gets information about a Dataview.

SELECT
as_of_timestamp,
auto_update,
create_time,
data_view_arn,
data_view_id,
dataset_id,
destination_type_params,
error_info,
last_modified_time,
partition_columns,
sort_columns,
status
FROM aws.finspace_data.data_views
WHERE dataview_id = '{{ dataview_id }}' -- required
AND dataset_id = '{{ dataset_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a Dataview for a Dataset.

INSERT INTO aws.finspace_data.data_views (
clientToken,
autoUpdate,
sortColumns,
partitionColumns,
asOfTimestamp,
destinationTypeParams,
dataset_id,
region
)
SELECT
'{{ clientToken }}',
{{ autoUpdate }},
'{{ sortColumns }}',
'{{ partitionColumns }}',
{{ asOfTimestamp }},
'{{ destinationTypeParams }}' /* required */,
'{{ dataset_id }}',
'{{ region }}'
RETURNING
data_view_id,
dataset_id
;