I am able to create a table having column name with white spaces.
CREATE EXTERNAL TABLE IF NOT EXISTS EXT_MILOGS(`Country of Visits` string);
But when I try same thing with struct datatype
CREATE EXTERNAL TABLE IF NOT EXISTS EXT_MILOGS(dimensions struct<`Country of Visits`: string>);
I am not able to create the same. Am I missing something here?
How can I achieve this as I am getting data in JSON format and change in the column name does not read the field data with 'org.openx.data.jsonserde.JsonSerDe' parser.
You can try loading the JSON file into hive stage table with JSON as storage type. After that you can alter the column as you wish and store it as any other complex data type. But still you cannot use string literal for complex data types rather you have an option of altering the column name as you have a stage table before with JSON storage.
Hope it helps!!