在导入中将某些列转换为空占位符的最佳方法是什么?
是否可以使用Map列功能?
Argument Description
--map-column-java <mapping> Override mapping from SQL to Java type for configured columns.
--map-column-hive <mapping> Override mapping from SQL to Hive type for configured columns.
我们希望模式是相同的,但有些列只是持有大量的膨胀,所以我们不希望他们拉到我们的集群。另一种思想是生成自定义select语句,其中臃肿的列为null,但这要比sqoop配置多得多,而且我们要Map1000个表。
--map-column-java bloatedcolname=null
思想?
2条答案
按热度按时间vql8enpb1#
你可以用
--query
为了这个例如:
n3h0vuf22#
简单使用
--columns <col1, col2, col3…>
在配置单元导入查询中。排除不想导入的列。
例子:
我在rdbms中有四列-id,name,occupance,address,我只想导入id和name。
使用
--columns id, name
在导入命令中。