When importing asset from export, when should I use OverrideParameters?

@DylanM

I have snowflake datasource. Export worked without any issue. But, I get the following error when I try to import.

   res_import=targetQuickSight.start_asset_bundle_import_job(
        AwsAccountId=TargetAccountID,
        AssetBundleImportJobId=AssetBundleImportJobId_,
        AssetBundleImportSource={"S3Uri":"s3://"+tgt_bucket_name+"/"+local_filename},
        FailureAction='ROLLBACK'
    )

Then, I get this error.

‘JobStatus’: ‘FAILED_ROLLBACK_COMPLETED’,
‘Errors’: [{‘Arn’: ‘arn:aws:quicksight:us-east-1:xx:datasource/xx-1738-4043-9d5d-a0fcc638d7a2’,
‘Type’: ‘com.amazonaws.services.quicksight.model.InvalidParameterValueException’,
‘Message’: ‘Feature is not supported for this data source type’}],

Here, I didn’t use any ‘OverrideParameters’ option.

When I look at the exported file for the datasource from Source account, I see it contains Snowflake information for DEV account.

{“resourceType”:“datasource”,“dataSourceId”:“xx-1738-4043-9d5d-a0fcc638d7a2”,“name”:“snowflake”,“type”:“SNOWFLAKE”,“dataSourceParameters”:{“snowflakeParameters”:{“host”:“xx.us-east-1.snowflakecomputing.com”,“database”:“DEV”,“warehouse”:“wh_dev_03”,“authenticationType”:“password”}},“sslProperties”:{“disableSsl”:false}}

I know target account is using different database, warehouse, host.

  1. Do I need to use OverrideParameters to override that?

  2. What happens if I make a mistake and overwrite with wrong connection info? Does it adversely affect the existing datasources in Target account ?

  3. I see dataset exported file contains AccountID. Do I need to change this so it points to target AccountId?

{“resourceType”:“dataset”,“dataSetId”:“xx-b4f8-40d3-86b8-bdf8ad5eadea”,“name”:“rxxx_otd_s3”,“physicalTableMap”:{“xx-3b08-4159-84bd-777790659e21”:{“s3Source”:{“dataSourceArn”:“arn:aws:quicksight:us-east-1:xxxxxxx:datasource/xx-c5f5-4e8e-af20-72ff27cbd5ac”,“uploadSettings”:{“format”:“CSV”,“startFromRow”:1,“containsHeader”:true,“textQualifier”:“DOUBLE_QUOTE”,“delimiter”:“^”},“inputColumns”:[{“name”:“Date”,“type”:“STRING”},{“name”:“EMS”,“type”:“STRING”},

  1. I see Analysis export file contains datasetArn which has source accountId.

{“resourceType”:“analysis”,
“analysisId”:“xx-0acc-4285-82cc-20aa297901a2”,
“name”:“jc_import_export_s3”,
“definition”:{“dataSetIdentifierDeclarations”:[
{“identifier”:“rxx_agedinventory_s3”,
“dataSetArn”:“arn:aws:quicksight:us-east-1:xxx:dataset/xxx-953e-4dee-b4e3-9de75fcc0533”}
],

I see Dashboard export file also contains datasetArn

{“resourceType”:“dashboard”,
“dashboardId”:“xx-57ed-439b-9365-d22933635039”,
“name”:“jc_import_export_db”,
“definition”:{
“dataSetIdentifierDeclarations”:[
{“identifier”:“rxx_agedinventory_s3”,
“dataSetArn”:“arn:aws:quicksight:us-east-1:xx:dataset/xx-953e-4dee-b4e3-9de75fcc0533”}
],

Hi

Override parameters allow you to update certain values prior to importing. db, warehouse and host fall under that category.

Since you are getting the error without parameters - i would suggest creating a support ticket so the error can be traced.

Regarding your second question - it will override the same datasource if it exists in the target, so its something to be mindful of.

No, accountid. will be automatically updated by AAB.

An alternative is to open the qs (its a zip file), find the datasource json, update json, re-zip, import.

Regards,
Ramon Lopez

thanks for the reply.

Just want to confirm a few things.

  1. dashboard/analysis has dataset info. That means it comes with source accountId. You’re saying I don’t need to update that to Target accountId as this is updated by AAB(?)
    dataset seems to be have datasource arn only. So, I think accountId will be updated automatically. Is this correct?

  2. for datasource, it is needed to use OverrideParameters most likely. Target datasource information (whether it’s Database or s3 file) will be different from source side.

thanks

Hi @tbdori

1- yes
2- correct - as long as it’s the same datasource - that is the purpose of the override parameters.

Regards,
Ramon

1 Like