The following diagram illustrates the architecture for our solution.
CREATE TABLE "public"."customers1"(id character varying(256) encode lzo4,
first_name character varying(256) encode lzo,
last_name character varying(256) encode lzo);
copy "public"."customers1"
from 's3://<S3 path>/customer_primary.csv'
iam_role '<Redshift IAM Role ARN>'
CSV;
create table customer as
with asn as (
select * , row_number() over (partition by id order by id asc) as row_number
from customers1 )
select id, first_name, last_name from asn where row_number=1
CREATE TABLE "public"."order"(order_id integer,
product_id integer,
customer_id integer,
product_name character varying(256) ,
amount integer,
currency character varying(256) ,
order_timestamp character varying(256),
ship_date character varying(256));
copy "public"."order"
from 's3://<S3 path>/order_data.csv'
iam_role '<Redshift IAM Role ARN>'
CSV;
JOIN QUERY USED IN CONNECTOR
select cust.first_name, cust.last_name, ord.order_id, ord.product_id, ord.customer_id, ord.product_name, ord.amount, ord.currency, ord.order_timestamp, ord.ship_date
from order ord, customer cust
where ord.customerid=cust.id(+) and ord.currency='USD'
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.