Issue using the option "truncate prefix" in the File Uploader node

#1

My understanding is that the “truncate prefix” option in the File Uploader node should truncate the prefix from the source URI to keep only the subdirectories within the search path (coming from the List Files node).
image
E.g: source file is in c:\files\FACT_EVENTS\2018\01
target directory is in s3://FACT_EVENTS
prefix is c:\files\FACT_EVENTS
so that the 2018/01 gets created in S3 below FACT_EVENTS

Unfortunately, it keeps creating a directory with an empty name and, below, the following structure: files/FACT_EVENTS/2018/01.

In other words, the source path is not truncated.

Has anyone a successful experience using this node?

0 Likes

#2

Any advice or resource on the truncate prefix option?
Thanks in advance.

0 Likes

#3

Hi there!

Sry for a delay on this one. I have tested it and it is not working for me either. In the print screen from Upload node result you can see the double slash and that is the cause for a directory with empty name. For me there is no difference in options Use full path or Truncate prefix…

Upload

Will get back to you on this one.

Br,
Ivan

0 Likes

#4

Hi there!

Just to provide info on this one. This has been reported and hopefully should be fixed soon.

Br,
Ivan

0 Likes

#5

Thanks for your answer. I really like how Knime is taking into account user feedback.
Regards,
Sébastien

0 Likes

#6

We try our best :slight_smile:
Ivan

0 Likes

#7

Hi there @szawadski!

Just to catch up on this one. There has been some improvements on this matter in new KNIME version. However there are still some limitations when there is white space contained in truncate prefix path. This is still in investigation and hopefully will be fixed soon.

Note: When path from truncate prefix is not matched (whether it is written incorrectly or due to a bug) fallback to full path is used.

Fell free to try it out. Feedback is appreciated :wink:

Br,
Ivan

0 Likes

#8

Hi,

stumbled across this suuuper annoying issue too. Tried to mitigate it by escaping the space "\ ", by using URL encoded “%20” spaces and just plain white spaces " ". Nothing worked. Only workaround is to adjust all local files paths which why it’s suuuper annoying.

Update: It’s is not working at all. I used a URL and a truncate path without any white space but still the undesired path segments were present. IMPORTANT to note is that I used a variable. Upon using a fixed string, which is identical, it worked!

Hope it’s fixed soon.

Cheers
Mike

0 Likes

#9

Hi Mike,

I have just tested having prefix as a flow variable and it worked as expected. Is this what is not working for you?

Br,
Ivan

0 Likes

#10

Hi all,

just to share that this has been resolved with KNIME 4.0.1 version.

Br,
Ivan

0 Likes