Solved

SQLExecutor - Keep order when populating the attribute list for the query


Is it possible to keep the order of the query fields when you get the attributes using 'Populate from SQL Query...'? I use it very often and the attributes are ordered alphabetically instead of the order in the query.

Thank you

icon

Best answer by david_r 27 June 2017, 10:27

View original

12 replies

Badge

Isn't it possible to set the order of the attributes in the 'attributes to expose' settings?

Userlevel 4

You'll have to order the attributes manually after importing them, unfortunately.

Userlevel 1
Badge +10
If you suggest it as an idea, I'd vote for it

 

 

Userlevel 4
If you suggest it as an idea, I'd vote for it

 

 

Agreed. I'd rather the database order was preserved and having an optional "sort" button.

Isn't it possible to set the order of the attributes in the 'attributes to expose' settings?

No, it is not possible.
If you suggest it as an idea, I'd vote for it

 

 

There was already a idea for that:

 

https://knowledge.safe.com/idea/22950/order-of-columnsattributes-set-in-sql-is-ignored-b.html

 

 

Userlevel 4
Badge +25
If you suggest it as an idea, I'd vote for it

 

 

fwiw (they may not count it) I voted for this!

 

 

Userlevel 1
Badge +10
fwiw (they may not count it) I voted for this!

 

 

It wouldn't let me vote for this so I'm guessing I already voted at some point

 

 

Badge

If you have DDL access create a view in your DB and import that.

Badge

I have the same problem in FME 2018. A large list of attributes generated from an SQL query is sorted alphabetically in "Attributes to expose".

Is the only solution still to sort them manually?

Badge +2

I have the same problem in FME 2018. A large list of attributes generated from an SQL query is sorted alphabetically in "Attributes to expose".

Is the only solution still to sort them manually?

Hi @stihe, Looking at the status of this related Idea, https://knowledge.safe.com/idea/22950/order-of-columnsattributes-set-in-sql-is-ignored-b.html, unfortunately I believe currently manually reordering them is still the only option. Please vote for the idea, and add your comment to give that idea more momentum. Thank you very much!

Badge

An other somewhat hacky option is to use other software, like toad, to extract the first record of your data to csv, then copy the header row and paste it into the attributes to expose.

While it takes a few steps if saves having reorder everything, especially when you have a lot of fields.

Note when you first add the transformer you can't manually edit the attributes, so just enter anything from the ... then you can paste in you list of fields on the main transformer screen.

Hope this helps

Reply