Skip to main content

I am in the process of developing a custom transformer that can write a coded domain list to a new file geodatabase file, using this article as inspiration: https://community.safe.com/s/article/creating-and-associating-geodatabase-domains-dynam

 

The hope is to create these domain values either from the existing data or a look-up table within FME. Then upload the file geodatabase with these new domains to ArcGIS Online.

 

I have followed the guidance in the article and believe it should work.

 

The attached transformer edits the schema feature of the relevant attribute to something like this: "attribute{7}.native_data_type (string: UTF-8): coded_domain(FloorType:char(255):2:"2":1:"1":0:"0")". But when trying to write dynamically to gdb from the Schema Feature, the domain doesn't carry through.

I compared the syntax of writing a coded domain manually to gdb in FME (by editing the user attributes) and looking at the log, and the format is the same as the above.

 

With advanced logging and writing dynamically to gdb, I get the error message "File C:\\Program Files\\ArcGIS\\Data Interoperability for ArcGIS Pro\\metafile\\MULTI_WRITER.fmf could not be opened". Not sure if that's relevant.

 

Am I missing something? At the moment it feels like unexpected behaviour as what I have aligns closely to the article linked at the top.

 

Is someone able to try the attached custom transformer on their own data, write to a new file geodatabase dynamically and see if it the domains write successfully? It'll be a good one to publish to the FME Hub if I can get it working. E

 

Edit: Custom transformer now available on the FME hub.

 

I'm on data interop, FME 2021.1.2.0.

 

Thanks!

Hi @James Singleton​ 

I was unable to generate a valid coded domain definition using your custom transformer. Are the attributes values defined in Code_Label_2 correct? The current transformer does not seem to create valid DomainCode and DomainLabel values (ie. missing) resulting in invalid code:value pairs.

gdbDomainCodeValuePairHowever, once I added the correct values to this transformer, I was able to successfully create and associate a domain. I wonder if the difference in behaviour is due to Data Interoperability.


Hi @James Singleton​ 

I was unable to generate a valid coded domain definition using your custom transformer. Are the attributes values defined in Code_Label_2 correct? The current transformer does not seem to create valid DomainCode and DomainLabel values (ie. missing) resulting in invalid code:value pairs.

gdbDomainCodeValuePairHowever, once I added the correct values to this transformer, I was able to successfully create and associate a domain. I wonder if the difference in behaviour is due to Data Interoperability.

Hi @debbiatsafe​ 

Thanks for looking into this. The parts in Code_Label_2 work perfectly for me - it should retrieve the values from the name of the attribute in the user parameter AttributeName which is fetched at the start. I'm not sure why that part would fall over (perhaps the ParameterFetcher?) but I'm open to suggestions if you believe there's a better way.

 

That's good news you managed to create the domain so we know the method broadly works, but a shame that it looks like the issue is with the Data Interop version... It's the same issue with the File Geodb Open API dynamic writer too. Any suggestions of where to go from here?


Hi @debbiatsafe​ 

Thanks for looking into this. The parts in Code_Label_2 work perfectly for me - it should retrieve the values from the name of the attribute in the user parameter AttributeName which is fetched at the start. I'm not sure why that part would fall over (perhaps the ParameterFetcher?) but I'm open to suggestions if you believe there's a better way.

 

That's good news you managed to create the domain so we know the method broadly works, but a shame that it looks like the issue is with the Data Interop version... It's the same issue with the File Geodb Open API dynamic writer too. Any suggestions of where to go from here?

My initial thought was that Data Interoperability somehow wasn't able to work with the coded domain list created in the workspace. However, I tested creating a coded domain using the method described in the article and was able to successfully create the domain. Note: I don't have access to 10.9 Data Interoperability so testing was done on 10.8.1.

Could the issue be with the test data you're using? I used the data from the example in the article. What are your results if you use the same data?


Hi @debbiatsafe​ 

Thanks for looking into this. The parts in Code_Label_2 work perfectly for me - it should retrieve the values from the name of the attribute in the user parameter AttributeName which is fetched at the start. I'm not sure why that part would fall over (perhaps the ParameterFetcher?) but I'm open to suggestions if you believe there's a better way.

 

That's good news you managed to create the domain so we know the method broadly works, but a shame that it looks like the issue is with the Data Interop version... It's the same issue with the File Geodb Open API dynamic writer too. Any suggestions of where to go from here?

Just managed to figure out the issue. It was one of the options in the dynamic gdb writer. I had "Geometry:" set to "geodb_polygon", but when I change this to be "Schema From Schema Feature" it successfully writes the domain. Not sure if that's expected behaviour but at least we finally know where the issue is! Thank you for your help 🙂


Reply