Skip to main content
Solved

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


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.

View original
Did this help you find an answer to your question?

4 replies

ctredinnick
Supporter
Forum|alt.badge.img+19
  • Supporter
  • 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+54

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


ctredinnick wrote:

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


nielsgerrits wrote:

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!


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