Copyright © 2017, edureka and/or its affiliates. All rights reserved. Topics to be covered… Problems with RDBMS Need for Sqoop Introduction to Sqoop Features of Sqoop Sqoop Architecture Sqoop Commands & Demo using MySQL 1 2 3 4 5 6
Copyright © 2017, edureka and/or its affiliates. All rights reserved. Problems with Relational Database Data Importing was Tedious task Difficult to handle large datasets Cant store Unstructured Data Time Consuming Task RDBMS
Copyright © 2017, edureka and/or its affiliates. All rights reserved. Need for Sqoop Data Analysis Command Line Interface High Performance
Copyright © 2017, edureka and/or its affiliates. All rights reserved. What is Sqoop? RDBMS HDFS Import Tool used to transfer bulk data between HDFS & Relational Database Servers
Copyright © 2017, edureka and/or its affiliates. All rights reserved. What is Sqoop? RDBMS HDFS Export Tool used to transfer bulk data between HDFS & Relational Database Servers
Copyright © 2017, edureka and/or its affiliates. All rights reserved. Features of Sqoop Full Load Incremental Load Parallel Import/Export Compression Kerberos Security Integration Data loading directly to HIVE
Copyright © 2017, edureka and/or its affiliates. All rights reserved. Sqoop Architecture
Copyright © 2017, edureka and/or its affiliates. All rights reserved. How Sqoop Import & Export Works?
Sqoop Commands
IMPORT EXPORT LIST DATABASE LIST TABLES CODEGEN Sqoop Import Command Import Import each table of the RDBMS in Hadoop $ sqoop import --connect jdbc:mysql://<ip address>/<database name> --table <mysql_table name> --username <username_for_mysql_user> --password <Password> --target-dir <target directory where data needs to be imported>
IMPORT EXPORT LIST DATABASE LIST TABLES CODEGEN Sqoop Export Command Exports data from HDFS to RDBMS Export $ sqoop export --connect jdbc:mysql://<ip address>/<database name> --table <mysql_table name> --username <username_for_mysql_user> --password <Password> --export-dir <directory name where data needs to be exported>
IMPORT EXPORT LIST DATABASE LIST TABLES CODEGEN Sqoop List Database It lists the databases present in the relational database Sqoop $ sqoop list databases --connect jdbc:mysql://<ip address>/<database name> --table <mysql_table name> --username <username_for_mysql_user> --password <Password>
IMPORT EXPORT LIST DATABASE LIST TABLES CODEGEN Sqoop List Tables ID Name Age Address 1 Jino 25 Kottayam 2 Neha 22 Dharwad 3 Chaitra 23 Bangalore It lists the available tables in the database $ sqoop list tables --connect jdbc:mysql://<ip address>/<database name> --table <mysql_table name> --username <username_for_mysql_user> --password <Password>
IMPORT EXPORT LIST DATABASE LIST TABLES CODEGEN Sqoop Codegen Generates DAO Class automatically Generates Java Class file Source code can be recreated $ sqoop codegen --connect jdbc:mysql://<ip address>/<database name> --table <mysql_table name> --username <username_for_mysql_user> --password <Password>
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hadoop Training | Edureka

Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hadoop Training | Edureka

  • 2.
    Copyright © 2017,edureka and/or its affiliates. All rights reserved. Topics to be covered… Problems with RDBMS Need for Sqoop Introduction to Sqoop Features of Sqoop Sqoop Architecture Sqoop Commands & Demo using MySQL 1 2 3 4 5 6
  • 3.
    Copyright © 2017,edureka and/or its affiliates. All rights reserved. Problems with Relational Database Data Importing was Tedious task Difficult to handle large datasets Cant store Unstructured Data Time Consuming Task RDBMS
  • 4.
    Copyright © 2017,edureka and/or its affiliates. All rights reserved. Need for Sqoop Data Analysis Command Line Interface High Performance
  • 5.
    Copyright © 2017,edureka and/or its affiliates. All rights reserved. What is Sqoop? RDBMS HDFS Import Tool used to transfer bulk data between HDFS & Relational Database Servers
  • 6.
    Copyright © 2017,edureka and/or its affiliates. All rights reserved. What is Sqoop? RDBMS HDFS Export Tool used to transfer bulk data between HDFS & Relational Database Servers
  • 7.
    Copyright © 2017,edureka and/or its affiliates. All rights reserved. Features of Sqoop Full Load Incremental Load Parallel Import/Export Compression Kerberos Security Integration Data loading directly to HIVE
  • 8.
    Copyright © 2017,edureka and/or its affiliates. All rights reserved. Sqoop Architecture
  • 9.
    Copyright © 2017,edureka and/or its affiliates. All rights reserved. How Sqoop Import & Export Works?
  • 10.
  • 11.
    IMPORT EXPORT LIST DATABASE LIST TABLES CODEGEN SqoopImport Command Import Import each table of the RDBMS in Hadoop $ sqoop import --connect jdbc:mysql://<ip address>/<database name> --table <mysql_table name> --username <username_for_mysql_user> --password <Password> --target-dir <target directory where data needs to be imported>
  • 12.
    IMPORT EXPORT LIST DATABASE LIST TABLES CODEGEN SqoopExport Command Exports data from HDFS to RDBMS Export $ sqoop export --connect jdbc:mysql://<ip address>/<database name> --table <mysql_table name> --username <username_for_mysql_user> --password <Password> --export-dir <directory name where data needs to be exported>
  • 13.
    IMPORT EXPORT LIST DATABASE LIST TABLES CODEGEN SqoopList Database It lists the databases present in the relational database Sqoop $ sqoop list databases --connect jdbc:mysql://<ip address>/<database name> --table <mysql_table name> --username <username_for_mysql_user> --password <Password>
  • 14.
    IMPORT EXPORT LIST DATABASE LIST TABLES CODEGEN SqoopList Tables ID Name Age Address 1 Jino 25 Kottayam 2 Neha 22 Dharwad 3 Chaitra 23 Bangalore It lists the available tables in the database $ sqoop list tables --connect jdbc:mysql://<ip address>/<database name> --table <mysql_table name> --username <username_for_mysql_user> --password <Password>
  • 15.
    IMPORT EXPORT LIST DATABASE LIST TABLES CODEGEN SqoopCodegen Generates DAO Class automatically Generates Java Class file Source code can be recreated $ sqoop codegen --connect jdbc:mysql://<ip address>/<database name> --table <mysql_table name> --username <username_for_mysql_user> --password <Password>