Skip to content

Instantly share code, notes, and snippets.

@t3rmin4t0r
Last active July 13, 2018 18:17
Show Gist options
  • Save t3rmin4t0r/087b61f79514673c307bb9a88327a4db to your computer and use it in GitHub Desktop.
Save t3rmin4t0r/087b61f79514673c307bb9a88327a4db to your computer and use it in GitHub Desktop.
code for Cannot INSERT OVERWRITE on clustered table with > 8 buckets
CREATE TABLE IF NOT EXISTS passaggi1718
(
PASSAGGIO int
,DISTINCTTESSERA string
,DISTINCTTESSERAXGG string
,CODICETESSERA string
,PRIMOINGRESSOAX decimal(38,10)
,PRIMOINGRESSOCALC decimal(38,10)
,PRODLORDO decimal(20,6)
,PUNTI decimal(38,10)
,NPOOLNR int
,NZUTRNR int
,NKASSANR int
,ID_TICKETTYPE int
,ID_PERSONTYPE int
,ID_TICKETPERSONTYPEDEF int
,NZUTRNRPRINGR decimal(38,10)
,NZUTRNRBEF decimal(38,10)
,NZUTRNRAFT decimal(38,10)
,NSERIENNR decimal(38,10)
,NSERIENNR_GROUP string
,NGES_VALLEY_COMPANY string
)
PARTITIONED BY (DATAPASSAGGIO string)
CLUSTERED BY (ORAPASSAGGIO) INTO 8 BUCKETS
SORTED BY (ORAPASSAGGIO, ID_TICKETTYPE, ID_PERSONTYPE, NPOOLNR, NKASSANR)
STORED AS ORC
TBLPROPERTIES("orc.compress"="ZLIB");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment