Skip to main content

Easy Access to access DES DB

Project description

# easyaccess
![help_screen](help_screen.png)

Refactored version of trivialAccess for accessing the DES DB

Python Command Line Interpreter to access Oracle DES DB
using cx_Oracle

For a short tutorial chek [here](http://deslogin.cosmology.illinois.edu/~mcarras2/data/DESDM.html)
(Using des credentials)


**Current version = 1.0.7**

## Requirements

- Oracle Client > 11g.2 (External library, no python)
Check [here](https://deswiki.cosmology.illinois.edu/confluence/display/CMBT/Instructions+for+installing+Oracle+client+and+easyaccess+without+EUPS) for instructions on how to install these libraries
- cx_Oracle
- pyfits >= 3.3
- pandas >= 0.14
- termcolor
- PyTables (optional, for hdf5 output)

## Some *nice* features
- Smart tab completion for commands, table names, column names and file paths accordingly
- write output results to csv, tab, fits files or HDF5 files
- load tables from csv or fits directly into DB
- intrinsic db commands to describe tables, own schema, quota and more
- It can be imported as module
- Can run command directly from command line
- Load sql query from file and/or from editor
- Many more

## Basic use

### Running SQL commands
Once inside the interpreter run SQL queries by adding a ; at the end::

DESDB ~> select ... from ... where ... ;

To save the results into a table add ">" after the end of the query (after ";") and namefile at the end of line

DESDB ~> select ... from ... where ... ; > test.fits

The files supported so far are (.csv, .tab, .fits, .h5) any other extension is ignored

### Load tables
To load a table it needs to be in a csv format with columns names in the first row
the name of the table is taken from filename


DESDB ~> load_table <filename>

### Load SQL queries
To load sql queries just run:

DESDB ~> loadsql <filename.sql>
or

DESDB ~> @filename.sql

The format is the same as in command line, SQL statement must end with ;
and to write output files it must be followed by > <output file>

### TODO
- There is a bug with some versions of readline
- Other small changes when loading tables
- Self-upgrade

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easyaccess-1.0.7.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

easyaccess-1.0.7.macosx-10.6-x86_64.exe (102.4 kB view details)

Uploaded Source

File details

Details for the file easyaccess-1.0.7.tar.gz.

File metadata

  • Download URL: easyaccess-1.0.7.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for easyaccess-1.0.7.tar.gz
Algorithm Hash digest
SHA256 26e4a8fd2dd247480faf21ae5a956946fe61484d46d0b4035ddf71d478e1fb70
MD5 ff83c661bc287b3a31a9c3c7fa50fb60
BLAKE2b-256 aee71a4b891ace4f1d450463ec4e8530f3a3b8f7c2a83f6bdfcebe2418997194

See more details on using hashes here.

File details

Details for the file easyaccess-1.0.7.macosx-10.6-x86_64.exe.

File metadata

File hashes

Hashes for easyaccess-1.0.7.macosx-10.6-x86_64.exe
Algorithm Hash digest
SHA256 9e04556d7200954fe7fcbe7ad7c29647089fffef71c28e30d5b29f9d342c86ab
MD5 63a55b2424f49d54e884967effe2aee9
BLAKE2b-256 7741a780f51ef5306c6e6b510518b8d567ecfa7f1591cd04533ac2e17be3a49f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page