page205
291
SELECT customer_key,
customer_name,
order_key + 1000000000,
DATE_TRUNC ( 'DAY', current_date()),
nation_name,
region_name,
'I',
current_timestamp()
FROM base_customer_order
WHERE order_key > 5000000000
LIMIT 100000;
Create records for the
UPDATE
operation.
CREATE OR REPLACE TABLE base_customer_order_update
(
customer_key NUMBER(38,0),
customer_name VARCHAR(25),
order_key NUMBER(38,0),
order_date DATE,
nation_name VARCHAR(25),
region_name VARCHAR(25),
operation VARCHAR(1),
stg_timestamp TIMESTAMP_NTZ
)
AS
SELECT customer_key,
customer_name,
order_key,
DATE_TRUNC ( 'DAY', current_date()),
nation_name,
region_name,
'U',
current_timestamp()
FROM base_customer_order
WHERE order_key < 1000000000
LIMIT 100000;
Chapter 8
parallelization