Hive partition columns folders exchanged
up vote
1
down vote
favorite
I have a partitioned_table in hive which partitioned by "year,month",so my hdfs list is
/user/hive/warehouse/demo.db/employee/year=2017/month=6
when I used "export" to export table and use "import" to create a new table ,the result is the year and month exchanged, the list is
/user/hive/warehouse/demo.db/new_employee/month=6/year=2017
my hive version is 1.2.2 and the query:
export table employee into /user/hadoop/data
import table new_employee from /user/hadoop/data
the partitions in hive have no different with the original table(which one I export). Even I add a new partition, the directory is not changed, it work as '/month=7/year=6'
so what's wrong happened?Thanks for help!
hive partition
add a comment |
up vote
1
down vote
favorite
I have a partitioned_table in hive which partitioned by "year,month",so my hdfs list is
/user/hive/warehouse/demo.db/employee/year=2017/month=6
when I used "export" to export table and use "import" to create a new table ,the result is the year and month exchanged, the list is
/user/hive/warehouse/demo.db/new_employee/month=6/year=2017
my hive version is 1.2.2 and the query:
export table employee into /user/hadoop/data
import table new_employee from /user/hadoop/data
the partitions in hive have no different with the original table(which one I export). Even I add a new partition, the directory is not changed, it work as '/month=7/year=6'
so what's wrong happened?Thanks for help!
hive partition
tryshow partitions tablename
had you find any difference?
– HbnKing
Nov 22 at 15:32
What query did you use for import statement?
– Nishu Tayal
Nov 22 at 15:49
partitions have no changed
– Helt
Nov 22 at 22:56
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have a partitioned_table in hive which partitioned by "year,month",so my hdfs list is
/user/hive/warehouse/demo.db/employee/year=2017/month=6
when I used "export" to export table and use "import" to create a new table ,the result is the year and month exchanged, the list is
/user/hive/warehouse/demo.db/new_employee/month=6/year=2017
my hive version is 1.2.2 and the query:
export table employee into /user/hadoop/data
import table new_employee from /user/hadoop/data
the partitions in hive have no different with the original table(which one I export). Even I add a new partition, the directory is not changed, it work as '/month=7/year=6'
so what's wrong happened?Thanks for help!
hive partition
I have a partitioned_table in hive which partitioned by "year,month",so my hdfs list is
/user/hive/warehouse/demo.db/employee/year=2017/month=6
when I used "export" to export table and use "import" to create a new table ,the result is the year and month exchanged, the list is
/user/hive/warehouse/demo.db/new_employee/month=6/year=2017
my hive version is 1.2.2 and the query:
export table employee into /user/hadoop/data
import table new_employee from /user/hadoop/data
the partitions in hive have no different with the original table(which one I export). Even I add a new partition, the directory is not changed, it work as '/month=7/year=6'
so what's wrong happened?Thanks for help!
hive partition
hive partition
edited Nov 23 at 14:45
asked Nov 22 at 15:16
Helt
63
63
tryshow partitions tablename
had you find any difference?
– HbnKing
Nov 22 at 15:32
What query did you use for import statement?
– Nishu Tayal
Nov 22 at 15:49
partitions have no changed
– Helt
Nov 22 at 22:56
add a comment |
tryshow partitions tablename
had you find any difference?
– HbnKing
Nov 22 at 15:32
What query did you use for import statement?
– Nishu Tayal
Nov 22 at 15:49
partitions have no changed
– Helt
Nov 22 at 22:56
try
show partitions tablename
had you find any difference?– HbnKing
Nov 22 at 15:32
try
show partitions tablename
had you find any difference?– HbnKing
Nov 22 at 15:32
What query did you use for import statement?
– Nishu Tayal
Nov 22 at 15:49
What query did you use for import statement?
– Nishu Tayal
Nov 22 at 15:49
partitions have no changed
– Helt
Nov 22 at 22:56
partitions have no changed
– Helt
Nov 22 at 22:56
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Is there issue in the way you are looking at the data as long as you dont have that issue then it is not a problem.by the way this is right export command for exporting the partition table
export table employee partition (year="2017", month="6") to 'hdfs_exports_location/employee';
import from 'hdfs_exports_location/employee';
well if you have more partition on year and month ..like each year will have 12 month of data i think you may have to do for each month separate command ..i have not tried..just try it with the above command let us know how it is coming
I know your means, and all people tell me I should export or import the partitions one by one, but I only want to know this problem is whether or not a bug?Why did this happened?
– Helt
Nov 23 at 10:31
this is not problem..you can say it is restriction from hive ..As of now this is the way to do it..May be in future they might normal way of export like how we will do it for normal tables
– sivaraj
Nov 24 at 5:28
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Is there issue in the way you are looking at the data as long as you dont have that issue then it is not a problem.by the way this is right export command for exporting the partition table
export table employee partition (year="2017", month="6") to 'hdfs_exports_location/employee';
import from 'hdfs_exports_location/employee';
well if you have more partition on year and month ..like each year will have 12 month of data i think you may have to do for each month separate command ..i have not tried..just try it with the above command let us know how it is coming
I know your means, and all people tell me I should export or import the partitions one by one, but I only want to know this problem is whether or not a bug?Why did this happened?
– Helt
Nov 23 at 10:31
this is not problem..you can say it is restriction from hive ..As of now this is the way to do it..May be in future they might normal way of export like how we will do it for normal tables
– sivaraj
Nov 24 at 5:28
add a comment |
up vote
0
down vote
Is there issue in the way you are looking at the data as long as you dont have that issue then it is not a problem.by the way this is right export command for exporting the partition table
export table employee partition (year="2017", month="6") to 'hdfs_exports_location/employee';
import from 'hdfs_exports_location/employee';
well if you have more partition on year and month ..like each year will have 12 month of data i think you may have to do for each month separate command ..i have not tried..just try it with the above command let us know how it is coming
I know your means, and all people tell me I should export or import the partitions one by one, but I only want to know this problem is whether or not a bug?Why did this happened?
– Helt
Nov 23 at 10:31
this is not problem..you can say it is restriction from hive ..As of now this is the way to do it..May be in future they might normal way of export like how we will do it for normal tables
– sivaraj
Nov 24 at 5:28
add a comment |
up vote
0
down vote
up vote
0
down vote
Is there issue in the way you are looking at the data as long as you dont have that issue then it is not a problem.by the way this is right export command for exporting the partition table
export table employee partition (year="2017", month="6") to 'hdfs_exports_location/employee';
import from 'hdfs_exports_location/employee';
well if you have more partition on year and month ..like each year will have 12 month of data i think you may have to do for each month separate command ..i have not tried..just try it with the above command let us know how it is coming
Is there issue in the way you are looking at the data as long as you dont have that issue then it is not a problem.by the way this is right export command for exporting the partition table
export table employee partition (year="2017", month="6") to 'hdfs_exports_location/employee';
import from 'hdfs_exports_location/employee';
well if you have more partition on year and month ..like each year will have 12 month of data i think you may have to do for each month separate command ..i have not tried..just try it with the above command let us know how it is coming
edited Nov 23 at 9:12
Nishu Tayal
11.2k73381
11.2k73381
answered Nov 23 at 3:45
sivaraj
143
143
I know your means, and all people tell me I should export or import the partitions one by one, but I only want to know this problem is whether or not a bug?Why did this happened?
– Helt
Nov 23 at 10:31
this is not problem..you can say it is restriction from hive ..As of now this is the way to do it..May be in future they might normal way of export like how we will do it for normal tables
– sivaraj
Nov 24 at 5:28
add a comment |
I know your means, and all people tell me I should export or import the partitions one by one, but I only want to know this problem is whether or not a bug?Why did this happened?
– Helt
Nov 23 at 10:31
this is not problem..you can say it is restriction from hive ..As of now this is the way to do it..May be in future they might normal way of export like how we will do it for normal tables
– sivaraj
Nov 24 at 5:28
I know your means, and all people tell me I should export or import the partitions one by one, but I only want to know this problem is whether or not a bug?Why did this happened?
– Helt
Nov 23 at 10:31
I know your means, and all people tell me I should export or import the partitions one by one, but I only want to know this problem is whether or not a bug?Why did this happened?
– Helt
Nov 23 at 10:31
this is not problem..you can say it is restriction from hive ..As of now this is the way to do it..May be in future they might normal way of export like how we will do it for normal tables
– sivaraj
Nov 24 at 5:28
this is not problem..you can say it is restriction from hive ..As of now this is the way to do it..May be in future they might normal way of export like how we will do it for normal tables
– sivaraj
Nov 24 at 5:28
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53433917%2fhive-partition-columns-folders-exchanged%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
try
show partitions tablename
had you find any difference?– HbnKing
Nov 22 at 15:32
What query did you use for import statement?
– Nishu Tayal
Nov 22 at 15:49
partitions have no changed
– Helt
Nov 22 at 22:56