Skip to main content
Solved

Select Distinct values Oracle Reader


dustin
Influencer
Forum|alt.badge.img+30

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?

Best answer by david_r

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.

View original
Did this help you find an answer to your question?

2 replies

david_r
Evangelist
  • Best Answer
  • August 11, 2022

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.


dustin
Influencer
Forum|alt.badge.img+30
  • Author
  • Influencer
  • August 11, 2022
david_r wrote:

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.


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