With Sqoop, you can import data from a relational database system or a mainframe(主机) into HDFS. The input(投入) to the import process is either database table or mainframe datasets. For databases, Sqoop will read the table row-by-row into HDFS. For mainframe datasets, Sqoop will read records from each mainframe dataset into HDFS. The output(输出) of this import process is a set of files containing a copy of the imported table or datasets. The import process is performed in parallel(平行线). For this reason, the output will be in multiple files. These files may be delimited(划界) text files (for example, with commas or tabs separating each field), or binary(二进制的) Avro or SequenceFiles containing serialized(序列化) record data.
在Sqoop,你可以从关系型数据库或主机中导入数据到HDFS,导入过程的输入的数据要么是数据库表,要么是大型机数据集。如果是数据库,sqoop将以row-by-row的方式写进hdfs,如果是大型机的数据集,sqoop将在读取数据集中每条集合到hdfs。此导入过程是输出一组包含导入表或数据集副本的文件。这个导入过程是并行执行的。基于这个原因,输出的时候会在多个文件中。这些文件应该可能会分隔文本文件(例如,会以逗号或者tabs分割开每个field),或者binary Avro 或者 序列文件包括序列化的数据记录

A by-product of the import process is a generated(生成的) Java class which can encapsulate(压缩) one row of the imported table. This class is used during the import process by Sqoop itself. The Java source code for this class is also provided to you, for use in subsequent(后来的) MapReduce processing of the data. This class can serialize and deserialize(并行化) data to and from the SequenceFile format. It can also parse(解析) the delimited-text form of a record. These abilities allow you to quickly develop MapReduce applications that use the HDFS-stored records in your processing pipeline(管道). You are also free to parse the delimiteds record data yourself, using any other tools you prefer.
导入过程的副产物是生成一个能压缩导入的数据表中一行java类,这个类在导入过程中由Sqoop自身使用。还向您提供了该类的Java源代码,用于数据的后续MapReduce处理。这个类可以序列化和反序列化数据到Sequence文件格式。它还可以解析带分隔符内容文件的记录。这些功能允许您快速开发MapReduce应用程序,这个应用程序在处理管道中使用hdfs存储的记录的。您也可以使用您喜欢的任何其他工具自行解析分隔记录数据。

After manipulating(操纵) the imported records (for example, with MapReduce or Hive) you may have a result data set which you can then export back to the relational database. Sqoop’s export process will read a set of delimited text files from HDFS in parallel, parse them into records, and insert them as new rows in a target database table, for consumption by external a pplications or users.
在操作导入的记录(例如,使用MapReduce或Hive)之后,您将有一个结果数据集,然后可以将其导出回关系数据库。sqoop的导出过程将并行地从HDFS读取一组分隔的文本文件 ,将它们解析为记录,并将它们作为新行插入目标数据库表中,供外部应用程序或用户使用

Sqoop includes some other commands which allow you to inspect the database you are working with. For example, you can list the available database schemas (with the sqoop-list-databases tool) and tables within a schema (with the sqoop-list-tables tool). Sqoop also includes a primitive(原始的) SQL execution(执行) shell(剥皮) (the sqoop-eval tool).
Sqoop包括一些其他命令,这些命令允许您检查正在使用的数据库。例如,可以列出可用的数据库集合(使用sqoop-list-database工具)和集合中的表(使用sqoop-list-table工具)。sqoop还包括一个基本的SQL执行shell(sqoop-val工具)。

Most aspects of the import, code generation, and export processes can be customized. For databases, you can control the specific row range or columns imported. You can specify particular delimiters(指定特定的分隔符) and escape characters(转义字符) for the file-based representation of the data, as well as the file format used. You can also control the class or package names used in generated(生成的) code. Subsequent(后来的) sections of this document explain how to specify these and other
大多数的导入、代码生成和导出过程的都可以定制。对于数据库,可以控制导入的特定行范围或列。可以为基于文件的数据表示指定特定的分隔符和转义字符,以及文件使用的格式。还可以控制生成代码中使用的类或包名称。 本文档的后续部分将解释如何指定这些和其他方面。

