data_lake_datasets
Creates, updates, deletes, gets or lists a data_lake_datasets resource.
Overview
| Name | data_lake_datasets |
| Type | Resource |
| Id | aws.supplychain.data_lake_datasets |
Fields
The following fields are returned by SELECT queries:
- get_data_lake_dataset
- list_data_lake_datasets
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the dataset. For asc namespace, the name must be one of the supported data entities under https://docs.aws.amazon.com/aws-supply-chain/latest/userguide/data-model-asc.html. (pattern: <code>[a-z0-9_]+</code>) |
arn | string | The arn of the dataset. (pattern: <code>arn:aws:scn(?::([a-z0-9-]+):([0-9]+):instance)?/([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})[-_./A-Za-z0-9]*</code>) |
created_time | string (date-time) | The creation time of the dataset. |
description | string | The description of the dataset. |
instance_id | string | The Amazon Web Services Supply Chain instance identifier. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>) |
last_modified_time | string (date-time) | The last modified time of the dataset. |
namespace | string | The namespace of the dataset, besides the custom defined namespace, every instance comes with below pre-defined namespaces: asc - For information on the Amazon Web Services Supply Chain supported datasets see https://docs.aws.amazon.com/aws-supply-chain/latest/userguide/data-model-asc.html. default - For datasets with custom user-defined schemas. (pattern: <code>[a-z0-9_]+</code>) |
partition_spec | object | The partition specification for a dataset. |
schema | object | The schema details of the dataset. Note that for AWS Supply Chain dataset under asc namespace, it may have internal fields like connection_id that will be auto populated by data ingestion methods. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the dataset. For asc namespace, the name must be one of the supported data entities under https://docs.aws.amazon.com/aws-supply-chain/latest/userguide/data-model-asc.html. (pattern: <code>[a-z0-9_]+</code>) |
arn | string | The arn of the dataset. (pattern: <code>arn:aws:scn(?::([a-z0-9-]+):([0-9]+):instance)?/([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})[-_./A-Za-z0-9]*</code>) |
created_time | string (date-time) | The creation time of the dataset. |
description | string | The description of the dataset. |
instance_id | string | The Amazon Web Services Supply Chain instance identifier. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>) |
last_modified_time | string (date-time) | The last modified time of the dataset. |
namespace | string | The namespace of the dataset, besides the custom defined namespace, every instance comes with below pre-defined namespaces: asc - For information on the Amazon Web Services Supply Chain supported datasets see https://docs.aws.amazon.com/aws-supply-chain/latest/userguide/data-model-asc.html. default - For datasets with custom user-defined schemas. (pattern: <code>[a-z0-9_]+</code>) |
partition_spec | object | The partition specification for a dataset. |
schema | object | The schema details of the dataset. Note that for AWS Supply Chain dataset under asc namespace, it may have internal fields like connection_id that will be auto populated by data ingestion methods. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_data_lake_dataset | select | instance_id, namespace, name, region | Enables you to programmatically view an Amazon Web Services Supply Chain data lake dataset. Developers can view the data lake dataset information such as namespace, schema, and so on for a given instance ID, namespace, and dataset name. | |
list_data_lake_datasets | select | instance_id, namespace, region | nextToken, maxResults | Enables you to programmatically view the list of Amazon Web Services Supply Chain data lake datasets. Developers can view the datasets and the corresponding information such as namespace, schema, and so on for a given instance ID and namespace. |
create_data_lake_dataset | insert | instance_id, namespace, name, region | Enables you to programmatically create an Amazon Web Services Supply Chain data lake dataset. Developers can create the datasets using their pre-defined or custom schema for a given instance ID, namespace, and dataset name. | |
update_data_lake_dataset | update | instance_id, namespace, name, region | Enables you to programmatically update an Amazon Web Services Supply Chain data lake dataset. Developers can update the description of a data lake dataset for a given instance ID, namespace, and dataset name. | |
delete_data_lake_dataset | delete | instance_id, namespace, name, region | Enables you to programmatically delete an Amazon Web Services Supply Chain data lake dataset. Developers can delete the existing datasets for a given instance ID, namespace, and instance name. |
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 |
|---|---|---|
instance_id | string | The AWS Supply Chain instance identifier. |
name | string | The name of the dataset. For asc namespace, the name must be one of the supported data entities under https://docs.aws.amazon.com/aws-supply-chain/latest/userguide/data-model-asc.html. |
namespace | string | The namespace of the dataset, besides the custom defined namespace, every instance comes with below pre-defined namespaces: asc - For information on the Amazon Web Services Supply Chain supported datasets see https://docs.aws.amazon.com/aws-supply-chain/latest/userguide/data-model-asc.html. default - For datasets with custom user-defined schemas. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The max number of datasets to fetch in this paginated request. |
nextToken | string | The pagination token to fetch next page of datasets. |
SELECT examples
- get_data_lake_dataset
- list_data_lake_datasets
Enables you to programmatically view an Amazon Web Services Supply Chain data lake dataset. Developers can view the data lake dataset information such as namespace, schema, and so on for a given instance ID, namespace, and dataset name.
SELECT
name,
arn,
created_time,
description,
instance_id,
last_modified_time,
namespace,
partition_spec,
schema
FROM aws.supplychain.data_lake_datasets
WHERE instance_id = '{{ instance_id }}' -- required
AND namespace = '{{ namespace }}' -- required
AND name = '{{ name }}' -- required
AND region = '{{ region }}' -- required
;
Enables you to programmatically view the list of Amazon Web Services Supply Chain data lake datasets. Developers can view the datasets and the corresponding information such as namespace, schema, and so on for a given instance ID and namespace.
SELECT
name,
arn,
created_time,
description,
instance_id,
last_modified_time,
namespace,
partition_spec,
schema
FROM aws.supplychain.data_lake_datasets
WHERE instance_id = '{{ instance_id }}' -- required
AND namespace = '{{ namespace }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_data_lake_dataset
- Manifest
Enables you to programmatically create an Amazon Web Services Supply Chain data lake dataset. Developers can create the datasets using their pre-defined or custom schema for a given instance ID, namespace, and dataset name.
INSERT INTO aws.supplychain.data_lake_datasets (
schema,
description,
partitionSpec,
tags,
instance_id,
namespace,
name,
region
)
SELECT
'{{ schema }}',
'{{ description }}',
'{{ partitionSpec }}',
'{{ tags }}',
'{{ instance_id }}',
'{{ namespace }}',
'{{ name }}',
'{{ region }}'
RETURNING
dataset
;
# Description fields are for documentation purposes
- name: data_lake_datasets
props:
- name: instance_id
value: "{{ instance_id }}"
description: Required parameter for the data_lake_datasets resource.
- name: namespace
value: "{{ namespace }}"
description: Required parameter for the data_lake_datasets resource.
- name: name
value: "{{ name }}"
description: Required parameter for the data_lake_datasets resource.
- name: region
value: "{{ region }}"
description: Required parameter for the data_lake_datasets resource.
- name: schema
description: |
The schema details of the dataset. Note that for AWS Supply Chain dataset under asc namespace, it may have internal fields like connection_id that will be auto populated by data ingestion methods.
value:
name: "{{ name }}"
fields:
- name: "{{ name }}"
type_: "{{ type_ }}"
isRequired: {{ isRequired }}
primaryKeys:
- name: "{{ name }}"
- name: description
value: "{{ description }}"
- name: partitionSpec
description: |
The partition specification for a dataset.
value:
fields:
- name: "{{ name }}"
transform:
type_: "{{ type_ }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_data_lake_dataset
Enables you to programmatically update an Amazon Web Services Supply Chain data lake dataset. Developers can update the description of a data lake dataset for a given instance ID, namespace, and dataset name.
UPDATE aws.supplychain.data_lake_datasets
SET
description = '{{ description }}'
WHERE
instance_id = '{{ instance_id }}' --required
AND namespace = '{{ namespace }}' --required
AND name = '{{ name }}' --required
AND region = '{{ region }}' --required
RETURNING
dataset;
DELETE examples
- delete_data_lake_dataset
Enables you to programmatically delete an Amazon Web Services Supply Chain data lake dataset. Developers can delete the existing datasets for a given instance ID, namespace, and instance name.
DELETE FROM aws.supplychain.data_lake_datasets
WHERE instance_id = '{{ instance_id }}' --required
AND namespace = '{{ namespace }}' --required
AND name = '{{ name }}' --required
AND region = '{{ region }}' --required
;