source: TI01-discovery/trunk/ingestAutomation/OAIBatch/db_funcs.py @ 1794

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery/trunk/ingestAutomation/OAIBatch/db_funcs.py@3785
Revision 1794, 400 bytes checked in by selatham, 13 years ago (diff)

doing ingest of spatio temporal information into postgres

Line 
1#!/usr/bin/env python
2
3# functions for use with NDG discovery postgres db
4
5# db setup
6import pgdb
7
8def db_connect():
9        # Open a Postgres database connection
10        DATABASE = 'xxxx'
11        HOST     = 'xxx.xxx.uk'
12        USER     = 'xxx'
13        PW       = 'xxxxxxx'
14        SCHEMA   = 'xxx'
15        connection_string = HOST + ':' + DATABASE + ':' + USER + ':' + PW
16        connection = pgdb.connect(connection_string)
17        return connection
18
19
20
Note: See TracBrowser for help on using the repository browser.