Skip to main content
Solved

Which method to find the layers name that has completely no data inside?


spiderman
Contributor
Forum|alt.badge.img+7

Hello ,

is there a way to find the layers name that has only attribute names but all attributes name has completely no data inside it

source data :oracle non spatial

FME 2021

Thanks in advance

Best answer by david_r

My preferred method would be as follows:

  • Use a FeatureReader in "Schema Only"-mode to get a list of all the table names.
  • Use a SQLExecutor to retrieve the number of records for each table, e.g.
select count(1as MY_TABLE_COUNT
from @Value(fme_feature_type_name)
  • Use a Tester to check if MY_TABLE_COUNT= 0

 This will avoid reading any data into FME, which is very efficient especially if there are tables with a lot of data among the empty ones.

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

3 replies

david_r
Celebrity
  • Best Answer
  • May 12, 2023

My preferred method would be as follows:

  • Use a FeatureReader in "Schema Only"-mode to get a list of all the table names.
  • Use a SQLExecutor to retrieve the number of records for each table, e.g.
select count(1as MY_TABLE_COUNT
from @Value(fme_feature_type_name)
  • Use a Tester to check if MY_TABLE_COUNT= 0

 This will avoid reading any data into FME, which is very efficient especially if there are tables with a lot of data among the empty ones.


david_r
Celebrity
  • May 15, 2023

You'll find it on the schema feature, it's not necessary to expose it manually (note that the name is lower case):

imageMake sure to configure the FeatureReader to only read the schema features, and not to include the table contents:

image


spiderman
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • May 15, 2023
david_r wrote:

You'll find it on the schema feature, it's not necessary to expose it manually (note that the name is lower case):

imageMake sure to configure the FeatureReader to only read the schema features, and not to include the table contents:

image

Thanks a lot


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