

# Dataset operations


With dataset operations, you can perform actions on Amazon Quick Sight datasets. For more information, see the following API operations.

**Topics**
+ [

# Dataset permissions operations
](data-set-permissions.md)
+ [

# CreateDataSet
](create-data-set.md)
+ [

# DeleteDataSet
](delete-data-set.md)
+ [

# DescribeDataSet
](describe-data-set.md)
+ [

# ListDataSets
](list-data-sets.md)
+ [

# UpdateDataSet
](update-data-set.md)

# Dataset permissions operations


With dataset permissions API operations, you can view and update permissions on a dataset. For more information, see the following API operations.

**Topics**
+ [

# DescribeDataSetPermissions
](describe-data-set-permissions.md)
+ [

# UpdateDataSetPermissions
](update-data-set-permissions.md)

# DescribeDataSetPermissions


Use the `DescribeDataSetPermissions` API operation to describe the permissions on a dataset. To use this operation, you need the ID of the dataset whose permissions that you want to view. The dataset ID is part of the dataset URL in Quick Sight. You can also use the `ListDataSets` API operation to get the ID.

Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
aws quicksight describe-data-set-permissions 
    --aws-account-id AWSACCOUNTID 
    --data-set-id DATASETID
```

------

For more information about the `DescribeDataSetPermissions` API operation, see [DescribeDataSetPermissions](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeDataSetPermissions.html) in the *Amazon Quick Sight API Reference*.

# UpdateDataSetPermissions


Use the `UpdateDataSetPermissions` API operation to update the permissions on a dataset. You can grant or revoke permissions in the same command. To use this operation, you need the ID of the dataset whose permissions that you want to update. The dataset ID is part of the dataset URL in Quick Sight. You can also use the `ListDataSets` API operation to get the ID.

Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
aws quicksight update-data-set-permissions 
    --aws-account-id AWSACCOUNTID 
    --data-set-id DATASETID 
    --grant-permissions Principal=arn:aws:quicksight:us-east-1:AWSACCOUNTID:user/default/USERNAME,Actions=quicksight:DescribeDataSet,quicksight:DescribeDataSetPermissions,quicksight:PassDataSet,quicksight:DescribeIngestion,quicksight:ListIngestions
    --revoke-permissions Principal=arn:aws:quicksight:us-east-1:AWSACCOUNTID:user/default/USERNAME,Actions=quicksight:DescribeDataSet,quicksight:DescribeDataSetPermissions,quicksight:PassDataSet,quicksight:DescribeIngestion,quicksight:ListIngestions
```

If your `region` has already been configured with the CLI, it doesn't need to be included as an argument.

You can also make this command using a CLI skeleton file with the following command. For more information about CLI skeleton files, see [Use CLI skeleton files](cli-skeletons.md).

```
aws quicksight update-data-set-permissions
    --cli-input-json file://updatedatasetpermissions.json
```

------

If your region has already been configured with the CLI, it does not need to be included in an argument.

For more information about the `UpdateDataSetPermissions` API operation, see [UpdateDataSetPermissions](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateDataSetPermissions.html) in the *Amazon Quick Sight API Reference*.

# CreateDataSet


Use the `CreateDataSet` API operation to create a dataset. Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
aws quicksight create-data-set 
    --aws-account-id AWSACCOUNTID 
    --data-set-id DATASETID 
    --name NAME 
    --physical-table-map '{"PhysicalTableMap":{"string":{"CustomSql":{"Columns":[{"Name":"string","Type":"string"}],"DataSourceArn":"string","Name":"string","SqlQuery":"string"},"RelationalTable":{"Catalog":"string","DataSourceArn":"string","InputColumns":[{"Name":"string","Type":"string"}],"Name":"string","Schema":"string"},"S3Source":{"DataSourceArn":"string","InputColumns":[{"Name":"string","Type":"string"}],"UploadSettings":{"ContainsHeader":boolean,"Delimiter":"string","Format":"string","StartFromRow":number,"TextQualifier":"string"}}}}' 
    --import-mode DIRECT_QUERY
```

You can also make this command using a CLI skeleton file with the following command. For more information about CLI skeleton files, see [Use CLI skeleton files](cli-skeletons.md).

```
aws quicksight create-data-set
    --cli-input-json file://createdataset.json
```

------

For more information about the `CreateDataSet` API operation, see [CreateDataSet](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateDataSet.html) in the *Amazon Quick Sight API Reference*.

# DeleteDataSet


Use the `DeleteDataSet` API operation to delete a dataset. To use this operation, you need the ID of the dataset that you want to delete. The dataset ID is part of the dataset URL in Quick Sight. You can also use the `ListDataSets` API operation to get the ID.

Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
aws quicksight delete-data-set 
    --aws-account-id AWSACCOUNTID 
    --data-set-id DATASETID
```

------

For more information about the `DeleteDataSet` API operation, see [DeleteDataSet](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DeleteDataSet.html) in the *Amazon Quick Sight API Reference*.

# DescribeDataSet


Use the `DescribeDataSet` API operation to describe a dataset. To use this operation, you need the ID of the dataset that you want to describe. The dataset ID is part of the dataset URL in Quick Sight. You can also use the `ListDataSets` API operation to get the ID.

Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
aws quicksight describe-data-set 
    --aws-account-id AWSACCOUNTID 
    --data-set-id DATASETID
```

------

For more information about the `DescribeDataSet` API operation, see [DescribeDataSet](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeDataSet.html) in the *Amazon Quick Sight API Reference*.

# ListDataSets


Use the `ListDataSets` API operation to list all of the datasets that belong to a particular AWS account in an AWS Region. Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
aws quicksight list-data-sets 
    --aws-account-id AWSACCOUNTID 
    --page-size 10 
    --max-items 100
```

------

For more information about the `ListDataSets` API operation, see [ListDataSets](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_ListDataSets.html) in the *Amazon Quick Sight API Reference*.

# UpdateDataSet


Use the `UpdateDataSet` API operation to update a dataset. To use this operation, you need the ID of the dataset that you want to update. The dataset ID is part of the dataset URL in Quick Sight. You can also use the `ListDataSets` API operation to get the ID.

Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
 aws quicksight update-data-set
    --aws-account-id AWSACCOUNTID
    --data-set-id DATASETID
    --name NAME
    --physical-table-map PHYSICALTABLEMAP
    --import-mode IMPORTMODE
```

You can also make this command using a CLI skeleton file with the following command. For more information about CLI skeleton files, see [Use CLI skeleton files](cli-skeletons.md).

```
aws quicksight update-data-set
    --cli-input-json file://updatedataset.json
```

------

For more information about the `UpdateDataSet` API operation, see [UpdateDataSet](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateDataSet.html) in the *Amazon Quick Sight API Reference*.