Support Questions
Find answers, ask questions, and share your expertise

data count not matching while inserting from source external orc partitioned table to target external orc partitioned table

Explorer

Hi All,

Count not matching when inserting from one partition table to other partition table with same schema .

I have pasted the quires below please look into it , help is appreciated.

hive> show partitions abc.xyz; /// External Source orc table

region_code=STR/partner_tier_indicator_code=T1/fiscal_year_week_code=201712 region_code=STR/partner_tier_indicator_code=T1/fiscal_year_week_code=201713 region_code=STR/partner_tier_indicator_code=T1/fiscal_year_week_code=201714 region_code=STR/partner_tier_indicator_code=T1/fiscal_year_week_code=201715 region_code=STR/partner_tier_indicator_code=T1/fiscal_year_week_code=201716 region_code=STR/partner_tier_indicator_code=T1/fiscal_year_week_code=201717

hive> show partitions abc.out_xyz; // External Target orc table

region_code=STR/partner_tier_indicator_code=T1/fiscal_year_week_code=201712 region_code=STR/partner_tier_indicator_code=T1/fiscal_year_week_code=201713 region_code=STR/partner_tier_indicator_code=T1/fiscal_year_week_code=201714 region_code=STR/partner_tier_indicator_code=T1/fiscal_year_week_code=201715 region_code=STR/partner_tier_indicator_code=T1/fiscal_year_week_code=201716 region_code=STR/partner_tier_indicator_code=T1/fiscal_year_week_code=201717

hive> select count(1) from abc.xyz where region_code='STR' and fiscal_year_week_code='201716';

8791

Time taken: 0.265 seconds, Fetched: 1 row(s)

hive> select count(1) from abc.out_xyz where region_code='STR' and fiscal_year_week_code='201716';

48357

Time taken: 0.259 seconds, Fetched: 1 row(s)

1 REPLY 1

HI @Satish Anjaneyappa Could you please share the DDL of those two ORC tables and how you are loading it?