Skip to main content

Recently started using FME (2020.2.3.0 now, but will switch soon to 2022) and was struggling with giving parameters as input for "Feature Types to Read" for "FeatureReader".

 

Input:

imageTGT_SCHEMA = "DATALAKE"

TGT_TABLE="GEODATA"

$(TGT_SCHEMA).$(TGT_TABLE) is given as input to "Feature Types to Read".

 

Expected behaviour:

I want FeatureReader to read the schema and table from parameters to become '"DATALAKE"."GEODATA"'.

 

Actual behaviour:

Snowflake Non-Spatial Reader: Error reading schema for table '$(TGT_SCHEMA).$(TGT_TABLE)'. Error: net.snowflake.client.jdbc.SnowflakeSQLException: SQL compilation error:

Schema 'DATALAKE."$(TGT_SCHEMA)"' does not exist or not authorized.

 

We are authorized and problem seems that FME can't parse TGT_SCHEMA correctly while it is defined. It can read $(TGT_TABLE) from parameters though?

 

Workaround:

Currently we have a workaround already to make variables from parameters with an "AttributeCreator" and then use @Value(tgt_schema).@Value(tgt_table) in "Feature Types to Read" constraint of the "FeatureReader".

 

Question:

We were wondering if we did something wrong with giving multiple parameters to "Feature Types to Read" or if this is a bug that can be fixed by FME?

@david_gis​ I couldn't reproduce this in FME 2022.1. In your error it does look like the TGT_SCHEMA is getting an extra set of quotes

DATALAKE."$(TGT_SCHEMA)"

so perhaps check that. But it does look like you have a workaround using attributes instead.


Thanks for the help Mark. Will try it later with FME 2022.1 too to see if I can reproduce it. For now we keep using workaround.


Reply