In Hive 0.7, is there any way to create a view with spaces in the column name? In SQL Server I'd do:
CREATE VIEW test_vw
AS
SELECT col_name as [col name with spaces]
FROM test_tbl;
Is there a hive equivalent?
We need the view with names for use by end user tools.
From Hive documentation:
In Hive 0.12 and earlier, only alphanumeric and underscore characters are allowed in table and column names.
In Hive 0.13 and later, column names can contain any Unicode character (see HIVE-6013). Any column name that is specified within backticks (`) is treated literally
You can use
CREATE VIEW test_vw
AS
SELECT col_name as `col name with spaces`
FROM test_tbl;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With