I followed the directions in the tutorial to create the three tables and then load the corresponding tsv files into them. However the data from the tsv file is not being loaded into the proper table columns/there are null values. Here is an example from the "users" table:
I posted this question because I noticed there is an error in the create table statements in the tutorial. For example, the statement to create the "users" table is shown as:
create table users (swid STRING, birth_dt STRING, gender_cd CHAR(1)) ROW FORMAT DELIMITED FIELDS TERMINATED by't' stored as textfile tblproperties ("skip.header.line.count"="1");
Instead of 't', the statement should have '\t', as such:
create table users (swid STRING, birth_dt STRING, gender_cd CHAR(1)) ROW FORMAT DELIMITED FIELDS TERMINATED by'\t' stored as textfile tblproperties ("skip.header.line.count"="1");
*Note: The images of the statements shown in the tutorial are correct.*
Using the proper create table statements will now give you the proper table results:
Issue might be with the creation of table with appropriate column types. Either run below command from Hive CLI or Beeline and provide an output, even provide sample data that you're trying to load.
describe formatted users;
Thanks for the comments Sridhar. As noted above in my reply to the question, there is an error in the create table statement which causes the issue ('t' should be '\t').