http://blog.csdn.net/dbanote/article/details/8907650

目前版本的Sqoop中,使用自由形式查询导入,只提供简单的查询,没有复杂的和“OR”条件查询在where子句中。

http://blog.csdn.net/niityzu/article/details/42835273

sqoop list-databases --connect jdbc:mysql://ip:3306/ --username * --password *

sqoop import --connect jdbc:mysql://ip:3306/gwr --username * --password * --table * -m 1

sqoop import --connect jdbc:mysql://ip:3306/gwr --username * --password g* --split-by Period -e 'select s.*, a.UtilityAccountID from AccountStats s, Account a where a.AccountID=s.AccountID and $CONDITIONS' --target-dir /data -m 2

m 表示mapreduce进程数

Afilter = FILTER A by (StatsType MATCHES '.*EON_SH.heatinghours.*' or StatsType MATCHES '.*....*');

从hdfs导出到数据库

sqoop export --connect jdbc:mysql://ip:3306/gwr --username * --password g* --table AccountStatsAggregate --fields-terminated-by '\t' --export-dir '/user/hduser/heatinghours'

要保证路径里的文本格式和数据库设定的一致才能导入

export 到MySQL中,增量覆盖:

http://hadooped.blogspot.sg/2013/06/apache-sqoop-part-3-data-transfer.html

最新文章

  1. Android 学习资源收集
  2. 蓝牙BLE实用教程
  3. 解剖SQLSERVER 第十三篇 Integers在行压缩和页压缩里的存储格式揭秘(译)
  4. 3DES封装类
  5. 【J2EE】struts-2.3.16.3+apache-tomcat-8.0.9开发环境部署,“Hello World”的实现。
  6. poj 1273 Drainage Ditches 最大流入门题
  7. leetcode Database3
  8. 字节顺序重置及“#include <algorith.h>”相关的STL最重要的头文件提醒
  9. BZOJ 1022 SHOI2008 小约翰的游戏John 博弈论
  10. Android SeekBar 和 draw9patch 的使用
  11. C#解leetcode 238. Product of Array Except Self
  12. LPC1768的usb使用--硬件篇
  13. 机器学习:python中如何使用朴素贝叶斯算法
  14. 序列化与反序列化中serialVersionUID的作用(通俗易懂)
  15. JdbcTemplate中queryForObject方法返回空结果或不正确结果数量的解决方法
  16. copy other
  17. Process多进程的创建方法
  18. Global.asax.cs中相关方法
  19. C#:ORM--实体框架EF(entity framework)(2)
  20. 高性能JavaScript(高性能Ajax)

热门文章

  1. wait、waitpid 僵尸进程 孤儿进程
  2. USACO Section 3.1: Score Inflation
  3. JavaScript DOM实战:创建和克隆元素
  4. [Topcoder]AvoidRoads(dp,hash)
  5. 一个简单的ORM制作(CURD操作类)
  6. BZOJ3028: 食物
  7. php实现一致性哈希算法
  8. Maven之 学习资料
  9. MySQL的性能调优工具:比mysqlreport更方便的tuning-primer.sh
  10. python练习程序(c100经典例17)