C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
Hive - Load DataOnce the internal table has been created, the next step is to load the data into it. So, in Hive, we can easily load data from any file to the database.
load data local inpath '/home/codegyani/hive/emp_details' into table demo.employee; Here, emp_details is the file name that contains the data.
select * from demo.employee;
load data local inpath '/home/codegyani/hive/emp_details1' into table demo.employee;
Here, the third column contains the data of string type, and the table allows the float type data. So, this condition arises in an unmatched data situation.
load data local inpath '/home/codegyani/hive/emp_details2' into table demo.employee; Here, data loaded successfully.
select * from demo.employee Here, we can see the Null values at the position of unmatched data.
Next TopicHive - Drop Table
|