Skip to main content
Solved

Count of Attributes with irrespective of schema

  • May 6, 2020
  • 3 replies
  • 34 views

pratap
Contributor
Forum|alt.badge.img+12

Hi Guys,

Can any one guide me on how to perform "INPUT" I have to as "OUTPUT" I require...

Input will be GDB object class table

Output will be excel spreadsheet.

Schema of the table will be dynamic as I will use different tables. I have provided spreadsheet as an example to understand better...

Thank you

Best answer by bwn

From the sample shown:

  • Transform the Input into the required Attribute Name vs Value table using AttributeExploder
  • Create the Summary version of this that counts the number of unique values for every Attribute Name with StatisticsCalculator (or InlineQuerier by using a Count(*) in the SELECT Statement with a GROUP BY Attribute Name, Attribute Value)
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

bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • 562 replies
  • Best Answer
  • May 6, 2020

From the sample shown:

  • Transform the Input into the required Attribute Name vs Value table using AttributeExploder
  • Create the Summary version of this that counts the number of unique values for every Attribute Name with StatisticsCalculator (or InlineQuerier by using a Count(*) in the SELECT Statement with a GROUP BY Attribute Name, Attribute Value)

pratap
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • 605 replies
  • May 8, 2020

From the sample shown:

  • Transform the Input into the required Attribute Name vs Value table using AttributeExploder
  • Create the Summary version of this that counts the number of unique values for every Attribute Name with StatisticsCalculator (or InlineQuerier by using a Count(*) in the SELECT Statement with a GROUP BY Attribute Name, Attribute Value)

Hi @bwn,

 

StatisticsCalculator cant be used because of dynamic schema but Inline querier can be used.

Thank you


bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • 562 replies
  • May 8, 2020

Hi @bwn,

 

StatisticsCalculator cant be used because of dynamic schema but Inline querier can be used.

Thank you

No problems. Noting, however, that the Output Port of AttributeExploder is a fixed Schema. There are only two Attributes output:

  • _attr_name (Attribute Name)
  • _attr_value (Attribute Value)

However, InlineQuerier is usually a bit quicker than StatisticsCalculator in any case, it just requires a bit more knowledge of SQL syntax. So if that is working for you, then use that.

Otherwise, StatisticsCalculator can be used without the need for writing SQL more comfortably, but with a performance penalty although I believe Safe is looking to accelerate its performance soon in within later versions of FME.