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
Vous devez vous connecter pour publier un commentaire.
ajouter la partition avant le chargement:
ou essayez de partitionnement dynamique:
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:For direct MetaStore DB connections, we don't support retries at the client level.)
mais j'ai déjà mis lahive-site.xml
< propriété> < nom>javax.jdo.option.ConnectionURL< /nom> < valeur>jdbc:mysql://djt01:3306/ruche?characterEncoding=UTF-8< /valeur> < description>JDBC chaîne de connexion pour JDBC metastore< /description> < /propriété>