5.sqoop --options-file
2017-04-29 16:56
113 查看
For example, the following Sqoop invocation for import can be specified alternatively as shown below:
$ sqoop import –connect jdbc:mysql://localhost/db –username foo –table TEST
$ sqoop –options-file /users/homer/work/import.txt –table TEST
where the options file /users/homer/work/import.txt contains the following:
举例 将sqoop语句写到脚本文件/opt/datas/sqoop-import-hdfs.txt里
然后执行bin/sqoop –options-file /opt/datas/sqoop-import-hdfs.txt
shellscript
$ sqoop import –connect jdbc:mysql://localhost/db –username foo –table TEST
$ sqoop –options-file /users/homer/work/import.txt –table TEST
where the options file /users/homer/work/import.txt contains the following:
import --connect jdbc:mysql://localhost/db --username
举例 将sqoop语句写到脚本文件/opt/datas/sqoop-import-hdfs.txt里
bin/sqoop import \ --connect jdbc:mysql://hadoop-CDH:3306/test \ --username root \ --password 123456 \ --table my_user \ --target-dir /user/sqoop/imp_my_user \ --num-mappers 1 改为: import --connect jdbc:mysql://hadoop-CDH:3306/test --username root --password 123456 --table my_user --target-dir /user/sqoop/imp_my_user --num-mappers 1
然后执行bin/sqoop –options-file /opt/datas/sqoop-import-hdfs.txt
shellscript
## step 1 load data ... ## step 2 bin/hive -f XXX.sql ## step 3 bin/sqoop --options-file /opt/datas/sqoop-import-hdfs.txt
相关文章推荐
- 如何在Hue里面使用Sqoop的options-file
- 使用sqoop --options-file 导入hive数据
- 使用sqoop --options-file 导入hive数据
- Sqoop中import & export & job & eval与options-file
- autorun.inf病毒与杀毒软件无法启动,及映像劫持(Image File Execution Options)解决办法
- oracle filesystemio_options设置
- Image File Execution Options(2)
- Android BitmapFactory.decodeFile(filePath, options) 返回 Null 6.0权限
- tar [options] [list of file]
- Options for mounting NFS filesystem
- FILESYSTEMIO_OPTIONS Initialization Parameter
- 注册表 Image File Execution Options 项的作用及使用办法
- sqoop 异常处理Not implemented by the DistributedFileSystem FileSystem implementation
- ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
- Image File Execution Options作用(加载调试器)
- iOS:NSData的方法writeToFile:options:error:
- 通过sqoop导入Oracle数据到Hive时异常.IOException: Cannot run program "hive": error=2, No such file or directory
- 安装g2o:moc: Cannot open options file specified with
- sqoop:Failed to download file from http://hdp01:8080/resources//oracle-jdbc-driver.jar due to HTTP error: HTTP Error 404: Not Found
- [zz]Image File Execution Options - How to Hijack a Program