Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
wuming79
Creator
Creator

Can't SELECT renamed field, error field not found.

Hi,

IPtime
1.1.1.11529445600
2.2.2.21529670000
3.3.3.31529770010

Using Data Load Editor as below, I will get Circular reference error. I found out that it is due to the field time.

LOAD IP,

  time,

[Table1]:

SELECT `IP`,

  time

FROM testDB.Table1;

I then tried to rename the "time" field to below but after I load data, I will see error such as "Field 'IP' not found.

LOAD IP,

  time AS newTime,

[Table1]:

SELECT `IP',

  newTime

FROM testDB.Table1;

I tried to add change IP to 'IP' but when I create a bar chart with 'IP', my chart shows only the text 'IP' instead of all the 3 IPs from the table.


How do I do a proper rename during Data Loading time without changing my other fields?

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

You need the "as" alias in the SELECT, not in the preceding load:

[Table1]:

LOAD IP,

    newTime;

SELECT IP

  time as newTime

FROM testDB.Table1;

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
wuming79
Creator
Creator
Author

Hi,

Using the syntax:

[Table1]:

LOAD IP,

    newTime;

SELECT IP

  time as newTime

FROM testDB.Table1;


qliksense reported

The following error occurred:

Field 'newTime' not found

The error occurred here:

?

jonathandienst
Partner - Champion III
Partner - Champion III

Missing comma after SELECT IP

[Table1]:

LOAD IP,

    newTime;

SELECT IP,        //<< missing comma

  time as newTime

FROM testDB.Table1;

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein