#!/bin/bash echo "开始sqoop全量导入脚本...." today=date -d "yesterday" +"%Y-%m-%d"
sqoop import
--connect jdbc:mysql://localhost:3306/dbname
--username root
--password root
--table table_name
--where "date_column='${today}'"
--target-dir hdfs://hdfs_path
--delete-target-dir
--num-mappers
写一个sqoop全量导入的shell脚本,要全定时导入昨日数据
最新推荐文章于 2024-07-21 16:17:25 发布