Desktop productivity for business analysts and programmers

Is it possible to import .db3 files

Accepted Solution Solved
Reply
Contributor
Posts: 54
Accepted Solution

Is it possible to import .db3 files

Hi All,

 

I have a requirement where i have to import a .db3 file into SAS. Is it possible to import a .db3 file into SAS.


Accepted Solutions
Solution
‎11-24-2016 09:14 AM
Super User
Posts: 7,371

Re: Is it possible to import .db3 files

ODBC (Open Database Connectivity) lets a process connect to database data via a standardized interface. Once a database system provides an ODBC driver, every ODBC-capable software can connect to it transparently (no special knowledge of the target necessary). So you need to have the ODBC driver for SQlite installed (.db3 is the standard file extension for SQlite files), and SAS/ACCESS to ODBC licensed.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Super User
Posts: 7,371

Re: Is it possible to import .db3 files

AFAIK, SAS does not provide a direct interface to SQlite. You can use the connection to ODBC if you have the ODBC driver for SQlite installed.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 18,984

Re: Is it possible to import .db3 files

I've used the ODBC driver to connect to SQLite DBs. So yes, you can connect to DB3 files. 

Contributor
Posts: 54

Re: Is it possible to import .db3 files

[ Edited ]

hi @KurtBremser and @Reeza Thank you for your replies. 

 

Can you be a bit more detailed as i do not understand what you were saying.

 

i am having a .db3 file on my system and i need to import it. On checking with SAS docs, it was saying use proc dbf. But i am not able to import it. 

Solution
‎11-24-2016 09:14 AM
Super User
Posts: 7,371

Re: Is it possible to import .db3 files

ODBC (Open Database Connectivity) lets a process connect to database data via a standardized interface. Once a database system provides an ODBC driver, every ODBC-capable software can connect to it transparently (no special knowledge of the target necessary). So you need to have the ODBC driver for SQlite installed (.db3 is the standard file extension for SQlite files), and SAS/ACCESS to ODBC licensed.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 7,371

Re: Is it possible to import .db3 files


naveenraj wrote:

 

i am having a .db3 file on my system and i need to import it. On checking with SAS docs, it was saying use proc dbf. But i am not able to import it. 


PROC DBF is for importing/exporting dBase files. But the .db3 extension is not only used by dBase, but also by the SQlite system. If your .db3 file is not a dBase file, PROC DBF will fail.

 

Check with your data provider the exact nature of the file.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 54

Re: Is it possible to import .db3 files

Hi @KurtBremser

 

Please let me know if i understand this correctly. SAS EG cannot import .db3 sqllite files directly. 

 

Instead we have to create a ODBC to the sqllite DB's and create libraries through which we can import data to SAS environment

Super User
Posts: 18,984

Re: Is it possible to import .db3 files

Depends on what you mean by directly. It's the same method as to connect to any database really. 

 

DB3 is a database not a file. 

 

At the same time DB3 is a text file so you can open it with a text editor so you could theoretically process it with a datastep but that wouldn't be very fun. 

Super User
Posts: 7,371

Re: Is it possible to import .db3 files

To avoid this kind of hassles, it is always best to use a text-based file format for data transfer between systems.

Any DB system can export to csv, and read back from csv. This, of course, includes SAS.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 8 replies
  • 332 views
  • 0 likes
  • 3 in conversation