Skip to main content
Hello,

 

 

I am a basic user of FME and have created a workbench merging many tables. I need to add a further table, but before I use the FeatureMerger I need to specifiy a WHERE clause on the reader. I have tried doing thison the reader with no joy. I have also tried with the FeatureReader and no joy. I cannot find any help documentation in the reader to help me with syntax. Is there a simple transformer I can use?

 

 

I need a very simple clause to pass only certain attributes from one of the fields into the next transformer.

 

 

Can someone assist please?

 

Harriet
Hi Harriet, 

 

 

I think it needs to be a format that supports querying, like a database.

 

 

Alternatively, you could use a tester

 

 

Owen
Hi Harriet,

 

 

You can use general SQL syntax for the WHERE Clause. For example: num = 100 country = 'Japan'   Naturally, relation operators (<, > etc.) and logical operators (and, or) also can be used. 

 

Takashi
Hi Harriet,

 

 

you could give the SQLExecuter a try and here is more information about SQL.

 

 

http://www.w3schools.com/sql/sql_where.asp

 

 

Best regards,

 

Stefan
Hello,

 

 

Tester! Yes it worked perfectly! I knew it must be simple! Thanks very much guys!
Hi,

 

 

if you have lots of data in your table and you only use a small part, be aware that the Tester will me much slower and will consume a lot more memory than a proper where-clause, as FME will have to pull all the data to your desktop, rather than letting the database filter it for you at the source.

 

 

If you post your where-clause here (as well as the type of reader it is), we might perhaps be able to help you using it.

 

 

David
@Takashi, every time I Google a question about FME, this Knowledge Center is almost always one of the results, and you are almost always the one with the answer. Thanks for your contributions!

Smallworld 4/5 Reader

Here is some documentation for anyone who has the same question but is using a Smallworld 4/5 Reader.

Example: I want to read records from the collection named eo_power_xfrmr_inst with a device_type of "Underground"

WHERE clause: [Electric]eo_power_xfrmr_inst WHERE device_type = "Underground"

 

General formatting: Dataset]<collection_name> WHERE <field_name> = "???"

 


Reply