Logical Table Map Upload Error

I am using the Java V1 API to automate my dataset creation using an S3 bucket with a JSON data source. I am able to upload a dataset when I use a PhysicalTableMap only, but when I incorporate data transforms to cast columns from String to Decimal or DateTime via a Logical Table Map, I receive an error on upload. Details:

        // Physical Table ID
        String physicalTableId = physicalTable.toString(); 
        LogicalTableSource logicalTableSource = new LogicalTableSource().withPhysicalTableId(physicalTableId);
        
        // Create collection of data transforms
        ArrayList<TransformOperation> dataTransforms = new ArrayList<>();

        // Column 2 to Decimal
        CastColumnTypeOperation castColumn2 = new CastColumnTypeOperation().withColumnName("Column.2").withNewColumnType(ColumnDataType.DECIMAL);
        TransformOperation column2Transform = new TransformOperation().withCastColumnTypeOperation(castColumn2);
        dataTransforms.add(column2Transform);
        
        // Column 4 to DateTime
        CastColumnTypeOperation castColumn4 = new CastColumnTypeOperation().withColumnName("Column.4").withNewColumnType(ColumnDataType.DATETIME);
        TransformOperation column4Transform = new TransformOperation().withCastColumnTypeOperation(castColumn4);
        dataTransforms.add(column4Transform);

        // Create logical table with transformations
        LogicalTable logicalTable = new LogicalTable().withAlias(tableAlias).withSource(logicalTableSource).withDataTransforms(dataTransforms);

        // Create logical table map
        Map<String,LogicalTable> logicalTableMap = new HashMap<String,LogicalTable>();
        logicalTableMap.put("LogicalTableMap",logicalTable);

    	// Create data set using column cast transforms
    	CreateDataSetRequest createDataSetRequest = new CreateDataSetRequest()
    			.withAwsAccountId(awsAccountId)
     		   .withDataSetId(dataSetId)
     		   .withName(name)
     		   .withPhysicalTableMap(physicalTableMap)
     		   .withLogicalTableMap(logicalTableMap)
     		   .withImportMode(DataSetImportMode.SPICE)
     		   .withPermissions(permissions);

getClient().createDataSet(createDataSetRequest);

I receive the following error: Exception in thread “main” com.amazonaws.AmazonServiceException: Unable to unmarshall exception response with the unmarshallers provided (Service: AmazonQuickSight; Status Code: 400; Error Code: ValidationException; Request ID: ----; Proxy: null)

Again, if I remove “.withLogicalTableMap(logicalTableMap)” from my code, this will upload my data as a String dataset without errors. How can I modify my code for a successful data transform and upload?

ValidationError The input fails to satisfy the constraints specified by an AWS service.

I’m not a java developer but I’m guessing there is something off it the logicalTableMap. I hope someone else can help, and I will make sure to mark this as an error.

Thank you for letting us know. I would recommend filing a case with AWS Support where we can dive into the details so that we can help you further. Here are the steps to open a support case - Creating support cases and case management - AWS Support. If your company has someone who manages your AWS account, you might not have direct access to AWS Support and will need to raise an internal ticket to your IT team or whomever manages your AWS account. They should be able to open an AWS Support case on your behalf. Hope this helps!