AWS Connect to Redshift Using Psql
$ psql -h <AWS_SERVER_ADDRESS> -p <5439> -d <TABLE_NAME> -U <USER_NAME>
psql -h analytic-db.cclbsx5fbhor.us-east-1.redshift.amazonaws.com -p 5439 -d analyticdb -U redagent
pg_dump -h analytic-db.cclbsx5fbhor.us-east-1.redshift.amazonaws.com -p 5439 -d analyticdb -U redagent -t keycards
-d, --dbname=DBNAME database to dump -h, --host=HOSTNAME database server host or socket directory -p, --port=PORT database server port number -U, --username=NAME connect as specified database user -w, --no-password never prompt for password -W, --password force password prompt (should happen automatically)
activityid | integer |
descname | character varying(256) |
cdt | timestamp without time zone |
ndt | timestamp without time zone |
nodename | character varying(256) |
nodeunique | character varying(256) |
nodeaddress | character varying(256) |
portalname | character varying(256) |
personname | character varying(256) |
personid | character varying(256) |
acname | integer |
rdrname | character varying(256) |
partname | character varying(256) |
detail | character varying(256) |
CREATE TABLE "public"."keycards" (
ACTIVITYID integer,
DESCNAME character varying(256),
CDT timestamp without time zone,
NDT timestamp without time zone,
NODENAME character varying(256),
NODEUNIQUE character varying(256),
NODEADDRESS character varying(256),
PORTALNAME character varying(256),
PERSONNAME character varying(256),
PERSONID character varying(256),
ACNAME integer,
RDRNAME character varying(256),
PARTNAME character varying(256),
DETAIL character varying(256)
);
ALTER TABLE keycards OWNER TO redadmin;