Unable to create export table from hive to mysql database using sqoop


#1

I am trying to create a table to export data back to mysql from Hive using sqoop. The table I am creating is d_rev and I expect it to be visible in my hive database rachit92_sqoop. Please go through my code and let me know where am I going wrong

mysql> show databases;
±-------------------+
| Database |
±-------------------+
| information_schema |
| retail_db |
| retail_export |
| retail_results |
±-------------------+
4 rows in set (0.00 sec)
mysql> use retail_export;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> create table d_rev(order_date varchar(30), revenue float);
Query OK, 0 rows affected (0.01 sec)
mysql> exit;
Bye
[rachit92@gw03 ~]$ hive
Logging initialized using configuration in file:/etc/hive/2.5.0.0-1245/0/hive-log4j.properties
hive (default)> use rachit92_sqoop;
OK
Time taken: 1.588 seconds
hive (rachit92_sqoop)> show tables;
OK
order_items
orders
Time taken: 0.177 seconds, Fetched: 2 row(s)
hive (rachit92_sqoop)>


#2

Also, when I am performing the following commands to use and view the tables, I am seeing the tables created by everyone until now. This seems to be a technical glitch and it is also seems to be connected to why I am not able to see the table I creat in Hive under hive database rachit92_sqoop. Kindly sort this.

Below is the list I am seeing:
mysql> create daily_revv(order_date varchar(30), revenue float);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘daily_revv(order_date varch
ar(30), revenue float)’ at line 1
mysql> create table daily_revv(order_date varchar(30), revenue float);
Query OK, 0 rows affected (0.01 sec)
mysql> show tables;
±------------------------------------------------------+
| Tables_in_retail_export |
±------------------------------------------------------+
| 1aus_daily_revenue |
| 1aus_daily_revenue_demo |
| 1aus_daily_revenue_stage |
| 1aus_result |
| 1timeorder |
| 8314sample |
| AK_daily_revenue |
| AK_daily_revenue_demo |
| AR_DUMMY |
| DR |
| DR_30 |
| DR_demo |
| DT_departments_export |
| DUMMA |
| DUMMY |
| DUMMY1 |
| DUMMY2 |
| DUMMY20180226 |
| DUMMY3 |
| DUMMY55 |
| DUMMY_JI |
| DUMMY_NIS |
| DUMMY_ORDERS |
| DUMMY_PVAK |
| Ditto |
| Dummy |
| Dummy3 |
| HELLO |
| MUMMY |
| ORDERS_BY_STATUS_c0246440 |
| PBRorder_items |
PKBorders |
| PRODUCTS_REPLICA |
| Persons |
| RGdummy |
| SADIQUE |
| SATYA_DEMO |
| SOMEDUMMY |
| SRINU111 |
| STG_SAP_MAKT |
| Shoes1 |
| Student |
| Student121 |
| TAM |
| TEST |
| TESTDEMO |
| Test |
| Tom |
| YOLO |
| ZZ_TEST_DDL |
| ZZ_test_tab |
| a |
| abc |
| abhig60bd_daily_revenue |
| abhig60bd_daily_revenue_demo |
| abhig60bd_daily_revenue_stage |
| abhilabs10_products |
| abhilabspro4 |
| acad |
| aditya |
| al_prod_replica |
| al_revenue |
| aldummy |
| alproducts_external |
| amar_dummy_emp


#3

Also, I am getting insufficient error messages and too many logins, permission denied error message. Kindly resolve


#4

@rachit92

You can able to log in now. End your sessions properly after practising using exit or Ctrl+d


#5

Thanks. But I am facing insufficient memory issue now.


#6

@rachit92 Issue resolved. Due to high usage of resources caused the error. Now you can practice.


#7