hive on spark一个写pg的任务,某些字段弃用,但是不方便改pg的表结构,所以,把hive这边的sql中的某些字段需要置空。
发现
- null as column 不行
- 直接 null 也会报错
直接注释、删除掉需要置空的字段即可
例如
before: select id,name,age from student ,id和name字段不需要再抽取了
after: selct age from student

hive on spark一个写pg的任务,某些字段弃用,但是不方便改pg的表结构,所以,把hive这边的sql中的某些字段需要置空。
发现
直接注释、删除掉需要置空的字段即可
例如
before: select id,name,age from student ,id和name字段不需要再抽取了
after: selct age from student