Wed Aug 17, 2022 1:07 am
Login Register Lost Password? Contact Us

Please Note: The HPCC Systems forums are moving to Stack Overflow. We invite you to post your questions on Stack Overflow utilizing the tag hpcc-ecl (https://stackoverflow.com/search?tab=newest&q=hpcc-ecl). This legacy forum will be active and monitored during our transition to Stack Overflow but will become read only beginning September 1, 2022.



Landing Zone File: Read and Write

Topics specific to the use of the ECL IDE

Tue Jan 29, 2013 2:39 pm Change Time Zone

Hello
Please find our problem http://hpccsystems.com/bb/viewtopic.php?f=34&t=719&sid=83432948e6bbd62fa32153026f090acc

To avoid spraying but to add file to HPCC DFS, we are doing the following :

In ECLLanguageReference pdf file, under Landing Zone Files, it says syntax should be:
The syntax looks like this:
‘~file::<LZ-ip>::<path>::<filename>’
MyFile :=DATASET('~file::10.150.50.12::c$::training::import::myfile',RecStruct,FLAT);

Code: Select all
Layout_adcampaign_twitter_data := RECORD
VARSTRING User_ID;
VARSTRING Search_Keyword;
VARSTRING Tweet;
VARSTRING Sentiment;
VARSTRING date;
VARSTRING SearchID;
VARSTRING Domain;
VARSTRING TweetID;
VARSTRING Checked;
VARSTRING TwitterUserName;
VARSTRING No_Of_Followers;

END;

File_landingZoneFile :=DATASET('~file::10.101.2.171::var::lib::HPCCSystems::dropzone::adcampaign_twitter_data.csv',Layout_adcampaign_twitter_data,CSV);
output(File_landingZoneFile);


But facing error as though file is present in dropzone:
Code: Select all
Error: System error: 1: Could not open logical file ~file::10.101.2.171::var::lib::HPCCSystems::dropzone::adcampaign_twitter_data.csv in any of these locations:
//10.101.2.171:7100/var/lib/HPCCSystems/dropzone/adcampaign_twitter_data.csv (115)


Thanks and Regards!
prachi
 
Posts: 46
Joined: Mon Jul 23, 2012 11:50 am

Wed Jan 30, 2013 12:59 pm Change Time Zone

Using FLAT as an option to DATASET means that you're looking for an HPCC logical file (i.e. something already sprayed into the cluster). I doubt you'll have something like that already sitting around on an external file system.

Use the CSV or XML option instead. Also, you may want to check out the standard library's File.ExternalLogicalFileName() function. That allows you to define a path to the file in a more readable manner. That function's result would become the first argument to the DATASET() definition.

Cheers,

Dan
DSC
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 571
Joined: Tue Oct 18, 2011 4:45 pm

Wed Jan 30, 2013 4:37 pm Change Time Zone

Hello,
I have followed this syntax:
MyFile :=DATASET('~file::10.150.50.12::c$::training::import::myfile',RecStruct,FLAT);

so instead of c$::training::import::myfile i wrote var::lib::HPCCSystems::dropzone::adcampaign_twitter_data.csv where adcampaign_twitter_data.csv is my file name uploaded via ECLWatch and now present on dropzone. And also this file is not sprayed yet.
Can you please guide me where i am going wrong in code??

Thanks and Regards!!
prachi
 
Posts: 46
Joined: Mon Jul 23, 2012 11:50 am


Return to ECL IDE

Who is online

Users browsing this forum: No registered users and 1 guest

cron