Created
September 16, 2016 09:46
-
-
Save xunzhang/b07124c43dfe74a905255a43467932e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wuhong@pivotal-2:~$ source ~/Desktop/local/greenplum_path.sh | |
wuhong@pivotal-2:~$ ipython | |
In [1]: from pygresql import pg | |
In [2]: from gppylib.db import dbconn | |
In [3]: url = dbconn.DbURL(dbname='postgres') | |
In [4]: conn = pg.connect(dbname=url.pgdb, host=url.pghost, port=url.pgport, user=url.pguser, passwd=url.pgpass, opt='-c gp_session_role=utility') | |
In [5]: qry = 'create table xx(i int4) with (appendonly=true, orientation=Parquet, compresstype=None, compresslevel=0, pagesize=1048576, rowgroupsize=8388608, bucketnum=6) DISTRIBUTED RANDOMLY;' | |
In [6]: conn.query(qry) | |
In [7]: conn.query(qry) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment