Insérer dans la ruche table partitionnée SemanticException

J'ai d'abord créer une ruche d'une table partitionnée:

hive> create table partition_table
    > (sid int ,sname string ,age int)            
    > partitioned by (sex string)     
    > row format delimited fields terminated by',';  
OK
Time taken: 1.232 seconds

La table desc est donnée ci-dessous:

 hive> desc partition_table;
    OK
    sid                     int                                         
    sname                   string                                      
    age                     int                                         
    sex                     string                                      

# Partition Information      
# col_name              data_type               comment             

sex                     string                                      
Time taken: 0.34 seconds, Fetched: 9 row(s)

puis-je insérer des données dans ce tableau, mais il ne fonctionne pas.

hive> insert into table partition_table partition(sex='M')select sno ,sname ,age from student1 where sex ='M';
FAILED: SemanticException [Error 10006]: Line 1:44 Partition not found ''M''

Pour éviter ce que j'ai écrit la commande suivante, puis exécuté ma commande insert, même alors, je reçois la même erreur à plusieurs reprises.

set exec.dynamic.partition=true;                                                                           
set exec.dynamic.partition.mode=nonstrict;
  • pouvez-vous ajouter select sno ,sname ,age from student1 where sex ='M' sortie à la question. il n'y a pas de problème avec la requête.
  • bien sûr .. est-ce que la partition de la colonne doit être en anglais
InformationsquelleAutor HbnKing | 2017-07-27