Greenplum Provisioning & Object Storage

$ terraform validate
Success! The configuration is valid.
$ terraform init
Initializing the backend...
<snip>
Terraform has been successfully initialized!
$ terraform plan
<snip>
Plan: 19 to add, 0 to change, 0 to destroy.
<snip>
$ terraform apply
<snip>
Apply complete! Resources: 19 added, 0 changed, 0 destroyed.
Outputs:
GP_Admin_Password = "gpdbdemo"
GP_Database_Name = "greenplum"
Master_Host_IP = "<ip_address>"
 <snip>
Greenplum Database Cluster (GPDB) generated by VLDB.
[ec2-user@mdw ~]$
$ psql -h <ip_address> -d greenplum -U gpadmin
psql (14.7 (Homebrew), server 9.4.26)
Type "help" for help.
greenplum=# \d
Did not find any relations.
greenplum=# select current_date;
    date
------------
 2023-05-04
greenplum=# \q
create external table uk_price_paid_mar_23_ext 
(transaction_id varchar(38) 
,sale_price     integer
,transfer_date  date  
,postcode       varchar(08) 
,property_type  char(01)   
,new_indicator  char(01)   
,duration       char(01)    
,primary_name   varchar(85) 
,secondary_name varchar(45)
,street         varchar(56) 
,locality       varchar(35) 
,town           varchar(22) 
,district       varchar(38) 
,county         varchar(35) 
,category       char(01)     
,record_status  char(01))
location ('pxf://vldb-data-us-east-1/landregistry/pp-monthly-mar-23.csv?profile=s3:csv&server=s3') format 'csv'
;
create table uk_price_paid as (
select * 
from uk_price_paid_ext) 
distributed by (transaction_id)
;
Share the Post:

Discover more from VLDB

Subscribe now to keep reading and get access to the full archive.

Continue reading