sqoop简单的demo 先跑起来再说

时间:2022-01-06 20:36:01
注意$CONDITIONS不能省略

将相应的配置项填写正确,让sqoop先跑起来!

#!/bin/bash

ORACLE_EL64_HOST="xxx"
ORACLE_EL64_PORT="xxx"
ORACLE_EL64_DATABASE="xxx"

sqoop import \
--connect jdbc:oracle:thin:@${ORACLE_EL64_HOST}:${ORACLE_EL64_PORT}:${ORACLE_EL64_DATABASE} \
--username xxx \
--password xxx \
--num-mappers 1 \
--query 'select * from xxx.TMP_T2 where $CONDITIONS' \
--target-dir '/tmp/wanglei/sqoop1'