Skip to main content
Question

Is it possible to use multiple parameters as input for "Feature Types to Read" constraint of "FeatureReader" transformer?


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?

2 replies

Forum|alt.badge.img+2
  • August 29, 2022

@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.


  • Author
  • August 30, 2022

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings