10000 GitHub - j-wang/dbf_to_sql: FoxPro Tables to SQL
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

j-wang/dbf_to_sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DBF to SQL

Motivation

FoxPro is a dying technology, but unfortunately, some organizations still have all of their data in it. This tool is meant to help ease transition into more modern databases (specifically sqlite3).

Synopsis

This module essentially glues together dbf and SQLAlchemy to convert FoxPro tables into SQL tables (specifically, sqlite3 -- although this should be easy to adapt and might work out of the box for certain other dialects that SQLAlchemy supports).

At this stage, I would not suggest using this for any dialect other than sqlite (which the Converter defaults to anyhow). If you need to use this with other SQL dialects, use other tools to convert the sqlite3 database to something else.

Requires dbf and SQLAlchemy (both of which are open source and available through pip install).

pip install dbf
pip install sqlalchemy

More documentation available on Read the Docs.

Version Warning

This module is definitely still immature. As far as as I can tell, it works, but I can make no other guarantees.

Testing for this module has primarily come through my own usage. Although it has been "tested," there's nothing quite like real data to muck up a theoretically sound program.

I'm not looking to use this module to do data validation or clean up horribly mangled databases, but I suspect there will be common errors (especially in domain-specific applications, which Fox 5C31 Pro is often used for), which I haven't yet tripped over. If you feel there's such a case, please open an issue or send me an email.

Usage

You can convert directories of DBF tables directly:

import dbf_to_sql
fp2sql = dbf_to_sql.Converter('sqldata.db')
fp2sql.convert_dbfs('foxpro_app/data/')

Or just individual tables:

fp2.sql.convert_dbf('clients.dbf')

About

FoxPro Tables to SQL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0