Quicksight - Replace Deleted Datasource

0

In Quicksight I accidentally deleted a datasource that a few datasets were connected to. I have attempted to replace the missing datasource in the dataset via using CLI in AWS CloudShell with an identical one using aws quicksight update-data-set --aws-account-id --data-set-id --cli-input-json file://update-data-source.json. However, i receive the following error:

An error occurred (InvalidParameterValueException) when calling the UpdateDataSet operation: Invalid dataSourceArn: datasource:

How do I avoid this error to update the datasource in the dataset?

질문됨 4달 전233회 조회
2개 답변
2
수락된 답변

Good morning. In my company the same thing has just happened this week. By accident a member deleted an Athena DataSource on which many DataSets had been created. To solve it we contacted AWS support and they told us that we should proceed as follows, managing to solve the problem and having the DataSets operational again: 1. Create a new DataSource using the CLI: create-data-source --aws-account-id <value> --data-source-id <same id as the deleted datasource> --name <value> --type <value> 2. Create a new DataSource that is automatically assigned its ID by console. 3. Get the information of the DataSets that do not work for the deleted DataSource: describe-data-set --aws-account-id <value> --data-set-id <value> 4. In case you do not know the ids of the datasets consult them with: list-data-sets --aws-account-id <value> 5. Update the datasets with the PhysicalTableMap structures and others to keep the DataSets the same, but changing inside the PhysicalTableMap the value of DataSourceArn to the value of the new ID created: update-data-set --aws-account-id <value> --data-set-id <value> --name <value> --physical-table-map <PhysicalTableMap> --import-mode <value>.

You cannot directly change the DataSource for the new one without having previously created the replacement for the deleted one with the same ID, otherwise the API will fail because the DataSource that has the DataSet before the change (the one that has been deleted) does not exist. In addition, the new DataSource that keeps the ID of the deleted one cannot be used either, as it is assigned a different internal ID than the deleted one and the API fails. We recommend passing to the update-data-set arguments the structures from a json file instead of directly to the command line: update-data-set --aws-account-id <value> --data-set-id <value> --name <value> --physical-table-map file://my_physical_table_map.json --import-mode <value>

답변함 3달 전
profile picture
전문가
검토됨 2달 전
  • This worked. Thank You!!! You are a lifesaver. I have been beating my head against the wall on this. You've saved me a lot of time.

0

I am not a QuickSight expert. But upon a quick glance, I don't think udpate-data-set is the right command to replace the missing data source. Parameter --data-set-id is the dataset that you want to update on (the dataset that is missing) which is why you are receiving the error.

profile pictureAWS
전문가
답변함 4달 전
  • This is what Amazon Q told me to do, which i did, and i get the same error message:

    Update just the datasource ARN value in the physical table map to the correct one, and save it as a new JSON file.

    Use the update-dataset command pointing to the new JSON file to replace just the datasource, keeping all other fields the same:

    aws quicksight update-dataset --dataset-id <id> --physical-table-map file://updated-map.json

    Double check that the datasource ARN in the JSON matches an existing one in your account that has the same schema as the original.

    Updating just the datasource reference in the physical table map should resolve the error by replacing the invalid ARN with a valid one, without changing any other dataset properties.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