Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if the import of Mysql data from Sqoop to Hive appears ASCII

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you the introduction of Sqoop Mysql data to Hive ASCII how to do, I believe that most people do not understand, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!

The problem is that when you import data from Mysql to Hive, the data in Mysql is "T2". After entering Hive, it becomes "5432". Why, how garbled is it? it feels like ASCII coding.

There is a phenomenon, have not encountered this before, feel very strange, quickly look for the relevant information, and then check the Mysql database table field is the text type.

How to solve it: add the following parameter to the sqoop import statement, where xxx is the column name in the database table, that is, the column name where ASCII appears above.

List-1

-- map-column-java xxx=String

If there are multiple fields with ASCII, you need to escape multiple fields, such as List-2, which needs to be written as one line to deal with:

List-2

-- map-column-java field 1=String, field 2=String, field 3=String, field 4=String above is all the contents of this article "what to do when importing Mysql data into Hive from Sqoop to Hive". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report