Skip to main content

Is there an option or setting that I have missed?

I have a reader pulling in data from a portal feature service. I set it to resolve domains.

I have a field that, for whatever reason, the coded value is not being resolved so the “_resolved” field is being populated as <null>.

Rather than having to add transformers to each of my workbenches to check each of my domain fields, I was wondering if there is a setting I am missing somewhere?

In this instance, I would rather have the coded values populate the “_resolved” field rather than it show up as “<null>”. Is there an option that I can set in the reader (or somewhere else) to be able to do this?

 

I am using Workbench 2023.1.

 

This post indicates that there was no option 3 years ago… hoping there’s been an update made?

 

Also, looks like no progress made on this request (from 4 years ago!) to at least add a warning in this type of situtaion. Please go upvote:

 

AFAIK there is no setting you have missed. As a workaround I have used AttributeManagers with conditional values to move the contents of the coded column to the _resolved column if the value in the _resolved column is Null. I bet a PythonCaller could do this in a fancy dynamic way. 

I have upvoted the idea :)


I added a new idea submission to add the option to bring over the original value (instead of just giving a warning in the original idea submission). Not sure if this is redundant but here is the link to upvote if you are so inclined:

 


I've got a dynamic solution for you! I created the ResolvedDomainPopulator transformer and shared it on the FME Hub. You can check it out here: https://hub.safe.com/publishers/geospatialize/transformers/resolveddomainpopulator

I'm constantly trying to improve this transformer and make it more valuable for the FME community. If you have any feedback, suggestions, or ideas on how I can make it better or easier to use, please reach out to me.

Cheers!


I've got a dynamic solution for you! I created the ResolvedDomainPopulator transformer and shared it on the FME Hub. You can check it out here: https://hub.safe.com/publishers/geospatialize/transformers/resolveddomainpopulator

I'm constantly trying to improve this transformer and make it more valuable for the FME community. If you have any feedback, suggestions, or ideas on how I can make it better or easier to use, please reach out to me.

Cheers!

@geospatialize I tried to use this transformer but it’s built in Workbench 2024 and I am not sure I can get my workbench updated from 2023 just yet. Do you have any advice on how I can accomplish this task in Workbench 2023?


I've got a dynamic solution for you! I created the ResolvedDomainPopulator transformer and shared it on the FME Hub. You can check it out here: https://hub.safe.com/publishers/geospatialize/transformers/resolveddomainpopulator

I'm constantly trying to improve this transformer and make it more valuable for the FME community. If you have any feedback, suggestions, or ideas on how I can make it better or easier to use, please reach out to me.

Cheers!

@geospatialize I tried to use this transformer but it’s built in Workbench 2024 and I am not sure I can get my workbench updated from 2023 just yet. Do you have any advice on how I can accomplish this task in Workbench 2023?

Hello @sammy, I used a simple pythoncaller transformer to do this task! This is the script that I used: 

import fmeobjects


def FeatureProcessor(feature):
attributes = feature.getAllAttributeNames()
for attr_name in attributes:
if not attr_name.endswith('_resolved') and not attr_name.startswith('fme') and not attr_name.startswith('multi'):
resolved_attr_name = attr_name + '_resolved'
original_value = feature.getAttribute(attr_name)
resolved_value = feature.getAttribute(resolved_attr_name)

if original_value is not None and (resolved_value is None or str(resolved_value).strip() == ''):
feature.setAttribute(resolved_attr_name, str(original_value))
elif original_value is None and (resolved_value is None or str(resolved_value).strip() == ''):
feature.setAttribute(resolved_attr_name, '<null>')

return feature

I have also attached a workspace (used Workbench 2023.2.4) so you can copy the configured transformer into your workbench 2023 workspace!

Hope this help :D


Hello @sammy, I used a simple pythoncaller transformer to do this task! This is the script that I used: 

import fmeobjects


def FeatureProcessor(feature):
attributes = feature.getAllAttributeNames()
for attr_name in attributes:
if not attr_name.endswith('_resolved') and not attr_name.startswith('fme') and not attr_name.startswith('multi'):
resolved_attr_name = attr_name + '_resolved'
original_value = feature.getAttribute(attr_name)
resolved_value = feature.getAttribute(resolved_attr_name)

if original_value is not None and (resolved_value is None or str(resolved_value).strip() == ''):
feature.setAttribute(resolved_attr_name, str(original_value))
elif original_value is None and (resolved_value is None or str(resolved_value).strip() == ''):
feature.setAttribute(resolved_attr_name, '<null>')

return feature

I have also attached a workspace (used Workbench 2023.2.4) so you can copy the configured transformer into your workbench 2023 workspace!

Hope this help :D

@geospatialize  Thanks! I was also in the process of writing a python script so this will be helpful! Thank you!


Reply