Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
manoj217
Creator III
Creator III

Inline loading

i have created a table by inline loading but  after creating the table i want to change one field name but here " as" function is not working why ,i want to know why it is not working

9 Replies
vishsaggi
Champion III
Champion III

Can you copy the script you are trying?

You can do something like:

LOAD ID, Name AS FirstName INLINE [

ID, Name

1, VVV

2,SSS

3,RRR

];

sonkumamon
Creator
Creator

Are you trying to change the field name in the inline LOAD statement or with a RENAME function?

Try:

Rename Field firstName To FullName

manoj217
Creator III
Creator III
Author

so after inline statement as function wil not work we need to use in before inline function. thnks

ahaahaaha
Partner - Master
Partner - Master

Hi,

To all the fields that you enumerate in LOAD*Inline, you can access through LOAD before the construction LOAD*Inline. For example,

LOAD*,

Function(Field1) as YourName1,

Function(Field2) as YourName2;

LOAD*Inline

[Field1, Field2, Field3

1, 1, 1

2, 2, 2

];

Note the asterisk after LOAD in the code above. If it is (have asterisk), all fields listed in LOAD*Inline will be included in the table and  after the first statement LOAD fields will be added. Without a asterisk, the fields listed in the construction LOAD*Inline will not be included in result table. In the table there will be only fields after the first operator LOAD.

Regards,

Andrey

MarcoWedel

If you are asking whether


LOAD ID, FirstName INLINE [

ID, Name as FirstName

1, VVV

2,SSS

3,RRR

];

is a correct way of aliasing an inline loaded field, then the answer would be no.

hope this helps

regards

Marco

manoj217
Creator III
Creator III
Author

as function is not working after inline statement if it is placed after load statement it is working

Not applicable

This Question was raised when I was in basic level , now I can understand clearly why it is .

Thanks guys

Not applicable

Sorry Guys, I thought it was araised by me .

Hi Manoj,

Inline is kind of database table(ur trying to create columns and rows over here)

while ur creating column name as example

load * inline [

id as id1,sales

1,100

];

whats the point renaming over here id as id1,

instead of that u can directly give id1 only because ur creating the colum here ,u cant make alias name over here .

if u want do that then  follow this (as above given by experts)

LOAD*,

Function(Field1) as YourName1,

Function(Field2) as YourName2;

LOAD*Inline

[Field1, Field2, Field3

1, 1, 1

2, 2, 2

];

arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Manoj,

Please Try this:

INlineAliasname:

LOAd ID,  Name as FirstName  ;

LOAD * INLINE [ 

ID, Name

1, VVV 

2,SSS 

3,RRR 

]; 

Thanks,

Arvind Patil