Mercurial > repos > charles_s_test > seqsero2
comparison psql_test.py @ 0:6895de35a263 draft
planemo upload commit 844a891e4eaf732830043204ac636907eefb011d-dirty
author | charles_s_test |
---|---|
date | Thu, 19 Oct 2017 18:16:51 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:6895de35a263 |
---|---|
1 import psycopg2, os | |
2 | |
3 os.system('source /nfs/sw/apps/galaxy-dev/galaxy/.venv/bin/activate') | |
4 | |
5 connection = psycopg2.connect(database="galaxy", user="galaxy", host="galaxydev.cvkyaz9id4ml.us-east-1.rds.amazonaws.com", password="cF$cl0udh9c", port="5432") | |
6 print "monkey made a connection!" | |
7 | |
8 worker = connection.cursor() | |
9 worker.execute('SELECT name FROM library_dataset_dataset_association WHERE dataset_id = 4;') | |
10 result = worker.fetchall() | |
11 print result, '4' | |
12 | |
13 worker = connection.cursor() | |
14 worker.execute('SELECT name FROM library_dataset_dataset_association WHERE dataset_id = 10;') | |
15 result = worker.fetchall() | |
16 print result, '10' | |
17 | |
18 worker = connection.cursor() | |
19 worker.execute('SELECT name FROM library_dataset_dataset_association WHERE dataset_id = 11;') | |
20 result = worker.fetchall() | |
21 print result, '11' | |
22 | |
23 worker = connection.cursor() | |
24 worker.execute('SELECT name FROM library_dataset_dataset_association WHERE dataset_id = 18;') | |
25 result = worker.fetchall() | |
26 print result, '18' |