Skip to main content

datasets

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

Overview

Namedatasets
TypeResource
Idaws.databrew.datasets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
create_datestring (date-time)The date and time that the dataset was created.
created_bystringThe identifier (user name) of the user who created the dataset.
formatstringThe file format of a dataset that is created from an Amazon S3 file or folder. (CSV, JSON, PARQUET, EXCEL, ORC)
format_optionsobjectRepresents a set of options that define the structure of either comma-separated value (CSV), Excel, or JSON input.
inputobjectRepresents information on how DataBrew can find data, in either the Glue Data Catalog or Amazon S3.
last_modified_bystringThe identifier (user name) of the user who last modified the dataset.
last_modified_datestring (date-time)The date and time that the dataset was last modified.
namestringThe name of the dataset.
path_optionsobjectRepresents a set of options that define how DataBrew selects files for a given Amazon S3 path in a dataset.
resource_arnstringThe Amazon Resource Name (ARN) of the dataset.
sourcestringThe location of the data for this dataset, Amazon S3 or the Glue Data Catalog. (S3, DATA-CATALOG, DATABASE)
tagsobjectMetadata tags associated with this dataset.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_datasetselectname, regionReturns the definition of a specific DataBrew dataset.
list_datasetsselectregionmaxResults, nextTokenLists all of the DataBrew datasets.
create_datasetinsertregionCreates a new DataBrew dataset.
update_datasetupdatename, regionModifies the definition of an existing DataBrew dataset.
delete_datasetdeletename, regionDeletes a dataset from DataBrew.

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
namestringThe name of the dataset to be deleted.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results to return in this request.
nextTokenstringThe token returned by a previous call to retrieve the next set of results.

SELECT examples

Returns the definition of a specific DataBrew dataset.

SELECT
create_date,
created_by,
format,
format_options,
input,
last_modified_by,
last_modified_date,
name,
path_options,
resource_arn,
source,
tags
FROM aws.databrew.datasets
WHERE name = '{{ name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new DataBrew dataset.

INSERT INTO aws.databrew.datasets (
Name,
Format,
FormatOptions,
Input,
PathOptions,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Format }}',
'{{ FormatOptions }}',
'{{ Input }}',
'{{ PathOptions }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
name
;

UPDATE examples

Modifies the definition of an existing DataBrew dataset.

UPDATE aws.databrew.datasets
SET
Format = '{{ Format }}',
FormatOptions = '{{ FormatOptions }}',
Input = '{{ Input }}',
PathOptions = '{{ PathOptions }}'
WHERE
name = '{{ name }}' --required
AND region = '{{ region }}' --required
RETURNING
name;

DELETE examples

Deletes a dataset from DataBrew.

DELETE FROM aws.databrew.datasets
WHERE name = '{{ name }}' --required
AND region = '{{ region }}' --required
;