So, I just went and copied the values into a text editor to manually sort them and noticed that any values which include spaces are being surrounded by double-quotes. These values then end up at the top of the list (in order) and the single word values end up in a seperate ordered list below.
Seems like this might be a "feature" of the import process as the values are not quoted in Oracle.
any chance the data type might have something to do with it?
Could you use an AttributeTrimmer to remove the quotes?
Thanks for your responses.
@Cartoscro - I cant use the AttributeTrimmer because this isn't part of the workspace. It's when I import values as part of the configuration process of defining a published parameter.
@Itay - the published parameter's type is "Choice or Text". The Oracle datatype is varchar2. Shouldn't be any conflict there.
I think this is just an issue with the way FME is importing the values. Perhaps it should be quoting all values when they're imported and not just those that contain spaces...
Risking stating the obvious, you could create and order the list of parameter values before hand, with a separate ws.
I admit it is not very elegant but I dont see any other way to order the values when importing via the GUI.
This can for sure go down as a serious improvement request to safe.
Thanks Itay. I had thought of doing that but, as you say, it's not very elegant.
I guess I'll just have to see how often my source data changes and how frustrating it becomes to change it by hand before proceeding down that path. I've done it once before for a more critical workspace, so I know it's technically possible...
Hi Nic,
It would be the best solution that FME is improved about this issue. As a present solution, how about adding a view which returns quoted parameter values to the database, and importing it? e.g. create view vw_name as select '"'||column_name||'"' as param_value from table_name; I have not the Oracle environment, but this way worked successfully on MS SQL Server 2008 R2.
Takashi
Brilliant solution Takashi! I tested it out in Oracle and it works.
thanks,
Nic
Hi Nic,
That looks like a definite bug to me. I've filed it as PR#45374 so that we get it fixed. I'll let you know when this is done.
In the meantime, great solution Takashi!
Regards
Mark
...and it's fixed already. Won't be in FME until 2014 though. If you have a need for this to be backported to a 2013 Service Pack then do let me know, but it sounds like you have a good workaround.
Thanks for the fix!
I'm fine with using my workaround for the time being.