1

Given table of format:

hive> describe tableA;
OK
id      int
ts      timestamp
var     float
...     ...

I would like to utilise a solution similar to the one discussed by @interskh converting all columns to strings without knowing and explicitly referring to column names.

On the lines of the syntax:

ALTER TABLE tableA CHANGE <<all columnns>> string
user4157124
  • 2,809
  • 13
  • 27
  • 42
Konrad
  • 17,740
  • 16
  • 106
  • 167

1 Answers1

2

As far as I know, you have to change the column's datatype one by one. You can't alter all the column's name or datatype in a single query, according to the official documentation. Please refer to this question I recently answered.

Community
  • 1
  • 1
Andrea
  • 4,262
  • 4
  • 37
  • 56