Trying to add leading zeros to an existing field

ERROR TYPE: SQL_SCHEMA_MISMATCH_ERROR Learn more
The data source schema doesn’t match the QuickSight dataset.
ERROR DETAILS: The row input schema does not expect a string. Incorrect Column Type at Index 12 for Column TEST_NBR with DataprepLogicalType Int
Any idea why the dataset would error out when using LPAD for adding leading zeros. It works okay while pulling the field as it is. Thank You.

Hi @sacharekar

This could be data type mismatch.
Here is the list of : Supported data types from other data sources - Amazon QuickSight
Check if the field type is supported or you can try converting the filed into one of the supported types in this document.

1 Like

@sacharekar - Thanks for posting your query. From the message it seems that you are having a field with integer data type and to that you are trying to do LPAD. Typically these padding functions work only with string datatype based attributes. Hence would request you to verify the datatype and take necessary actions (e.g. casting etc.) in order to satisfy your use case. Hope this helps!

Did my suggestion help you in resolving your query? If yes, would request you to mark the post as “Solution”. This will help the community to find guidance and answers to similar question. Thank you!