Skip to main content

I'm using FeatureReader as CSV format and trying to expose attribute 'fme_feature_type'. It's returning NULL or CSV. Instead it has to return FILENAME.

Any thoughts please?

Hi @fmeuser_gc

 

Try fme_basename or fme_dataset as the attribute to expose instead.

Whatever the brown feature type on the canvas is saying, that's the attribute value you'd get when using fme_feature_type.


Hi @fmeuser_gc

 

Try fme_basename or fme_dataset as the attribute to expose instead.

Whatever the brown feature type on the canvas is saying, that's the attribute value you'd get when using fme_feature_type.

Hi @jlutherthomas, no it still returns NULL values.

 


I have seen this before, but only in the Data Inspector (version of the transformer is 5, works OK with version 4).

If you write the data to an output format, does it still remain NULL?

In my case it showed the file name in the output, but not in the Data Inspector, even though it was exposed.


I have seen this before, but only in the Data Inspector (version of the transformer is 5, works OK with version 4).

If you write the data to an output format, does it still remain NULL?

In my case it showed the file name in the output, but not in the Data Inspector, even though it was exposed.

Hi @erik_jan, I get nothing in both Data inspector and Output format.

 


Hi @jlutherthomas, no it still returns NULL values.

 

Can you expose it using the AttributeExposer rather than on the feature type?
Can you expose it using the AttributeExposer rather than on the feature type?
It still returns defalut 'CSV' value. Actually looking for name of file

 

 


@fmeuser_gc - Try using an AttributeManager after the FeatureReader to create a new attribute that references fme_feature_type as the value. I've attached a workspace template created using FME 2017.1.2 Build 17722 that demonstrates this.

The fme_feature_type remains null, but my new attribute _fft is populated and writes out correctly (using native CSV Writer).

Hope this helps!

fme-feature-type-2017.fmwt

 

Edit: The display issue with fme_feature_type values in the FME Workbench Canvas and FME Data Inspector is no longer observed with FME 2018.0 Build 18240 or Newer.
It still returns defalut 'CSV' value. Actually looking for name of file

 

 

 

Have you tried exposing fme_basename or fme_dataset instead of fme_featuretype? The feature type is CSV in your case, so you need a different attribute

The answers here may be useful, especially the one from Takashi: https://knowledge.safe.com/questions/52039/what-do-fme-dataset-fme-basename-and-fme-feature-t.html


@fmeuser_gc - Try using an AttributeManager after the FeatureReader to create a new attribute that references fme_feature_type as the value. I've attached a workspace template created using FME 2017.1.2 Build 17722 that demonstrates this.

The fme_feature_type remains null, but my new attribute _fft is populated and writes out correctly (using native CSV Writer).

Hope this helps!

fme-feature-type-2017.fmwt

 

Edit: The display issue with fme_feature_type values in the FME Workbench Canvas and FME Data Inspector is no longer observed with FME 2018.0 Build 18240 or Newer.
Hi @RylanAtSafe, this worked. I've just changed the Feature Type Name(s) for Dataset parameter as there is no 'AttributeManager' transformer in 2015.1 version.

 

 

Thank You for your reply.

 


Hi @jlutherthomas, this is useful info for sure. Thank You.
Hi @RylanAtSafe, this worked. I've just changed the Feature Type Name(s) for Dataset parameter as there is no 'AttributeManager' transformer in 2015.1 version.

 

 

Thank You for your reply.

 

Glad to hear it! Thank you for following up here.

 

 


Reply