Skip to main content
simply more productive

The Data Specialist

Thanks to our intuitive transformation designer, you can convert data effortlessly to a variety of formats without knowing how to program. It’s not only efficient, it’s also easy to use.
Flowheater Download

get current read filename

  • FlowHeater-Team
  • Topic Author
  • Offline
  • Admin
  • Admin
More
11 years 5 days ago #2279 by FlowHeater-Team
get current read filename was created by FlowHeater-Team
Hi,

I very often need to use parts of the current input filename inside the logic of the transformation. Mostly the file might actually contain a date that has some significance and that I would need to parse out and use in the output. I assumed maybe a "global" parameter to be available (since I am calling via the Batch interface and I use the //ReadFileName [file] command line to pass in the file I need to process). Is this ReadFileName visible somehow, to be used? And if yes - could you maybe give a quick explanation?

Thank you.
Heinz
Request via email

Best wishes
Robert Stark

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.

Please Log in or Create an account to join the conversation.

  • FlowHeater-Team
  • Topic Author
  • Offline
  • Admin
  • Admin
More
11 years 5 days ago #2280 by FlowHeater-Team
Replied by FlowHeater-Team on topic Re:get current read filename
Hello Heinz,

For obtaining the current READ file name into the transformation you need the help of the .NET Script Heater and the little script below.
Code:
public object DoWork() { // get access to the READ TextFile Adapter TextFileAdapter adapter = (TextFileAdapter)AdapterRead; // return the filename for further processing return adapter.Filename; }

You have to move just one .NET Script Heater on the Designer. Double-click on the Heater and replace the default script with the Script above. The .NET Script Heater returns now the current file name.

Best wishes
Robert Stark

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.

Please Log in or Create an account to join the conversation.

Time to create page: 0.247 seconds

FlowHeater - The Data Specialist

Efficient data integration and transformation with FlowHeater – the perfect solution for a seamless transfer of your data.

Rechtliches

Support & Contact

Kontaktinformation

Telefon:0951 / 99339792 E-Mail:This email address is being protected from spambots. You need JavaScript enabled to view it.

Copyright © 2009-2024 by FlowHeater GmbH. All rights reserved.