Skip to main content
Solved

Why do my exposed attributes have null values?


rmcgregor

I am using a featurewriter to update 3 three fields. For this update, I am only exposing the fields that need to be updated, because I have found that works best.

However, I need the rest of the fields in the dataset downstream.

I ran an attributeexposer to reveal the other fields, but they all come in with null values.

These fields do exist in the dataset, and they do have values. How do I access the fields in such a way that I can see the values in them?

imageThank you,

Randy McGregor

Best answer by nielsgerrits

rmcgregor wrote:

The workspace does not load the fields before the featurewriter, but the fields are in the dataset. I may just not be understanding how featurewriter works (a strong possibility). I was hoping I could update the three fields first - having ONLY those three exposed, then expose the rest of the fields later. Apparently, it doesn't work that way?

The FeatureWriter writes, it does not read. So if you had a (Feature)Reader upstream of the FeatureWriter, reading these records, you should have these attributes. If you did not, you won't have them as the workspace never loaded the data.

 

But there seems to be a bug where attributes not assigned in the FeatureWriter, do not continue through the additional outputports. Which is solved in 2023.1.

View original
Did this help you find an answer to your question?

7 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

I'm having a hard time visualizing the workflow you have, can you share a printscreen of the workspace from the reader to where you need the attributes?


rmcgregor
  • Author
  • August 15, 2023

The writer updates three fields, the three fields plus the match field are crossed out with black. There are 7 additional fields I need for another transformation - Red. I am trying to reveal them and their values. I picked the fields from a list. They are all from the database, but they come in blank. Thank you!

image.png


nielsgerrits
VIP
Forum|alt.badge.img+54
rmcgregor wrote:

The writer updates three fields, the three fields plus the match field are crossed out with black. There are 7 additional fields I need for another transformation - Red. I am trying to reveal them and their values. I picked the fields from a list. They are all from the database, but they come in blank. Thank you!

image.png

Were the fields already loaded before the FeatureWriter? If you put the AttributeExposer before the FeatureWriter, are they having values then? If not, the fields were never loaded. If they are, you might be tripped over a bug mentioned in this topic?


rmcgregor
  • Author
  • August 15, 2023

The workspace does not load the fields before the featurewriter, but the fields are in the dataset. I may just not be understanding how featurewriter works (a strong possibility). I was hoping I could update the three fields first - having ONLY those three exposed, then expose the rest of the fields later. Apparently, it doesn't work that way?


nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • August 15, 2023
rmcgregor wrote:

The workspace does not load the fields before the featurewriter, but the fields are in the dataset. I may just not be understanding how featurewriter works (a strong possibility). I was hoping I could update the three fields first - having ONLY those three exposed, then expose the rest of the fields later. Apparently, it doesn't work that way?

The FeatureWriter writes, it does not read. So if you had a (Feature)Reader upstream of the FeatureWriter, reading these records, you should have these attributes. If you did not, you won't have them as the workspace never loaded the data.

 

But there seems to be a bug where attributes not assigned in the FeatureWriter, do not continue through the additional outputports. Which is solved in 2023.1.


rmcgregor
  • Author
  • August 15, 2023

Thank you very much. That makes sense. The structure of FME sometimes confuses me. I appreciate your time.


nielsgerrits
VIP
Forum|alt.badge.img+54
rmcgregor wrote:

Thank you very much. That makes sense. The structure of FME sometimes confuses me. I appreciate your time.

Happy if I can help. It is originally an ETL tool, where the readers do the extract and the writers the load part. It can do a lot more nowadays.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings