I am reading a parquet file from S3 in AWS Glue job and creating a Dynamic Frame. I have a requirement of enforcing schema on it before writing the data to a Redshift table. I have the required schema in a Glue Data Catalog table. But, for enforcing the schema the below piece of code did not work using resolvechoice transform. Am I doing something wrong or does this option not work?
S3bucket_node1_resolveChoice = S3bucket_node1.resolveChoice(choice='MATCH_CATALOG',database='redshift',table_name='target_table')