CREATETEMPORARYEXTERNALTABLEIFNOTEXISTSlist_bucket_multiple(col1STRING,col2INT,col3STRING)COMMENT'this is a comment';
CREATETEMPORARYEXTERNALTABLEIFNOTEXISTSlist_bucket_multiple(col1STRING,col2INT,col3STRING)COMMENT'this is a comment1'PARTITIONEDBY(`date`STRINGCOMMENT'column_comment');
CREATETEMPORARYEXTERNALTABLEIFNOTEXISTSlist_bucket_multiple(col1STRING,col2INT,col3STRING)COMMENT'this is a comment2'PARTITIONEDBY(`date`STRINGCOMMENT'column_comment')CLUSTEREDBY(col1,col2)INTO32BUCKETS;
CREATETEMPORARYEXTERNALTABLEIFNOTEXISTSlist_bucket_multiple(col1STRING,col2INT,col3STRING)COMMENT'this is a comment3'PARTITIONEDBY(`date`STRINGCOMMENT'column_comment')CLUSTEREDBY(col1,col2)SORTEDBY(col1ASC)INTO22BUCKETS;
CREATETEMPORARYEXTERNALTABLEIFNOTEXISTSlist_bucket_multiple(col1STRING,col2INT,col3STRING)COMMENT'this is a comment4'PARTITIONEDBY(`date`STRINGCOMMENT'column_comment')CLUSTEREDBY(col1,col2)SORTEDBY(col1ASC)INTO34BUCKETSSKEWEDBY(col1,col2)ON(('s1',1),('s3',3),('s13',13),('s78',78))STOREDASDIRECTORIES;
CREATETABLEpage_view(
viewTimeINT,
useridBIGINT,
page_urlSTRING,
referrer_urlSTRING,
ipSTRINGCOMMENT'IP Address of the User'
)COMMENT'This is the page view table'PARTITIONEDBY(dtSTRING,countrySTRING)CLUSTEREDBY(userid)SORTEDBY(viewTime)INTO32BUCKETSROWFORMATDELIMITEDFIELDSTERMINATEDBY'\001'COLLECTIONITEMSTERMINATEDBY'\002'MAPKEYSTERMINATEDBY'\003'STOREDASSEQUENCEFILE;
CREATETEMPORARYEXTERNALTABLEpage_view(
viewTimeINT,
useridBIGINT,
page_urlSTRING,
referrer_urlSTRING,
ipSTRINGCOMMENT'IP Address of the User'
)COMMENT'This is the page view table'PARTITIONEDBY(dtSTRING,countrySTRING)CLUSTEREDBY(userid)SORTEDBY(viewTime)INTO32BUCKETSROWFORMATDELIMITEDFIELDSTERMINATEDBY'\001'COLLECTIONITEMSTERMINATEDBY'\002'MAPKEYSTERMINATEDBY'\003'STOREDASSEQUENCEFILE;
CREATETEMPORARYEXTERNALTABLEIFNOTEXISTSpage_view(
viewTimeINT,
useridBIGINT,
page_urlSTRING,
referrer_urlSTRING,
ipSTRINGCOMMENT'IP Address of the User'
)COMMENT'This is the page view table'PARTITIONEDBY(dtSTRING,countrySTRING)CLUSTEREDBY(userid)SORTEDBY(viewTime)INTO32BUCKETSROWFORMATDELIMITEDFIELDSTERMINATEDBY'\001'COLLECTIONITEMSTERMINATEDBY'\002'MAPKEYSTERMINATEDBY'\003'STOREDASSEQUENCEFILE;
CREATETEMPORARYEXTERNALTABLEIFNOTEXISTSpage_view(
viewTimeINT,
useridBIGINT,
page_urlSTRING,
referrer_urlSTRING,
ipSTRINGCOMMENT'IP Address of the User'
)COMMENT'This is the page view table'PARTITIONEDBY(dtSTRING,countrySTRING)CLUSTEREDBY(userid)SORTEDBY(viewTime)INTO32BUCKETSROWFORMATDELIMITEDFIELDSTERMINATEDBY'\001'COLLECTIONITEMSTERMINATEDBY'\002'MAPKEYSTERMINATEDBY'\003'STOREDASSEQUENCEFILELOCATION'/hsd_path';
CREATETEMPORARYEXTERNALTABLEIFNOTEXISTSpage_view(
viewTimeINT,
useridBIGINT,
page_urlSTRING,
referrer_urlSTRING,
ipSTRINGCOMMENT'IP Address of the User'
)COMMENT'This is the page view table'PARTITIONEDBY(dtSTRING,countrySTRING)CLUSTEREDBY(userid)SORTEDBY(viewTime)INTO32BUCKETSROWFORMATDELIMITEDFIELDSTERMINATEDBY'\001'COLLECTIONITEMSTERMINATEDBY'\002'MAPKEYSTERMINATEDBY'\003'STOREDASSEQUENCEFILELOCATION'/hsd_path'AS