I’m using start_asset_bundle_export_job/start_asset_bundle_import_job triggered by the folder event(s).
When I add a dashboard that uses 2 datasets (CSV files), I see the dashboard in the target account actually points to the source account. This means the import job actually overrides the information.
To fix that, I am trying to overrideParameters. In CLI, I can unzip the export qs file and easily pick out datasource IDs from the /datasource folder. Then, I can throw those into OverrideParameters
OverrideParameters={
'DataSources': [
{
'DataSourceId': 'xxxx',
'DataSourceParameters': {
'S3Parameters': {
'ManifestFileLocation': {
'Bucket': stg_bucket_name,
'Key': 'xxxxxxxxxx'
}
}
}
},
{
'DataSourceId': 'yyyyy',
'DataSourceParameters': {
'S3Parameters': {
'ManifestFileLocation': {
'Bucket': stg_bucket_name,
'Key': 'yyyyyyyyyyyyyy'
}
}
}
}
]
}
But, since I want to do this with folder event, I am trying to find a better way to do this in the Lambda code.
Esp. getting DataSourceId is the challenge. Can I get those without unzipping? Or, do I have to implement this within the lambda also?