Skip to main content
Solved

Count of Attributes with irrespective of schema


pratap
Contributor
Forum|alt.badge.img+11

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)
View original
Did this help you find an answer to your question?

3 replies

bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • 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+11
  • Author
  • Contributor
  • May 8, 2020
bwn wrote:

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
  • May 8, 2020
pratap wrote:

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.


Reply


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