page204
290
SELECT count(1),
MAX ( order_date ),
MAX ( order_key )
FROM core_customer_order;
The new table should contain 1,500,000,000 records with the latest
order_date
of
1998-08-02
and highest
order_key
value set to 6,000,000,000.
Let’s now create a raw or staging table noting the addition of the
operation
and
stg_timestamp
attributes.
CREATE OR REPLACE TABLE stg_customer_order
(
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
);
LIMIT
returns random rows. For repeatable test cases with known values, you must
create repeatable consistent records for the
INSERT
operation.
CREATE OR REPLACE TABLE base_customer_order_insert
(
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
Chapter 8
parallelization