Is there an easy way to duplicate a DataSet? I’ve tried the following code but running into the following error:
Code
private DataSet copyDataSet(DataSet source, String name){
CreateDataSetRequest request = CreateDataSetRequest.builder()
.awsAccountId(awsAccountId)
.dataSetId(UUID.randomUUID().toString())
.name(name)
.physicalTableMap(source.physicalTableMap())
.logicalTableMap(modifedLogicalMap(source.logicalTableMap()))
.importMode(source.importMode())
.columnGroups(source.columnGroups())
.fieldFolders(source.fieldFolders())
// .permissions()
.rowLevelPermissionDataSet(source.rowLevelPermissionDataSet())
.rowLevelPermissionTagConfiguration(source.rowLevelPermissionTagConfiguration())
.columnLevelPermissionRules(source.columnLevelPermissionRules())
// .tags()
.dataSetUsageConfiguration(source.dataSetUsageConfiguration())
.build();
CreateDataSetResponse response = client.createDataSet(request);
return describeDataSet(response.dataSetId());
}
Error
Unable to process your request while preparing the table view from your schema, calculated columns [Days Until Lost] are invalid. ErrorType: CONTEXTUAL_UNKNOWN_SYMBOL (Service: QuickSight, Status Code: 400, Request ID: 6a1942f7-4d3b-4a56-b5dd-55073ed518a9)
I found this (What could cause CONTEXTUAL_UNKNOWN_SYMBOL error?) and its possible there is an issue with ordering of calculation fields (suspect they are depending on other fields not yet loaded)
Can someone give me some advice on how I can duplicate my DataSet?