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.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.