Search code examples
clouderaimpala

Impala add column to existing VIEW


I went through the Cloudera docs.

It doesn't mention how to add a column to an existing view. Is it because there is no way to achieve that? If I use DESCRIBE FORMATTED and use the original view definition of select * from xyz(an example is shown here) to drop the existing view and recreate the view with the same userId, will it work exactly as it did before?


Solution

  • You are right - DROP-CREATE should work. Even ALTER VIEW view_name AS SELECT ..., new_col FROM table should work. May be you can share what query you are trying and what is the error you are facing.