Page 1 of 1

CURRENT_LOAD_SOURCE in UDL

Posted: Thu Dec 11, 2014 11:51 am
by falcon
Hello all,

I'm trying to create Java UDL with possibility to load multiple files and track a file name during the load.
Documentation says I can use CURRENT_LOAD_SOURCE() function to track file name, but I need to setup some source in my UDL.

I have found only getUri() function in SDK and tried to override it, but there is no effect.

Does anyone know how to setup this source to get CURRENT_LOAD_SOURCE() work.
Any other solution also will be great.

Thanks

Re: CURRENT_LOAD_SOURCE in UDL

Posted: Thu Dec 11, 2014 2:13 pm
by id10t
Hi!

[DELETED]

Re: CURRENT_LOAD_SOURCE in UDL

Posted: Thu Dec 11, 2014 2:23 pm
by falcon
Here https://my.vertica.com/docs/7.0.x/HTML/ ... SOURCE.htm

I don't see this topic in 7.1 docs, but the function exists in Vertica 7.1

Re: CURRENT_LOAD_SOURCE in UDL

Posted: Thu Dec 11, 2014 2:26 pm
by falcon
This function returns "<unknown>" value, I need this function to return file name

Re: CURRENT_LOAD_SOURCE in UDL

Posted: Thu Dec 11, 2014 2:39 pm
by id10t
Hi!

[DELETED]

Re: CURRENT_LOAD_SOURCE in UDL

Posted: Thu Dec 11, 2014 2:55 pm
by falcon
Hi,
If the function is called by a UDL that does not set the source, it returns the string <unknown>.
So you have to define a source for your UDL.
This is actually what I asked initially, how to do that.

As I understand "source" is some property in SDK which used by CURRENT_LOAD_SOURCE function

Unfortunately, example above doesn't cover my needs.

So, what I need:
1. Load more than 1k files from HDFS to Vertica.
2. I do not want to generate 1k of COPY commands.
3. I want to track file name, in other words, fill FileName column for each row in the destination table.