Skip to content
v2.278.0

CfnDatasetProps Struct ​

Properties for defining a CfnDataset.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_databrew as databrew } from 'aws-cdk-lib';
const cfnDatasetProps: databrew.CfnDatasetProps = {
  input: {
    databaseInputDefinition: {
      glueConnectionName: 'glueConnectionName',

      // the properties below are optional
      databaseTableName: 'databaseTableName',
      queryString: 'queryString',
      tempDirectory: {
        bucket: 'bucket',

        // the properties below are optional
        bucketOwner: 'bucketOwner',
        key: 'key',
      },
    },
    dataCatalogInputDefinition: {
      catalogId: 'catalogId',
      databaseName: 'databaseName',
      tableName: 'tableName',
      tempDirectory: {
        bucket: 'bucket',

        // the properties below are optional
        bucketOwner: 'bucketOwner',
        key: 'key',
      },
    },
    metadata: {
      sourceArn: 'sourceArn',
    },
    s3InputDefinition: {
      bucket: 'bucket',

      // the properties below are optional
      bucketOwner: 'bucketOwner',
      key: 'key',
    },
  },
  name: 'name',

  // the properties below are optional
  format: 'format',
  formatOptions: {
    csv: {
      delimiter: 'delimiter',
      headerRow: false,
    },
    excel: {
      headerRow: false,
      sheetIndexes: [123],
      sheetNames: ['sheetNames'],
    },
    json: {
      multiLine: false,
    },
  },
  pathOptions: {
    filesLimit: {
      maxFiles: 123,

      // the properties below are optional
      order: 'order',
      orderedBy: 'orderedBy',
    },
    lastModifiedDateCondition: {
      expression: 'expression',
      valuesMap: [{
        value: 'value',
        valueReference: 'valueReference',
      }],
    },
    parameters: [{
      datasetParameter: {
        name: 'name',
        type: 'type',

        // the properties below are optional
        createColumn: false,
        datetimeOptions: {
          format: 'format',

          // the properties below are optional
          localeCode: 'localeCode',
          timezoneOffset: 'timezoneOffset',
        },
        filter: {
          expression: 'expression',
          valuesMap: [{
            value: 'value',
            valueReference: 'valueReference',
          }],
        },
      },
      pathParameterName: 'pathParameterName',
    }],
  },
  source: 'source',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_databrew as databrew

cfn_dataset_props = databrew.CfnDatasetProps(
    input=databrew.CfnDataset.InputProperty(
        database_input_definition=databrew.CfnDataset.DatabaseInputDefinitionProperty(
            glue_connection_name="glueConnectionName",

            # the properties below are optional
            database_table_name="databaseTableName",
            query_string="queryString",
            temp_directory=databrew.CfnDataset.S3LocationProperty(
                bucket="bucket",

                # the properties below are optional
                bucket_owner="bucketOwner",
                key="key"
            )
        ),
        data_catalog_input_definition=databrew.CfnDataset.DataCatalogInputDefinitionProperty(
            catalog_id="catalogId",
            database_name="databaseName",
            table_name="tableName",
            temp_directory=databrew.CfnDataset.S3LocationProperty(
                bucket="bucket",

                # the properties below are optional
                bucket_owner="bucketOwner",
                key="key"
            )
        ),
        metadata=databrew.CfnDataset.MetadataProperty(
            source_arn="sourceArn"
        ),
        s3_input_definition=databrew.CfnDataset.S3LocationProperty(
            bucket="bucket",

            # the properties below are optional
            bucket_owner="bucketOwner",
            key="key"
        )
    ),
    name="name",

    # the properties below are optional
    format="format",
    format_options=databrew.CfnDataset.FormatOptionsProperty(
        csv=databrew.CfnDataset.CsvOptionsProperty(
            delimiter="delimiter",
            header_row=False
        ),
        excel=databrew.CfnDataset.ExcelOptionsProperty(
            header_row=False,
            sheet_indexes=[123],
            sheet_names=["sheetNames"]
        ),
        json=databrew.CfnDataset.JsonOptionsProperty(
            multi_line=False
        )
    ),
    path_options=databrew.CfnDataset.PathOptionsProperty(
        files_limit=databrew.CfnDataset.FilesLimitProperty(
            max_files=123,

            # the properties below are optional
            order="order",
            ordered_by="orderedBy"
        ),
        last_modified_date_condition=databrew.CfnDataset.FilterExpressionProperty(
            expression="expression",
            values_map=[databrew.CfnDataset.FilterValueProperty(
                value="value",
                value_reference="valueReference"
            )]
        ),
        parameters=[databrew.CfnDataset.PathParameterProperty(
            dataset_parameter=databrew.CfnDataset.DatasetParameterProperty(
                name="name",
                type="type",

                # the properties below are optional
                create_column=False,
                datetime_options=databrew.CfnDataset.DatetimeOptionsProperty(
                    format="format",

                    # the properties below are optional
                    locale_code="localeCode",
                    timezone_offset="timezoneOffset"
                ),
                filter=databrew.CfnDataset.FilterExpressionProperty(
                    expression="expression",
                    values_map=[databrew.CfnDataset.FilterValueProperty(
                        value="value",
                        value_reference="valueReference"
                    )]
                )
            ),
            path_parameter_name="pathParameterName"
        )]
    ),
    source="source",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.databrew.*;

CfnDatasetProps cfnDatasetProps = CfnDatasetProps.builder()
        .input(InputProperty.builder()
                .databaseInputDefinition(DatabaseInputDefinitionProperty.builder()
                        .glueConnectionName("glueConnectionName")

                        // the properties below are optional
                        .databaseTableName("databaseTableName")
                        .queryString("queryString")
                        .tempDirectory(S3LocationProperty.builder()
                                .bucket("bucket")

                                // the properties below are optional
                                .bucketOwner("bucketOwner")
                                .key("key")
                                .build())
                        .build())
                .dataCatalogInputDefinition(DataCatalogInputDefinitionProperty.builder()
                        .catalogId("catalogId")
                        .databaseName("databaseName")
                        .tableName("tableName")
                        .tempDirectory(S3LocationProperty.builder()
                                .bucket("bucket")

                                // the properties below are optional
                                .bucketOwner("bucketOwner")
                                .key("key")
                                .build())
                        .build())
                .metadata(MetadataProperty.builder()
                        .sourceArn("sourceArn")
                        .build())
                .s3InputDefinition(S3LocationProperty.builder()
                        .bucket("bucket")

                        // the properties below are optional
                        .bucketOwner("bucketOwner")
                        .key("key")
                        .build())
                .build())
        .name("name")

        // the properties below are optional
        .format("format")
        .formatOptions(FormatOptionsProperty.builder()
                .csv(CsvOptionsProperty.builder()
                        .delimiter("delimiter")
                        .headerRow(false)
                        .build())
                .excel(ExcelOptionsProperty.builder()
                        .headerRow(false)
                        .sheetIndexes(List.of(123))
                        .sheetNames(List.of("sheetNames"))
                        .build())
                .json(JsonOptionsProperty.builder()
                        .multiLine(false)
                        .build())
                .build())
        .pathOptions(PathOptionsProperty.builder()
                .filesLimit(FilesLimitProperty.builder()
                        .maxFiles(123)

                        // the properties below are optional
                        .order("order")
                        .orderedBy("orderedBy")
                        .build())
                .lastModifiedDateCondition(FilterExpressionProperty.builder()
                        .expression("expression")
                        .valuesMap(List.of(FilterValueProperty.builder()
                                .value("value")
                                .valueReference("valueReference")
                                .build()))
                        .build())
                .parameters(List.of(PathParameterProperty.builder()
                        .datasetParameter(DatasetParameterProperty.builder()
                                .name("name")
                                .type("type")

                                // the properties below are optional
                                .createColumn(false)
                                .datetimeOptions(DatetimeOptionsProperty.builder()
                                        .format("format")

                                        // the properties below are optional
                                        .localeCode("localeCode")
                                        .timezoneOffset("timezoneOffset")
                                        .build())
                                .filter(FilterExpressionProperty.builder()
                                        .expression("expression")
                                        .valuesMap(List.of(FilterValueProperty.builder()
                                                .value("value")
                                                .valueReference("valueReference")
                                                .build()))
                                        .build())
                                .build())
                        .pathParameterName("pathParameterName")
                        .build()))
                .build())
        .source("source")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.DataBrew;

var cfnDatasetProps = new CfnDatasetProps {
    Input = new InputProperty {
        DatabaseInputDefinition = new DatabaseInputDefinitionProperty {
            GlueConnectionName = "glueConnectionName",

            // the properties below are optional
            DatabaseTableName = "databaseTableName",
            QueryString = "queryString",
            TempDirectory = new S3LocationProperty {
                Bucket = "bucket",

                // the properties below are optional
                BucketOwner = "bucketOwner",
                Key = "key"
            }
        },
        DataCatalogInputDefinition = new DataCatalogInputDefinitionProperty {
            CatalogId = "catalogId",
            DatabaseName = "databaseName",
            TableName = "tableName",
            TempDirectory = new S3LocationProperty {
                Bucket = "bucket",

                // the properties below are optional
                BucketOwner = "bucketOwner",
                Key = "key"
            }
        },
        Metadata = new MetadataProperty {
            SourceArn = "sourceArn"
        },
        S3InputDefinition = new S3LocationProperty {
            Bucket = "bucket",

            // the properties below are optional
            BucketOwner = "bucketOwner",
            Key = "key"
        }
    },
    Name = "name",

    // the properties below are optional
    Format = "format",
    FormatOptions = new FormatOptionsProperty {
        Csv = new CsvOptionsProperty {
            Delimiter = "delimiter",
            HeaderRow = false
        },
        Excel = new ExcelOptionsProperty {
            HeaderRow = false,
            SheetIndexes = new [] { 123 },
            SheetNames = new [] { "sheetNames" }
        },
        Json = new JsonOptionsProperty {
            MultiLine = false
        }
    },
    PathOptions = new PathOptionsProperty {
        FilesLimit = new FilesLimitProperty {
            MaxFiles = 123,

            // the properties below are optional
            Order = "order",
            OrderedBy = "orderedBy"
        },
        LastModifiedDateCondition = new FilterExpressionProperty {
            Expression = "expression",
            ValuesMap = new [] { new FilterValueProperty {
                Value = "value",
                ValueReference = "valueReference"
            } }
        },
        Parameters = new [] { new PathParameterProperty {
            DatasetParameter = new DatasetParameterProperty {
                Name = "name",
                Type = "type",

                // the properties below are optional
                CreateColumn = false,
                DatetimeOptions = new DatetimeOptionsProperty {
                    Format = "format",

                    // the properties below are optional
                    LocaleCode = "localeCode",
                    TimezoneOffset = "timezoneOffset"
                },
                Filter = new FilterExpressionProperty {
                    Expression = "expression",
                    ValuesMap = new [] { new FilterValueProperty {
                        Value = "value",
                        ValueReference = "valueReference"
                    } }
                }
            },
            PathParameterName = "pathParameterName"
        } }
    },
    Source = "source",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnDatasetProps := &CfnDatasetProps{
	Input: &InputProperty{
		DatabaseInputDefinition: &DatabaseInputDefinitionProperty{
			GlueConnectionName: jsii.String("glueConnectionName"),

			// the properties below are optional
			DatabaseTableName: jsii.String("databaseTableName"),
			QueryString: jsii.String("queryString"),
			TempDirectory: &S3LocationProperty{
				Bucket: jsii.String("bucket"),

				// the properties below are optional
				BucketOwner: jsii.String("bucketOwner"),
				Key: jsii.String("key"),
			},
		},
		DataCatalogInputDefinition: &DataCatalogInputDefinitionProperty{
			CatalogId: jsii.String("catalogId"),
			DatabaseName: jsii.String("databaseName"),
			TableName: jsii.String("tableName"),
			TempDirectory: &S3LocationProperty{
				Bucket: jsii.String("bucket"),

				// the properties below are optional
				BucketOwner: jsii.String("bucketOwner"),
				Key: jsii.String("key"),
			},
		},
		Metadata: &MetadataProperty{
			SourceArn: jsii.String("sourceArn"),
		},
		S3InputDefinition: &S3LocationProperty{
			Bucket: jsii.String("bucket"),

			// the properties below are optional
			BucketOwner: jsii.String("bucketOwner"),
			Key: jsii.String("key"),
		},
	},
	Name: jsii.String("name"),

	// the properties below are optional
	Format: jsii.String("format"),
	FormatOptions: &FormatOptionsProperty{
		Csv: &CsvOptionsProperty{
			Delimiter: jsii.String("delimiter"),
			HeaderRow: jsii.Boolean(false),
		},
		Excel: &ExcelOptionsProperty{
			HeaderRow: jsii.Boolean(false),
			SheetIndexes: []interface{}{
				jsii.Number(123),
			},
			SheetNames: []*string{
				jsii.String("sheetNames"),
			},
		},
		Json: &JsonOptionsProperty{
			MultiLine: jsii.Boolean(false),
		},
	},
	PathOptions: &PathOptionsProperty{
		FilesLimit: &FilesLimitProperty{
			MaxFiles: jsii.Number(123),

			// the properties below are optional
			Order: jsii.String("order"),
			OrderedBy: jsii.String("orderedBy"),
		},
		LastModifiedDateCondition: &FilterExpressionProperty{
			Expression: jsii.String("expression"),
			ValuesMap: []interface{}{
				&FilterValueProperty{
					Value: jsii.String("value"),
					ValueReference: jsii.String("valueReference"),
				},
			},
		},
		Parameters: []interface{}{
			&PathParameterProperty{
				DatasetParameter: &DatasetParameterProperty{
					Name: jsii.String("name"),
					Type: jsii.String("type"),

					// the properties below are optional
					CreateColumn: jsii.Boolean(false),
					DatetimeOptions: &DatetimeOptionsProperty{
						Format: jsii.String("format"),

						// the properties below are optional
						LocaleCode: jsii.String("localeCode"),
						TimezoneOffset: jsii.String("timezoneOffset"),
					},
					Filter: &FilterExpressionProperty{
						Expression: jsii.String("expression"),
						ValuesMap: []interface{}{
							&FilterValueProperty{
								Value: jsii.String("value"),
								ValueReference: jsii.String("valueReference"),
							},
						},
					},
				},
				PathParameterName: jsii.String("pathParameterName"),
			},
		},
	},
	Source: jsii.String("source"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

formatoptionalstringformatoptionalstrformatoptionalStringFormatoptionalstringFormatoptional*string #
The file format of a dataset that is created from an Amazon S3 file or folder.
formatOptionsoptionalIResolvable | CfnDataset.FormatOptionsPropertyformat_optionsoptionaltyping.Union[IResolvable, FormatOptionsProperty]formatOptionsoptionalIResolvableFormatOptionsoptionalIResolvableFormatOptionsoptionalinterface{} #
A set of options that define how DataBrew interprets the data in the dataset.
inputIResolvable | CfnDataset.InputPropertyinputtyping.Union[IResolvable, InputProperty]inputIResolvableInputIResolvableInputinterface{} required #
Information on how DataBrew can find the dataset, in either the AWS Glue Data Catalog or Amazon S3 .
namestringnamestrnameStringNamestringName*string required #
The unique name of the dataset.
pathOptionsoptionalIResolvable | CfnDataset.PathOptionsPropertypath_optionsoptionaltyping.Union[IResolvable, PathOptionsProperty]pathOptionsoptionalIResolvablePathOptionsoptionalIResolvablePathOptionsoptionalinterface{} #
A set of options that defines how DataBrew interprets an Amazon S3 path of the dataset.
sourceoptionalstringsourceoptionalstrsourceoptionalStringSourceoptionalstringSourceoptional*string #
The location of the data for the dataset, either Amazon S3 or the AWS Glue Data Catalog .
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
Metadata tags that have been applied to the dataset.