SUPER 샘플 데이터 집합
다양한 범주, 리전 및 기간에 걸친 가상 제품 판매와 관련된 데이터가 포함된 SUPER 샘플 데이터세트를 탐색하고 분석할 수 있습니다. 다음 섹션에서는 Amazon Redshift 클러스터 내에서 SUPER 샘플 데이터세트에 액세스, 쿼리 및 조작하는 방법에 대한 세부 정보를 제공합니다.
수집 및 쿼리 예제에 사용되는 테이블 스키마와 데이터 모델은 다음과 같이 정의됩니다.
/*customer-orders-lineitem*/ CREATE TABLE customer_orders_lineitem (c_custkey bigint ,c_name varchar ,c_address varchar ,c_nationkey smallint ,c_phone varchar ,c_acctbal decimal(12,2) ,c_mktsegment varchar ,c_comment varchar ,c_orders super ); /* Datamodel of documents to be stored in c_orders Super column would be as follows*/ ARRAY < STRUCT < o_orderkey:bigint ,o_orderstatus:string ,o_totalprice:double ,o_orderdate:string ,o_orderpriority:string ,o_clerk:string ,o_shippriority:int ,o_comment:string ,o_lineitems:ARRAY < STRUCT < l_partkey:bigint ,l_suppkey:bigint ,l_linenumber:int ,l_quantity:double ,l_extendedprice:double ,l_discount:double ,l_tax:double ,l_returnflag:string ,l_linestatus:string ,l_shipdate:string ,l_commitdate:string ,l_receiptdate:string ,l_shipinstruct:string ,l_shipmode:string ,l_comment:string > > > > /*part*/ CREATE TABLE part ( p_partkey bigint ,p_name varchar ,p_mfgr varchar ,p_brand varchar ,p_type varchar ,p_size int ,p_container varchar ,p_retailprice decimal(12,2) ,p_comment varchar ); /*region-nations*/ CREATE TABLE region_nations ( r_regionkey smallint ,r_name varchar ,r_comment varchar ,r_nations super ); /* Datamodel of documents to be stored in r_nations Super column would be as follows*/ ARRAY < STRUCT < n_nationkey:int,n_name:string,n_comment:string > > /*supplier-partsupp*/ CREATE TABLE supplier_partsupp ( s_suppkey bigint ,s_name varchar ,s_address varchar ,s_nationkey smallint ,s_phone varchar ,s_acctbal double precision ,s_comment varchar ,s_partsupps super ); /* Datamodel of documents to be stored in s_partsupps Super column would be as follows*/ ARRAY < STRUCT < ps_partkey:bigint,ps_availqty:int,ps_supplycost:double,ps_comment:string > >