Change Datasource from an existing Dataset

I am trying to update/change a datasource from an existing dataset…via UI there is no option.
Via CLI I have tried this command:
aws quicksight update-data-set --aws-account-id --data-set-id --name --physical-table-map file://update-data-source.json --import-mode DIRECT_QUERY

I have added the right ids, name to the command. I have execute it but there is no change on the dataset… Probably there is something wrong in json file (where I have change the datasource id to the new one), but CLI executes it without throwing any error message.

Any suggestions? ideas? Someone in the same situation?

Hi,

You can create new data set and replace it with existing if no option you adopt yet.

Regards,
Naveed Ali

2 Likes

This is not an option. I have working/live datasets with calculated fields,…I will need to replicate all datasets + calculated fields and then replace them… The idea, and that was my question, is how to change/update to a new datasource of a dataset.

1 Like

hi @Daniel15,

as far as the schema is the same, you just have to update datasource id with the new one using update-data-set CLI/API. Haven’t you checked if the new data source you specified got query from QuickSight after the change?

kind regards,
Wakana

2 Likes

Let me explain again:

  • I have dataset A linked to Datasource 1, I want that dataset A is linked to Datasource 2.

  • Same Schema.

  • What I have already tried so far: aws quicksight update-data-set --aws-account-id --data-set-id --name --physical-table-map file://update-data-source.json --import-mode DIRECT_QUERY

    I have executed this via CLI with the right account_id, name_id and on the json the phyisical-table-map I have changed the datasource id … Execution without error but nothing has changed.

1 Like

hi @Daniel15,

here is what I did when I had the similar request as yours.

  • Used describe-data-set CLI to obtain JSON file for the dataset
  • Replaced datasource ARN with the new one in the JSON file (also removed OutputColumns, ComsumedSpiceCapacityInBytes… from JSON)
  • Run update-data-set CLI with update-data-set --cli-input-json file://.
  • I opened the dataset in QuickSight UI and confirmed new datasource listed.

kind regards,
Wakana

2 Likes

@Wakana Tried that didn’t work neither… Dataset is still pointing to the wrong Datasource (Athena), the new datasource is also using Athena but different name.

Not sure what is the problem…here what I am changing:

“PhysicalTableMap”: {
“3534534534543”: {
“RelationalTable”: {
“DataSourceArn”: “arn:aws:quicksight:eu-west-1:34345345:datasource/XXXNEW Datasource IdXXXXX”,
“Catalog”: “AwsDataCatalog”,

I have followed your steps…but the update dataset is not working

Hi @Daniel15 ,
Please let us know if the above issue has been resolved ?
Regards,
Koushik

Solved through a support ticket :wink: thanks

Interested to hear any details about the resolution. I am planning on updating a dataset to point to a new (but very similar) table in Athena.

Looking at following the steps @Wakana shared above, but if anyone has any other input I’d appreciate it.