Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

deontologician/netezza_sqlalchemy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Netezza SQLAlchemy

SQLAlchemy dialect for the Netezza database.

This is far from complete, has a lot of bugs etc, but it might give you a start.

Note: I don't have access to Netezza anymore so I can't maintain this, but feel free to fork!

Usage:

#!python
from netezza_sqlalchemy import BYTEINT, ST_GEOMETRY
from sqlalchemy import create_engine, Table, Column, Integer

engine = create_engine('netezza://<username>:<password>@<dsn>')
existing_table = Table('existing_name', reflect=True)
new_table = Table('new_table',
    Column('column_a', Integer, nullable=False),
    Column('column_b', ST_GEOMETRY(100)),
    Column('column_c', BYTEINT),
    distribute_on='column_a'
)

# And you're off to the races...

new_table.create()

engine.execute(existing_table.insert().from_select(...))

About

SQLAlchemy dialect for the Netezza database

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages