Skip to main content
Solved

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

  • May 12, 2023
  • 3 replies
  • 36 views

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(1) as 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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

david_r
Celebrity
  • 8392 replies
  • 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(1) as 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
  • 8392 replies
  • 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
  • 64 replies
  • 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

Thanks a lot