Monday, January 14, 2019

Hive: Create table like with Storage format

In Hive, You can specify the storage format while creating a like table.

Example
create table target_table like source_table stored as ORC;

Apache Hive JIRA: https://issues.apache.org/jira/browse/HIVE-7122

Unix: 'echo' remove new line character

For removing new line character in Unix echo command. Then using option "-n" do not print the trailing newline character.

echo -n "choicest word in the world is deed" > result.txt