BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
AmitSri
Pyrite | Level 9

Hi, When I try to load a csv file of 1gb into caslib, im getting the below error. What does this error mean? Thanks!!

 

1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         proc casutil;
 NOTE: The UUID '146fa91a-5361-f54a-91ff-c53d52ea3a52' is connected using session MYSESSION.
 74         load casdata="20180226_all_markets_export_5gb_without_header.csv" incaslib="testload"
 75         casout="20180226_all_markets_export_5gb_without_header" outcaslib="testload" promote;
 ERROR: Could not open file to flush memory contents.
 ERROR: Could not open file to flush memory contents. Permission denied
 ERROR: The action stopped due to errors.
 NOTE: The Cloud Analytic Services server processed the request in 41.482808 seconds.
 76         run;
 
 77         
 78         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 91         

1 ACCEPTED SOLUTION

Accepted Solutions
alexal
SAS Employee

@AmitSri,

ERROR: Could not open file to flush memory contents.

 

This means the CAS disk cache directory is not open to your users to create files. You can verify the location of this directory by checking the following:

 

  • Open the /opt/sas/viya/config/etc/cas/default/casconfig.lua file.
  • Check the following setting env.CAS_DISK_CACHE = '/var/tmp' to determine the directory that needs 777 permission (or permission for users using CAS).
  • Make sure this is done on all CAS nodes (controller and worker).

Once, this is done, the code executed will work.

View solution in original post

9 REPLIES 9
alexal
SAS Employee

@AmitSri,

ERROR: Could not open file to flush memory contents.

 

This means the CAS disk cache directory is not open to your users to create files. You can verify the location of this directory by checking the following:

 

  • Open the /opt/sas/viya/config/etc/cas/default/casconfig.lua file.
  • Check the following setting env.CAS_DISK_CACHE = '/var/tmp' to determine the directory that needs 777 permission (or permission for users using CAS).
  • Make sure this is done on all CAS nodes (controller and worker).

Once, this is done, the code executed will work.

AmitSri
Pyrite | Level 9
Hi Alex, I had done this, and got rid of that error. However, When I execute this:

proc casutil;
load casdata="test_1235.csv" incaslib="DBDATA"
importoptions=(filetype="csv" delimiter="," getnames="true")
casout="test_1235" outcaslib="DBDATA" promote;
run;

proc casutil;
save casdata="test_12345" incaslib="DBDATA"
casout="test" outcaslib="DBDATA";
run;

ERROR: The file or path 'test_12345' is not available in the file system.
ERROR: Table 'test_12345' could not be loaded.
ERROR: Failure opening table 'test_12345': A table could not be loaded.
ERROR: The action stopped due to errors.
NOTE: The Cloud Analytic Services server processed the request in 0.000122 seconds.
ERROR: Failed to save the table "test_12345" from the "DBDATA" caslib to the "DBDATA" caslib.

When I try to load the file again, it says
ERROR: The table TEST_1235 already exists in caslib DBDATA.
ERROR: The action stopped due to errors.but its not saving the table.
alexal
SAS Employee

@AmitSri,

 

That's correct, because you have to provide full path to test_1235.csv here:

 

proc casutil;
load casdata="test_1235.csv"
AmitSri
Pyrite | Level 9
Yes, While loading I have given the full name.

proc casutil;
load casdata="test_1235.csv" incaslib="DBDATA"
importoptions=(filetype="csv" delimiter="," getnames="true")
casout="test_1235" outcaslib="DBDATA" promote;
run;

and while saving it says file does not exist.
alexal
SAS Employee

@AmitSri,


You need full path, such as /this/is/folder/with/my/files/test_1235.csv

AmitSri
Pyrite | Level 9
Okay.. The file is located at /db_data.

proc casutil;
load casdata="root/db_data/test_1235.csv" incaslib="DBDATA"
casout="test_12345" outcaslib="DBDATA" promote;
run;

ERROR: Failed to open the file root/db_data/test_1235.csv. Make sure the file exists and that you have permission to read the file.
Note that Cloud Analytic Services attempts to open a file that is not stored in HDFS.
ERROR: The action stopped due to errors.

But, the file has 777permissions.

And, now I am getting the error as:
AmitSri
Pyrite | Level 9
And when I try this:

proc casutil;
load casdata="/db_data/test_1235.csv" incaslib="DBDATA"
importoptions=(filetype="csv" delimiter="," getnames="true")
casout="test_12345" outcaslib="DBDATA" promote;
run;

ERROR: Path '/db_data/test_1235.csv' for caslib 'DBDATA' appears to be an absolute path. Paths should be relative to the caslib
root.
ERROR: The action stopped due to errors.
alexal
SAS Employee

@AmitSri,

 

I suggest you open a technical support track. Either I or my colleagues will be able to assist you.

alexal
SAS Employee

@AmitSri,

 

Do not forget to attach full SAS log.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 3829 views
  • 0 likes
  • 2 in conversation