Skip to main content
Question

Assigning windows explorer date stamp of csv file to records

  • March 26, 2015
  • 4 replies
  • 25 views

bretr
Contributor
Forum|alt.badge.img+8
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.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

owen
Forum|alt.badge.img+1
  • March 26, 2015
Hi, 

 

 

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

 

 

Owen

bretr
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 27, 2015
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!

takashi
Celebrity
  • March 28, 2015
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

bretr
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 30, 2015
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!