Skip to main content
I have a workspace setup to read survey points from a csv file, and enter them into a geodatabase.  This is working well.  I am now wanting to capture the date that the point was shot.  I am using the 'Directory Path and Filenames' reader to get this attribute data, but I am not able to assign it to the records read in from my CSV reader.  Can I assign this value (date) to some variable, and then assign the variable to the attribute on the records that are being created?

 

 

I appreciate any suggestions.

 

 

Thanks.
Hi, 

 

 

You could use a featuremerger to merge the date with the points, joining on fme basename and rootname.

 

 

Owen
Thanks Owen,

 

 

I am trying this now.  I am using the output of the CSV reader as the FeatureMerger 'Requestor' and the output of the Path and Directory reader as the FeatureMerger 'Supplier'.  I am not seeing in the FeatureMerger parameters how to join these together on those attributes (basename/rootname), I can't find where they are.  

 

 

Any suggestions what I am missing here?

 

 

 

Thanks!
Hi,

 

 

A format attribute called "fme_basename" contains the source file name (without extension) for a file-based dataset like CSV.

 

Open the CSV Reader Feature Type Properties dialog > Format Attributes tab, and check Exposed checkbox for "fme_basename", so that the attribute is shown in the interface.

 

 

The features read by the Directory and File Pathnames Reader have an attribute called "path_rootname", which contains the file name without extention.

 

 

As Owen suggested, you can then merge the file information to the CSV features by the FeatureMerger.

 

Join On: Requestor "fme_basename" -> Supplier "path_rootname"

 

 

Hope this helps.

 

 

Takashi
Excellent!

 

 

Thanks Owen for the suggestion, works beautifully after Takashi's help.

 

 

Takashi, thank you for your assistance, I didn't know of this option, and have added it to my list of notes on FME.

 

 

Cheers!

Reply