Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

,when creating a partition table we dont have the original table

,when creating a partition table we dont have the original table

,

Example : when we create a partition like create table............. partition by(age), and load the table on basis of age then i just want to know if i do select * from table; how it is giving me the data for all the students but as the table is partitioned by age it should give me the data related to partition.

2 REPLIES 2
Highlighted

Re: ,when creating a partition table we dont have the original table

Explorer

If you want to query the data for specific partition then it should be part of the WHERE clause. Thanks

Highlighted

Re: ,when creating a partition table we dont have the original table

While loading data into the partition table how does it know that 3rd column in my textfile will be a "suppose i am partitioning with country" country becuase while creating a partition table like create table Stockmarket (namestock String,currency string,comp String) partitioned by (country String) row format delimited fields terminated by '\,' stored as textfile ; while loading this table like " load data local inpath '/user/himanshu/stock' into stockmarket partition(country);"

now my question is which column is it going to take as the country from the file,

Don't have an account?
Coming from Hortonworks? Activate your account here