Issue with the "Flatten Variant" component: Invalid argument types for function 'GET': (VARCHAR(2000), VARCHAR(8))

I have run into an issue with the "Flatten Variant" Transform component

Error in the logs:

Invalid argument types for function 'GET': (VARCHAR(2000), VARCHAR(8)).

 

 

SQL Generated:

SELECT 

“FLATTEN_VARIANT_INPUT”.“workerJson”:“workerID”::variant as “workerID”

FROM 

“$T{STAGE_WORKER_20211014_101000}” “FLATTEN_VARIANT_INPUT”

The reason for this error was due to the column not being of type "Variant". The fix for this is to use a Calculator component in front of things and the PARSE_JSON function to put things into Variant which can then be digested by the Flatten Variant component.