Skip to main content
Solved

how can I arrange attribute in assending order like: 5,6,3 = 3,5,6

  • June 23, 2023
  • 4 replies
  • 23 views

how can I arrange attribute in assending order like: 5,6,3 = 3,5,6

 

also i have check FME python caller but its not work.output is not generating.

 

 

import fme

import fmeobjects

 

 

class FeatureProcessor(object):

  

  def __init__(self):

    """Base constructor for class members."""

    pass

 

  def input(self, feature):

     

    cell_value = feature.getAttribute('Address Component Type')

    cell_value2=sorted(cell_value)

 

    feature.setAttribute('sorted',cell_value2)

 

    self.pyoutput(feature)

 

  def close(self):

    """This method is called once all the FME Features have been processed

    from input().

    """

    pass

Best answer by ctredinnick

AttributeSplitter -> ListSorter -> ListConcatenator. It'll probably have similar performance to python because you keep the same number of features throughout.

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.

4 replies

ctredinnick
Supporter
Forum|alt.badge.img+19
  • Supporter
  • 225 replies
  • Best Answer
  • June 23, 2023

AttributeSplitter -> ListSorter -> ListConcatenator. It'll probably have similar performance to python because you keep the same number of features throughout.


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • June 23, 2023

This is because the result is a list, not an attribute. You can see this if you enable the Feature Information window and select the feature:

2023-06-23_10h15_34


  • Author
  • 2 replies
  • June 23, 2023

AttributeSplitter -> ListSorter -> ListConcatenator. It'll probably have similar performance to python because you keep the same number of features throughout.

Thank you! It's Work


  • Author
  • 2 replies
  • June 23, 2023

This is because the result is a list, not an attribute. You can see this if you enable the Feature Information window and select the feature:

2023-06-23_10h15_34

Thank you!