Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 0: jdbc:hive2://localhost:10000> CREATE TABLE IF NOT EXISTS employee ( eid int, name String,salary String, destination String) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' STORED AS TEXTFILE;
- No rows affected (0.125 seconds)
- 0: jdbc:hive2://localhost:10000> LOAD DATA LOCAL INPATH '/opt/docker/sample.txt' INTO TABLE employee;
- No rows affected (0.205 seconds)
- 0: jdbc:hive2://localhost:10000> SELECT * FROM employee;
- +---------------+----------------+------------------+-----------------------+--+
- | employee.eid | employee.name | employee.salary | employee.destination |
- +---------------+----------------+------------------+-----------------------+--+
- | 1201 | Gopal | 45000 | Technical manager |
- | 1202 | Manisha | 45000 | Proof reader |
- | 1203 | Masthanvali | 40000 | Technical writer |
- | 1204 | Kiran | 40000 | Hr Admin |
- | 1205 | Kranthi | 30000 | Op Admin |
- +---------------+----------------+------------------+-----------------------+--+
- 5 rows selected (0.143 seconds)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement