Hive 1.1.0 Alter table-partition-Typ von int zu string

Ich habe eine Tabelle ist, die eine partition vom Typ int, aber die möchte ich umwandeln in string. Allerdings kann ich nicht herausfinden, wie dies zu tun.

Dem Tisch Beschreibung:

Col1 timestamp
Col2 string
Col3 string
Col4 string
Part_col int

# Partition information
# col_name data_type comment

Part_col int

Die Partitionen die ich erstellt habe, sind Part_col=0, Part_col=1, ..., Part_col=23

Will ich ändern Sie Sie, um Part_col='0' etc

Ich diesen Befehl ausführen im hive:

set hive.exec.dynamic.partitions = true;
Alter table tbl_name partition (Part_col=0) Part_col Part_col string;

Habe ich auch versucht, mit Hilfe von "partition (Part_col)", um alle Partitionen auf einmal.

Bekomme ich die Fehlermeldung "Invalid column reference Part_col"

Ich bin mit dem Beispiel von https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Arten für die Umwandlung von dezimal-Spalten, kann aber nicht herausfinden können, was dec_column_name darstellt.

Dank

InformationsquelleAutor Chris Njuguna | 2015-07-17

Schreibe einen Kommentar