create_data_set
(**kwargs)¶Creates a dataset. This operation doesn't support datasets that include uploaded files as a source.
See also: AWS API Documentation
Request Syntax
response = client.create_data_set(
AwsAccountId='string',
DataSetId='string',
Name='string',
PhysicalTableMap={
'string': {
'RelationalTable': {
'DataSourceArn': 'string',
'Catalog': 'string',
'Schema': 'string',
'Name': 'string',
'InputColumns': [
{
'Name': 'string',
'Type': 'STRING'|'INTEGER'|'DECIMAL'|'DATETIME'|'BIT'|'BOOLEAN'|'JSON'
},
]
},
'CustomSql': {
'DataSourceArn': 'string',
'Name': 'string',
'SqlQuery': 'string',
'Columns': [
{
'Name': 'string',
'Type': 'STRING'|'INTEGER'|'DECIMAL'|'DATETIME'|'BIT'|'BOOLEAN'|'JSON'
},
]
},
'S3Source': {
'DataSourceArn': 'string',
'UploadSettings': {
'Format': 'CSV'|'TSV'|'CLF'|'ELF'|'XLSX'|'JSON',
'StartFromRow': 123,
'ContainsHeader': True|False,
'TextQualifier': 'DOUBLE_QUOTE'|'SINGLE_QUOTE',
'Delimiter': 'string'
},
'InputColumns': [
{
'Name': 'string',
'Type': 'STRING'|'INTEGER'|'DECIMAL'|'DATETIME'|'BIT'|'BOOLEAN'|'JSON'
},
]
}
}
},
LogicalTableMap={
'string': {
'Alias': 'string',
'DataTransforms': [
{
'ProjectOperation': {
'ProjectedColumns': [
'string',
]
},
'FilterOperation': {
'ConditionExpression': 'string'
},
'CreateColumnsOperation': {
'Columns': [
{
'ColumnName': 'string',
'ColumnId': 'string',
'Expression': 'string'
},
]
},
'RenameColumnOperation': {
'ColumnName': 'string',
'NewColumnName': 'string'
},
'CastColumnTypeOperation': {
'ColumnName': 'string',
'NewColumnType': 'STRING'|'INTEGER'|'DECIMAL'|'DATETIME',
'Format': 'string'
},
'TagColumnOperation': {
'ColumnName': 'string',
'Tags': [
{
'ColumnGeographicRole': 'COUNTRY'|'STATE'|'COUNTY'|'CITY'|'POSTCODE'|'LONGITUDE'|'LATITUDE',
'ColumnDescription': {
'Text': 'string'
}
},
]
},
'UntagColumnOperation': {
'ColumnName': 'string',
'TagNames': [
'COLUMN_GEOGRAPHIC_ROLE'|'COLUMN_DESCRIPTION',
]
}
},
],
'Source': {
'JoinInstruction': {
'LeftOperand': 'string',
'RightOperand': 'string',
'LeftJoinKeyProperties': {
'UniqueKey': True|False
},
'RightJoinKeyProperties': {
'UniqueKey': True|False
},
'Type': 'INNER'|'OUTER'|'LEFT'|'RIGHT',
'OnClause': 'string'
},
'PhysicalTableId': 'string',
'DataSetArn': 'string'
}
}
},
ImportMode='SPICE'|'DIRECT_QUERY',
ColumnGroups=[
{
'GeoSpatialColumnGroup': {
'Name': 'string',
'CountryCode': 'US',
'Columns': [
'string',
]
}
},
],
FieldFolders={
'string': {
'description': 'string',
'columns': [
'string',
]
}
},
Permissions=[
{
'Principal': 'string',
'Actions': [
'string',
]
},
],
RowLevelPermissionDataSet={
'Namespace': 'string',
'Arn': 'string',
'PermissionPolicy': 'GRANT_ACCESS'|'DENY_ACCESS',
'FormatVersion': 'VERSION_1'|'VERSION_2',
'Status': 'ENABLED'|'DISABLED'
},
RowLevelPermissionTagConfiguration={
'Status': 'ENABLED'|'DISABLED',
'TagRules': [
{
'TagKey': 'string',
'ColumnName': 'string',
'TagMultiValueDelimiter': 'string',
'MatchAllValue': 'string'
},
]
},
ColumnLevelPermissionRules=[
{
'Principals': [
'string',
],
'ColumnNames': [
'string',
]
},
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
DataSetUsageConfiguration={
'DisableUseAsDirectQuerySource': True|False,
'DisableUseAsImportedSource': True|False
}
)
[REQUIRED]
The Amazon Web Services account ID.
[REQUIRED]
An ID for the dataset that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.
[REQUIRED]
The display name for the dataset.
[REQUIRED]
Declares the physical tables that are available in the underlying data sources.
A view of a data source that contains information about the shape of the data in the underlying source. This is a variant type structure. For this structure to be valid, only one of the attributes can be non-null.
A physical table type for relational data sources.
The Amazon Resource Name (ARN) for the data source.
The catalog associated with a table.
The schema name. This name applies to certain relational database engines.
The name of the relational table.
The column schema of the table.
Metadata for a column that is used as the input of a transform operation.
The name of this column in the underlying data source.
The data type of the column.
A physical table type built from the results of the custom SQL query.
The Amazon Resource Name (ARN) of the data source.
A display name for the SQL query result.
The SQL query.
The column schema from the SQL query result set.
Metadata for a column that is used as the input of a transform operation.
The name of this column in the underlying data source.
The data type of the column.
A physical table type for as S3 data source.
The Amazon Resource Name (ARN) for the data source.
Information about the format for the S3 source file or files.
File format.
A row number to start reading data from.
Whether the file has a header row, or the files each have a header row.
Text qualifier.
The delimiter between values in the file.
A physical table type for an S3 data source.
Note
For files that aren't JSON, only STRING
data types are supported in input columns.
Metadata for a column that is used as the input of a transform operation.
The name of this column in the underlying data source.
The data type of the column.
Configures the combination and transformation of the data from the physical tables.
A logical table is a unit that joins and that data transformations operate on. A logical table has a source, which can be either a physical table or result of a join. When a logical table points to a physical table, the logical table acts as a mutable copy of that physical table through transform operations.
A display name for the logical table.
Transform operations that act on this logical table. For this structure to be valid, only one of the attributes can be non-null.
A data transformation on a logical table. This is a variant type structure. For this structure to be valid, only one of the attributes can be non-null.
An operation that projects columns. Operations that come after a projection can only refer to projected columns.
Projected columns.
An operation that filters rows based on some condition.
An expression that must evaluate to a Boolean value. Rows for which the expression evaluates to true are kept in the dataset.
An operation that creates calculated columns. Columns created in one such operation form a lexical closure.
Calculated columns to create.
A calculated column for a dataset.
Column name.
A unique ID to identify a calculated column. During a dataset update, if the column ID of a calculated column matches that of an existing calculated column, Amazon QuickSight preserves the existing calculated column.
An expression that defines the calculated column.
An operation that renames a column.
The name of the column to be renamed.
The new name for the column.
A transform operation that casts a column to a different type.
Column name.
New column data type.
When casting a column from string to datetime type, you can supply a string in a format supported by Amazon QuickSight to denote the source data format.
An operation that tags a column with additional information.
The column that this operation acts on.
The dataset column tag, currently only used for geospatial type tagging.
Note
This is not tags for the Amazon Web Services tagging feature.
A tag for a column in a TagColumnOperation
structure. This is a variant type structure. For this structure to be valid, only one of the attributes can be non-null.
A geospatial role for a column.
A description for a column.
The text of a description for a column.
A transform operation that removes tags associated with a column.
The column that this operation acts on.
The column tags to remove from this column.
Source of this logical table.
Specifies the result of a join of two logical tables.
The operand on the left side of a join.
The operand on the right side of a join.
Join key properties of the left operand.
A value that indicates that a row in a table is uniquely identified by the columns in a join key. This is used by Amazon QuickSight to optimize query performance.
Join key properties of the right operand.
A value that indicates that a row in a table is uniquely identified by the columns in a join key. This is used by Amazon QuickSight to optimize query performance.
The type of join that it is.
The join instructions provided in the ON
clause of a join.
Physical table ID.
The Amazon Resource Number (ARN) of the parent dataset.
[REQUIRED]
Indicates whether you want to import the data into SPICE.
Groupings of columns that work together in certain Amazon QuickSight features. Currently, only geospatial hierarchy is supported.
Groupings of columns that work together in certain Amazon QuickSight features. This is a variant type structure. For this structure to be valid, only one of the attributes can be non-null.
Geospatial column group that denotes a hierarchy.
A display name for the hierarchy.
Country code.
Columns in this hierarchy.
The folder that contains fields and nested subfolders for your dataset.
A FieldFolder element is a folder that contains fields and nested subfolders.
The description for a field folder.
A folder has a list of columns. A column can only be in one folder.
A list of resource permissions on the dataset.
Permission for the resource.
The Amazon Resource Name (ARN) of the principal. This can be one of the following:
The IAM action to grant or revoke permissions on.
The row-level security configuration for the data that you want to create.
The namespace associated with the dataset that contains permissions for RLS.
The Amazon Resource Name (ARN) of the dataset that contains permissions for RLS.
The type of permissions to use when interpreting the permissions for RLS. DENY_ACCESS
is included for backward compatibility only.
The user or group rules associated with the dataset that contains permissions for RLS.
By default, FormatVersion
is VERSION_1
. When FormatVersion
is VERSION_1
, UserName
and GroupName
are required. When FormatVersion
is VERSION_2
, UserARN
and GroupARN
are required, and Namespace
must not exist.
The status of the row-level security permission dataset. If enabled, the status is ENABLED
. If disabled, the status is DISABLED
.
The configuration of tags on a dataset to set row-level security. Row-level security tags are currently supported for anonymous embedding only.
The status of row-level security tags. If enabled, the status is ENABLED
. If disabled, the status is DISABLED
.
A set of rules associated with row-level security, such as the tag names and columns that they are assigned to.
A set of rules associated with a tag.
The unique key for a tag.
The column name that a tag key is assigned to.
A string that you want to use to delimit the values when you pass the values at run time. For example, you can delimit the values with a comma.
A string that you want to use to filter by all the values in a column in the dataset and don’t want to list the values one by one. For example, you can use an asterisk as your match all value.
A set of one or more definitions of a ColumnLevelPermissionRule
.
A rule defined to grant access on one or more restricted columns. Each dataset can have multiple rules. To create a restricted column, you add it to one or more rules. Each rule must contain at least one column and at least one user or group. To be able to see a restricted column, a user or group needs to be added to a rule for that column.
An array of Amazon Resource Names (ARNs) for Amazon QuickSight users or groups.
An array of column names.
Contains a map of the key-value pairs for the resource tag or tags assigned to the dataset.
The key or keys of the key-value pairs for the resource tag or tags assigned to the resource.
Tag key.
Tag value.
The usage configuration to apply to child datasets that reference this dataset as a source.
An option that controls whether a child dataset of a direct query can use this dataset as a source.
An option that controls whether a child dataset that's stored in QuickSight can use this dataset as a source.
dict
Response Syntax
{
'Arn': 'string',
'DataSetId': 'string',
'IngestionArn': 'string',
'IngestionId': 'string',
'RequestId': 'string',
'Status': 123
}
Response Structure
(dict) --
Arn (string) --
The Amazon Resource Name (ARN) of the dataset.
DataSetId (string) --
The ID for the dataset that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.
IngestionArn (string) --
The ARN for the ingestion, which is triggered as a result of dataset creation if the import mode is SPICE.
IngestionId (string) --
The ID of the ingestion, which is triggered as a result of dataset creation if the import mode is SPICE.
RequestId (string) --
The Amazon Web Services request ID for this operation.
Status (integer) --
The HTTP status of the request.
Exceptions
QuickSight.Client.exceptions.AccessDeniedException
QuickSight.Client.exceptions.ConflictException
QuickSight.Client.exceptions.InvalidParameterValueException
QuickSight.Client.exceptions.LimitExceededException
QuickSight.Client.exceptions.ResourceExistsException
QuickSight.Client.exceptions.ResourceNotFoundException
QuickSight.Client.exceptions.ThrottlingException
QuickSight.Client.exceptions.UnsupportedUserEditionException
QuickSight.Client.exceptions.InternalFailureException