Question

Using the WHERE Clause in a FeatureReader to search for features based on input parameters from a csv file.

  • 18 December 2017
  • 5 replies
  • 114 views

Badge

I'm trying to use the WHERE Clause in a FeatureReader. I'm reading in an Oracle SDE featureclass and want to only select those records that match an attribute in a csv file I've loaded. I'm assuming that I have everything setup correctly where the attributes from the csv file are FME Feature Attributes. It seems when I add the @Value(col0) to my WHERE Clause, it breaks. How can I check to make sure it is setup correctly?


5 replies

Badge +2
How does it break? Do you have a log file or log message that you can share that might help us identify where the problem is occurring. Sharing your workspace can also help the community identify where a problem lies.

 

 

Badge
How does it break? Do you have a log file or log message that you can share that might help us identify where the problem is occurring. Sharing your workspace can also help the community identify where a problem lies.

 

 

Not sure about sharing the workspace, but here is an error from my log.

 

Could not find the features in the table 'SCHEMA.TABLE'. One possible reason is that a WHERE clause was specified that references a column/field that does not exist in the table. The error number from ArcObjects is: '-2147216072'. The error message from ArcObjects is: {Underlying DBMS error [ORA-01722: invalid number] [SCHEMA.TABLE]}

 

Attached is my configuration for the FeatureReader and WHERE Clause.

 

capture.jpg
Userlevel 2
Badge +12

From the Error message, I take it Col0 maps to a char field. Your where clause in that case should be WHERE <field> = '@Value(col0' . That is including the quotes!

Badge

That was simple enough. I was missing the single quotes. Thanks!

Badge

From the Error message, I take it Col0 maps to a char field. Your where clause in that case should be WHERE <field> = '@Value(col0' . That is including the quotes!

Using @Value in the WHERE clause (for SchemaMapper) didn't work for me. Is there a way to get this to work in 2016.1?

 

 

Reply