I have a SAS table with 100 million rows, it's not efficient to export under csv format. Any chance sas can convert the table into sqlite3 (python) to be opened in Python?
I don't think that SAS provides a module for that particular format.
But you can compress the csv on the fly to reduce space:
filename class zip "/folders/myfolders/class.zip";
data _null_;
set sashelp.class;
file class(class.csv) dlm="," dsd;
if _n_ = 1 then put "name,sex,age,height,weight";
put name sex age height weight;
run;
filename class clear;
You will need to unpack it on the target server before reading it into the database.
Googling using site:documentation.sas.com sqlite returns a few hits. Not sure if any will be helpful to you but suggest you find out for yourself.
SQLITE supports odbc . You can download the driver from http://www.ch-werner.de/sqliteodbc/ .
The documentation is here http://www.ch-werner.de/sqliteodbc/html/index.html .
Please do update if it has worked for you so that others may benefit.
libname sqlite odbc complete="dsn=SQLite3 Datasource;Driver={SQLITE3 ODBC Driver};Database=e:\temp\IISHistoricalSample.db";
libname temp 'e:\temp' ;
data sqlite.Sample;
set temp.All_iis_new (obs=100);
run;
You'll need SAS's SAS/ACCESS to ODBC product for @AlanC 's approach.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.