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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.