Skip to main content
Solved

Use the file name of the inputted csv as the automatic default in the 'CSV File Name' value in FeatureWriter

  • February 3, 2025
  • 1 reply
  • 18 views

scarter
Contributor
Forum|alt.badge.img+9

 

Hello Forum,

 

I’ve set up a simple workspace to convert a csv with eastings and northings (EPSG:27700) to a csv with long lat (EPSG:4326). This is working OK.

 

The workspace is something I’m going to use quite often, so I’m keen to automate it as much as possible.

 

Is it possible to automatically make the ‘CSV File Name’ value in in the FeatureWriter (Parameters tab) the same as the input csv name. For example, if my input csv is called ‘Properties030225.csv’, then when this reaches the FeatureWriter the default ‘CSV File Name’ value in in the FeatureWriter (Parameters tab) is ‘Reprojected’. Instead, I would want that default csv file name to be the name of the input .csv. In this case, Properties030225.csv.

 

Yes, of course, I could type in Properties030225.csv in, but I don’t want to do that every time. Instead, I want it to automatically pick up on the input file name.

 

How can I do this?

 

Thanks,

Stuart

 

Best answer by scarter

It looks like this is possible by exposing ‘fme_basename’ in ‘FeatureReader>Attributes>Schema Attributes>Additional Attributes to Expose’. And then select ‘fme_basename’ from the Attribute Value list in FeatureWriter.

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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.

1 reply

scarter
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • Best Answer
  • February 3, 2025

It looks like this is possible by exposing ‘fme_basename’ in ‘FeatureReader>Attributes>Schema Attributes>Additional Attributes to Expose’. And then select ‘fme_basename’ from the Attribute Value list in FeatureWriter.


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