Solved

AttributePivoter output error

  • 26 September 2017
  • 4 replies
  • 4 views

Hi

I am brand new to FME so this is probably an easy question to answer. I have used AttributePivoter to get a sum value into the field I entered in Row Group Summary Line Descriptor. I would then like to use the value in this field in an SQL calculation using InlineQuerier in the next step, but InlineQuerier does not recognize the Def_points_Sum table field.

Any ideas?

Thanks

icon

Best answer by dustin 26 September 2017, 17:48

View original

4 replies

Userlevel 3
Badge +26

The 'Row Group Summary Line Descriptor' is part of the value of the field, not the name of the field itself. So in your case, coming out of your Summary output, would be one feature with an Attribute field of id, with a value of id Def_points_Sum. The way you have your connections now, you have a separate feature for each of the unique 'id's' in your data. To get the result you are looking for, I believe you would need to make the connection to the Summary port of the AttributePivoter, and use the value from the 'Def_points' field in your InlineQuerier.

Have you used Inspectors before? Right-click on the output port of the AttributePivoter, and click Connect Inspector. This will allow you to visualize what is coming out of each port, and subsequently into the InlineQuerier

The 'Row Group Summary Line Descriptor' is part of the value of the field, not the name of the field itself. So in your case, coming out of your Summary output, would be one feature with an Attribute field of id, with a value of id Def_points_Sum. The way you have your connections now, you have a separate feature for each of the unique 'id's' in your data. To get the result you are looking for, I believe you would need to make the connection to the Summary port of the AttributePivoter, and use the value from the 'Def_points' field in your InlineQuerier.

Have you used Inspectors before? Right-click on the output port of the AttributePivoter, and click Connect Inspector. This will allow you to visualize what is coming out of each port, and subsequently into the InlineQuerier

Thank you @cartoscro. I have added Inspectors but apart from the separate feature for each of the unique 'id's' the rest of the table is all blank. Any tips on how I could keep all the original data alongside the pivot summary of the Def_points field for each unique id?

Userlevel 3
Badge +26

Thank you @cartoscro. I have added Inspectors but apart from the separate feature for each of the unique 'id's' the rest of the table is all blank. Any tips on how I could keep all the original data alongside the pivot summary of the Def_points field for each unique id?

Perhaps the StatisticsCalculator would be better suited, instead of the AttributePivoter. You can group by the id field, attributes to analyze would be Def_points. Remove the default calculated attributes, except for the Sum Attribute. Sounds like you would want what comes out of the Complete port.

 

 

Userlevel 4
Badge +13

Hi @johannhurter, are you able to place an AttributeExposer after the AttributePivoter to expose the Grand Total Sum attribute?

Reply