data_views
Creates, updates, deletes, gets or lists a data_views resource.
Overview
| Name | data_views |
| Type | Resource |
| Id | aws.finspace_data.data_views |
Fields
The following fields are returned by SELECT queries:
- get_data_view
- list_data_views
| Name | Datatype | Description |
|---|---|---|
as_of_timestamp | integer (int64) | Milliseconds since UTC epoch |
auto_update | boolean | Common Boolean data type |
create_time | integer (int64) | Milliseconds since UTC epoch |
data_view_arn | string | The ARN identifier of the Dataview. |
data_view_id | string | DataView ID |
dataset_id | string | ID for a given Dataset |
destination_type_params | object | Structure for the Dataview destination type parameters. |
error_info | object | Information about an error that occurred for the Dataview. |
last_modified_time | integer (int64) | Milliseconds since UTC epoch |
partition_columns | array | DataView Partition Column List |
sort_columns | array | DataView Sort Column List |
status | string | The 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) |
| Name | Datatype | Description |
|---|---|---|
as_of_timestamp | integer (int64) | Milliseconds since UTC epoch |
auto_update | boolean | Common Boolean data type |
create_time | integer (int64) | Milliseconds since UTC epoch |
data_view_arn | string | The ARN identifier of the Dataview. |
data_view_id | string | The unique identifier for the Dataview. |
dataset_id | string | ID for a given Dataset |
destination_type_properties | object | Structure for the Dataview destination type parameters. |
error_info | object | The structure with error messages. |
last_modified_time | integer (int64) | Milliseconds since UTC epoch |
partition_columns | array | DataView Partition Column List |
sort_columns | array | DataView Sort Column List |
status | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_data_view | select | dataview_id, dataset_id, region | Gets information about a Dataview. | |
list_data_views | select | dataset_id, region | nextToken, maxResults | Lists all available Dataviews for a Dataset. |
create_data_view | insert | dataset_id, region, destinationTypeParams | Creates 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.
| Name | Datatype | Description |
|---|---|---|
dataset_id | string | The unique Dataset identifier that is used to create a Dataview. |
dataview_id | string | The unique identifier for the Dataview. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of results per page. |
nextToken | string | A token that indicates where a results page should begin. |
SELECT examples
- get_data_view
- list_data_views
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
;
Lists all available Dataviews for a Dataset.
SELECT
as_of_timestamp,
auto_update,
create_time,
data_view_arn,
data_view_id,
dataset_id,
destination_type_properties,
error_info,
last_modified_time,
partition_columns,
sort_columns,
status
FROM aws.finspace_data.data_views
WHERE dataset_id = '{{ dataset_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_data_view
- Manifest
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
;
# Description fields are for documentation purposes
- name: data_views
props:
- name: dataset_id
value: "{{ dataset_id }}"
description: Required parameter for the data_views resource.
- name: region
value: "{{ region }}"
description: Required parameter for the data_views resource.
- name: clientToken
value: "{{ clientToken }}"
description: |
Idempotence Token for API operations
- name: autoUpdate
value: {{ autoUpdate }}
description: |
Common Boolean data type
- name: sortColumns
value:
- "{{ sortColumns }}"
description: |
DataView Sort Column List
- name: partitionColumns
value:
- "{{ partitionColumns }}"
description: |
DataView Partition Column List
- name: asOfTimestamp
value: {{ asOfTimestamp }}
description: |
Milliseconds since UTC epoch
- name: destinationTypeParams
description: |
Structure for the Dataview destination type parameters.
value:
destinationType: "{{ destinationType }}"
s3DestinationExportFileFormat: "{{ s3DestinationExportFileFormat }}"
s3DestinationExportFileFormatOptions: "{{ s3DestinationExportFileFormatOptions }}"