Book Image

MySQL 8 for Big Data

By : Shabbir Challawala, Chintan Mehta, Kandarp Patel, Jaydip Lakhatariya
Book Image

MySQL 8 for Big Data

By: Shabbir Challawala, Chintan Mehta, Kandarp Patel, Jaydip Lakhatariya

Overview of this book

With organizations handling large amounts of data on a regular basis, MySQL has become a popular solution to handle this structured Big Data. In this book, you will see how DBAs can use MySQL 8 to handle billions of records, and load and retrieve data with performance comparable or superior to commercial DB solutions with higher costs. Many organizations today depend on MySQL for their websites and a Big Data solution for their data archiving, storage, and analysis needs. However, integrating them can be challenging. This book will show you how to implement a successful Big Data strategy with Apache Hadoop and MySQL 8. It will cover real-time use case scenario to explain integration and achieve Big Data solutions using technologies such as Apache Hadoop, Apache Sqoop, and MySQL Applier. Also, the book includes case studies on Apache Sqoop and real-time event processing. By the end of this book, you will know how to efficiently use MySQL 8 to manage data for your Big Data applications.
Table of Contents (17 chapters)
Title Page
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface

Loading structured data to MySQL using Apache Sqoop


So by now, we have imported all data into HDFS and the data has been processed using MapReduce. Now we need to transfer the data back to MySQL. Apache Sqoop provides the export feature to export data from HDFS storage to relational database like MySQL.

Sqoop export for storing structured data from MySQL 8

Apache Sqoop's export feature can transfer data back to the relational database using the following three methods:

  • In insert mode, Sqoop will generate insert queries for the data to be inserted into MySQL. Insert is the default mode of transferring data from HDFS using Sqoop.
  • In update mode, Sqoop will provide update statements to update data into the existing records in the destination database.
  • In call mode, Sqoop will have a stored procedure call in iteration for the data in HDFS.

Following are generic commands available for exporting data using Sqoop:

sqoop export (generic-args) (export-args)
sqoop-export (generic-args) (export-args)

generic...