使用sqoop过程的更多相关文章

  1. Oozie 配合 sqoop hive 实现数据分析输出到 mysql

    文件/RDBMS -> flume/sqoop -> HDFS -> Hive -> HDFS -> Sqoop -> RDBMS 其中,本文实现了 使用 sqoo ...

  2. (转) Sqoop使用实例讲解

    原博客地址:http://blog.csdn.net/evankaka 摘要:本文主要讲了笔者在使用sqoop过程中的一些实例 一.概述与基本原理 Apache Sqoop(SQL-to-Hadoop ...

  3. c++ primer plus 第6版 部分二 5- 8章

    ---恢复内容开始--- c++ primer plus 第6版 部分二    5-  章 第五章 计算机除了存储外 还可以对数据进行分析.合并.重组.抽取.修改.推断.合成.以及其他操作 1.for ...

  4. 记录sqoop同步失败问题解决过程,过程真的是很崎岖。(1月6日解决)

    记录sqoop同步失败问题解决过程,过程真的是很崎岖.事发原因:最近突然出现sqoop export to mysql时频繁出错.看了下日志是卡在某条数据过不去了,看异常.看sqoop生成的mr并未发 ...

  5. Sqoop import加载HBase过程中,遇到Permission denied: user=root, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x

    在执行hbase sqoop抽取的时候,遇到了一个错误,如下图: 在执行程序的过程中,遇到权限问题很正常,也容易让人防不胜防,有问题就想办法解决,这个是关键. 解决办法如下: 第一步:su hdfs, ...

  6. [Hadoop] Sqoop安装过程详解

    Sqoop是一个用来将Hadoop和关系型数据库中的数据相互转移的工具,可以将一个关系型数据库(例如 : MySQL ,Oracle ,Postgres等)中的数据导进到Hadoop的HDFS中,也可 ...

  7. Sqoop安装与应用过程

    1.  参考说明 参考文档: http://sqoop.apache.org/ http://sqoop.apache.org/docs/1.99.7/admin/Installation.html ...

  8. sqoop的数据抽取过程记录

    今天公司抽取了4千万的表大概十几G 用sqoop抽取是30--40分钟 开了两个map.模型是oracle----hdfs(hive).以前只抽过几十万级别,所以千万级别感觉还是spilt做好切分和定 ...

  9. Hadoop学习笔记—18.Sqoop框架学习

    一.Sqoop基础:连接关系型数据库与Hadoop的桥梁 1.1 Sqoop的基本概念 Hadoop正成为企业用于大数据分析的最热门选择,但想将你的数据移植过去并不容易.Apache Sqoop正在加 ...

随机推荐

  1. PCA vs Linear Regression 可视化理解

    https://shankarmsy.github.io/posts/pca-vs-lr.html https://shapeofdata.wordpress.com/2013/04/09/princ ...

  2. javaMail 邮件发送和接收示例,支持正文图片、html、附件(转)

    转自:https://blog.csdn.net/star_fly4/article/details/52037587 一.RFC882文档简单说明 RFC882文档规定了如何编写一封简单的邮件(纯文 ...

  3. js程序中美元符号$是什么(转)

    $符号在php中是表示变量的特征字符, 在js中它也有很多作用, 一般我们用来命名一个函数名称,获取id的1.首先可以用来表示变量, 比如变量 var s='asdsd'或var $s='asdasd ...

  4. 小tip: base64:URL背景图片与web页面性能优化——张鑫旭

    一.base64百科 Base64是网络上最常见的用于传输8Bit字节代码的编码方式之一,可用于在HTTP环境下传递较长的标识信息. 某人: 唉,我彻底废柴了,为何上面明明是中文,洒家却看不懂嘞,为什 ...

  5. Code Signal_10分钟挑战题_constructArray

    完成时间3分06秒 Given an integer size, return an array containing each integer from 1 to size in the follo ...

  6. 使用JSON实现分页

    使用JSON实现分页可直接用 Fenye.html <!DOCTYPE html> <html> <head> <title>JSON分页</ti ...

  7. JavaScript正则表达式检验手机号码、邮箱、ip地址等

    1)检测IP地址的正则表达式 ((2 [0-4] \d | 25[0-5] | [01]?\d\d?) \.){3}(2 [0-4] \d | 25[0-5] | [01]?\d\d?) 2 [0-4 ...

  8. SQL Server 修改表结构被阻止 解决办法

    在我们的程序开发中,有时候会由于需求的变化而要修改数据库中的表结构.可能是增减列,也可能是修改数据类型,或者修改列名等等.但修改表结构是个危险操作,默认情况下,当你修改表结构时,会弹出如下提示框 上图 ...

  9. CentOS7系列--1.6CentOS7配置sudo

    CentOS7配置sudo 如果一些用户共享权限,配置sudo是为了分离用户的职责 1. 将root 的权限传递给所有用户 [root@centos7 ~]# visudo 添加下面的内容到最后一行, ...

  10. Navicat Premium 连接MySQL数据库出现Authentication plugin 'caching_sha2_password' cannot be loaded的解决方案

    1. 管理员权限运行命令提示符,登陆MySQL mysql -u root -p root 2. 修改账户密码加密规则并更新用户密码  ALTER USER 'root'@'localhost' ID ...