Hello:
I need help to see where I am doing wrong in creation of table & am getting couple of errors. Any help is greatly appreciated.
CODE:-
%sql
CREATE OR REPLACE TEMPORARY VIEW Table1
USING CSV
OPTIONS (
-- Location of csv file
path "/mnt/XYZ/SAMPLE.csv",
-- Header in the file
header "true", inferSchema "true");
%sql
SELECT * FROM Table1
%sql
CREATE OR REPLACE TABLE DBName.Tableinput
COMMENT 'This table uses the CSV format'
AS SELECT * FROM Table1;
Errors:-
Error in SQL statement: AnalysisException: REPLACE TABLE AS SELECT is only supported with v2 tables.;
Error in SQL statement: ParseException: mismatched input 'NOT' expecting {<EOF>, ';'}(line 1, pos 27)
Error in SQL statement: ParseException:
mismatched input '/' expecting {'(', 'CONVERT', 'COPY', 'OPTIMIZE', 'RESTORE', 'ADD', 'ALTER', 'ANALYZE', 'CACHE', 'CLEAR', 'COMMENT', 'COMMIT', 'CREATE', 'DELETE', 'DESC', 'DESCRIBE', 'DFS', 'DROP', 'EXPLAIN', 'EXPORT', 'FROM', 'GRANT', 'IMPORT', 'INSERT', 'LIST', 'LOAD', 'LOCK', 'MAP', 'MERGE', 'MSCK', 'REDUCE', 'REFRESH', 'REPLACE', 'RESET', 'REVOKE', 'ROLLBACK', 'SELECT', 'SET', 'SHOW', 'START', 'TABLE', 'TRUNCATE', 'UNCACHE', 'UNLOCK', 'UPDATE', 'USE', 'VALUES', 'WITH'}(line 2, pos 0)