flow variable file path

Hi,

I want to read a file using the File Reader node. In the configuation view I tick the Use Variable option where I choose a flow variable that I created using Workflow Variables...(right clicking the workflow in the Explorer), with a path like: 

file:\C:\documents\weather.csv

It appears I cannot find and read the data this way. 

Do I follow a wrong procedure?

Greetings,

Kees

 

 

Hi Kees,

you can make it work, but it's a bit tricky.

Once you enter a valid URL in the File Reader node, it tries to analyse the indicated file to understand its structure. If the valid URL parameter is left empty because the filename is linked to a Flow Variable, the node cannot properly complete its analysis and as a consequence you cannot OK/Apply the configuration. It just keeps saying "File analysis currently running".

You would expect the node to use right away the content of the Flow Variable to perform the analysis, but this doesn't happen in the configuration phase, only when the workflow is executed.

A possible workaround is to set the valid URL parameter to a file (or data excerpt) which is compatible with the one you intend to read (so the guessing works properly), let the analysis run, adjut the configuration and, only as last step, link the valid URL to the flow variable which holds the final filename.

Give it a try and see whether this solves your issue.

Cheers,
Marco.

 

Hi Marco, 

Thanks for your reply.

I indeed expected the node to execute on the path variable, but your workaround also works fine, actually even better. Even using the smallest possible 'data setting' file.

Thanks, Kees