Hi @rohan, I think you can build WHERE clause and detect values out of range for each field if you use the SQLExecutor. e.g.
You can then analyze resulting records to get required result.
If you just need to know the number of values out of range for each field, this SQL statement could also be available.
SELECT count(*) AS num FROM my_table WHERE @Value(_where)
Note: SQL syntax may be slightly different depending on the database format. Modify appropriately for your actual database format if necessary.
in-range-inlinequerier.fmw
Your setup is basically correct.
Of course values may belong to multiple ranges.
Also if you explode your input example you either have 3 ranges or 10 values belonging to 3 ranges.
This works
Hi @rohan, I think you can build WHERE clause and detect values out of range for each field if you use the SQLExecutor. e.g.
You can then analyze resulting records to get required result.
If you just need to know the number of values out of range for each field, this SQL statement could also be available.
SELECT count(*) AS num FROM my_table WHERE @Value(_where)
Note: SQL syntax may be slightly different depending on the database format. Modify appropriately for your actual database format if necessary.
@takashi Thanks to both of you for your responses. I've been trying Takashi's example as it's a bit simpler.
Unfortunately, I'm not getting a usable result.
Here's my SQLExecutor:
()(I have no idea why FME thinks there's a "col3" in the csv file.) I get 7 records, which seems correct. But when I look at the output in the data inspector, I don't seem to get anything I can actually use:
I was hoping it would execute the SQL, but instead it's just giving it back to me in fragments.
Am I missing something here?
Hi @rohan, I think you can build WHERE clause and detect values out of range for each field if you use the SQLExecutor. e.g.
You can then analyze resulting records to get required result.
If you just need to know the number of values out of range for each field, this SQL statement could also be available.
SELECT count(*) AS num FROM my_table WHERE @Value(_where)
Note: SQL syntax may be slightly different depending on the database format. Modify appropriately for your actual database format if necessary.
Have you exposed column names with the 'Attributes to Expose' parameter in the SQLExecutor?
Select a record on the Table View in FME Data Inspector, and see the Feature Information window to check if columns of the record have been read correctly.