Solved

Select Distinct values Oracle Reader

  • 11 August 2022
  • 2 replies
  • 3 views

Userlevel 3
Badge +26

I have an Oracle database with about 500,000 entries. I want to read in 1 feature for each unique value of 'DEVICE_TYPE'. Is there a select or where clause I can use to do this?

icon

Best answer by david_r 11 August 2022, 13:56

View original

2 replies

Userlevel 4

The most efficient will be to use an SQLExecutor rather than a reader for this, e.g.

SELECT DISTINCT DEVICE_TYPE
FROM my_table_name

If you want it to be as fast as possible, make sure that "DEVICE_TYPE" is indexed in the database.

For larger datasets, this will be an order of magnitude faster than reading all the data into FME and then using the DuplicateRemover.

Userlevel 3
Badge +26

The most efficient will be to use an SQLExecutor rather than a reader for this, e.g.

SELECT DISTINCT DEVICE_TYPE
FROM my_table_name

If you want it to be as fast as possible, make sure that "DEVICE_TYPE" is indexed in the database.

For larger datasets, this will be an order of magnitude faster than reading all the data into FME and then using the DuplicateRemover.

Thanks @david_r​, this was very helpful.

Reply