Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want tok now if there a way to read a column that has no name on it
For example
I have the following table:
ServerStarted | Type | User | Message | |
7/18/2011 8:35 | Selection | User1 | City | NY |
7/18/2011 8:35 | Selection | User1 | City | Clear |
8/3/2011 18:10 | Selection | User2 | YEAR | 2011 |
8/3/2011 18:10 | Selection | User2 | DOMAIN | domain.com |
8/3/2011 18:10 | Selection | User1 | DESCRIPTION | Clo Libe / Credit Limit |
8/3/2011 18:10 | Selection | User1 | DESCRIPTION | Clear |
8/3/2011 18:10 | Selection | User3 | SHORT_DESC | IPTV |
8/3/2011 18:10 | Selection | User1 | SHORT_DESC | ISP |
8/3/2011 18:10 | Selection | User1 | SHORT_DESC | Clear |
8/3/2011 18:10 | Selection | User3 | SHORT_DESC | Wireline |
8/3/2011 18:10 | Selection | User1 | Clear All | ISP |
There are 5 columns but only (4) four of them has a name on it.
I want to know if there’s a way to read that column and give it a name.
<Column withOut name> as Column5
LOAD
ServerStarted as Date,
Type,
User,
Message,
<Column with Out name> as Column5
FROM C:\UserLogs\Archive_*.LOG (utf8, txt, delimiter is '\t', embedded labels)
Thanks,
Obed
Try this:
LOAD @1 as Date,
@2 as Type,
@3 as User,
@4 as Message,
@5 as Column5
FROM C:\UserLogs\Archive_*.LOG (utf8, txt, delimiter is '\t', no lables, header is 1 lines);
Or add the message + Column5
For example:
I don’t wantto lose that column
Thanks
Try this:
LOAD @1 as Date,
@2 as Type,
@3 as User,
@4 as Message,
@5 as Column5
FROM C:\UserLogs\Archive_*.LOG (utf8, txt, delimiter is '\t', no lables, header is 1 lines);
Thanks, but i still get an error
Field not found - <@1>
I run this code that read from the log files of the Audits of QV11 but it still does not work
Thanks,
Try adding no labels to the format specifier
FROM $(PATHQVLOG)\Audit_*.LOG (utf8, txt, delimiter is '\t', header is 1 lines, no labels)
Thanks! It works