Copying Quicksight analysis with same data but different datasets

0

Hi, I have been using Quicksight for a short time. I'm trying to copy a quicksight analysis from one region to another. The regions refer to datasets that have the same data but different table and column names. I'm using AWS CLI. I have made several attempts like this: aws quicksight create-analysis --aws-account-id xxxxxxx --analysis-id xxxxxxxx --name "New analysis" --source-entity=file:/path/to/modified_analysis.json --region <new region>. Any suggestions?

2 Answers
0

Hi. Here are some steps you can follow to copy the analysis from one region to another:

  1. Export the analysis from the source region: Use the "get-dashboard" command to export the analysis JSON file from the source region:

aws quicksight describe-analysis --aws-account-id <source_account_id> --analysis-id <source_analysis_id> --region <source_region> --output json > analysis.json

  1. Open the analysis.json file and replace all occurrences of the source dataset name and column names with the target dataset name and column names. Import the modified analysis to the target region.

  2. Use the create-analysis command to import the modified analysis to the target region:

aws quicksight create-analysis --aws-account-id <target_account_id> --analysis-id <target_analysis_id> --name "New Analysis" --source-entity=file://analysis.json --region <target_region>

Hopefully, It should work!

profile pictureAWS
answered a year ago
AWS
EXPERT
reviewed a year ago
  • Parameter validation failed: Unknown parameter in SourceEntity: "Status", must be one of: SourceTemplate Unknown parameter in SourceEntity: "Analysis", must be one of: SourceTemplate Unknown parameter in SourceEntity: "RequestId", must be one of: SourceTemplate

    Now I have this problem. In the file.json there is no reference to the SourceTemplate and SourceEntity

0

Hi, To import an analysis from a JSON file, you can try the "update-analysis command" instead. Here is an example command:

aws quicksight update-analysis --aws-account-id <your-account-id> --analysis-id <analysis-id> --source-entity=file://path/to/modified_analysis.json --force-embed-dataset --region <region>

Make sure to replace the placeholders in the command with the actual values for your account, analysis ID, JSON file path, and region.Note the use of "file://" to specify the path to the JSON file. Also note the use of "--force-embed-dataset" to embed the dataset in the analysis. This is necessary because the dataset in the new region may have a different name than the dataset in the original region. With this command, you should be able to import the analysis from the JSON file in the new region.

Let me know if it works!

profile pictureAWS
answered a year ago
  • I just tried but the error it returns is: Unknown options: --force-embed-dataset. I'm starting to think I have some permission problem because I don't have admin access. When I run the command you told me in the first message, it returns an error of "Unknown parameter in SourceEntity". The problem is that in the file.json I have no reference to SourceEntity and SourceTemplate. However worst case scenario I do it manually.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions