I have logged a support case about my problem, but figured I might as well check to see if anyone else have encoutered this problem:
I am writing a workspace to geosynchronize a Feature Service with a database. The Feature Service contains about 30 layers that need to be updated, so I have put my bet in for a dynamic workspace, since the operation is the same for every layer. This saves me a lot of transformers and makes the maintenance of the workspace much simpler.
My challenge here is that both the FeatureReader and FeatureWriter requires the name of the layer to be passed in as a parameter, not the layerid, which would not be a problem. Almost all of these layers have names containing, at least, one space, and this is what is causing my trouble.
On the reader side, I can enclose the layer name in double quotes, like “My Layer”, and this works without problems.
On the writer side, however, things are messed up. I have so far tried three different approaches:
- Enter the name “as is”, like My Layer - this produces a Python error stating Python Exception <KeyError>: 'My Layer'
- Enclosing the name in double quotes, like “My Layer”, the writer says that it does not recognize any layer with the name _My Layer_.
- Enclosing the name in single qoutes, like ‘My Layer’, the writer says that i does not recognize any layer with the name ‘My Layer’.
I can see why number two fails, the writer performs a renaming of attributes “based on format constraints for invalid characters, length, and case” as reported from the writer. I have a list with attriutes like MyList{1}, which is auomatically renamed to MyList_1_, so my layer name most likely gets the same treatment.
Have anyone of you out there experienced the same and come up with a solution to this?
I have encountered this problem in FME FLow 2023.2.1 and I have tested it in FME Flow 2024.0.1 with the same result. I am performing my read/Write in a embedded custom transformer, that looks like this: