本文介绍了TableRow对象未返回dataFlow作业中的记录类型列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用DataFlow作业执行BigQuery查询时,作为结果,我得到的TableRow对象没有返回那些属于记录类型列的列(已展平)

When I am executing BigQuery query using DataFlow job then the TableRow Object which I am getting, as a result, is not returning those columns which are a record type column (Flatten out)

Java代码:

p.apply(BigQueryIO.Read.fromQuery(getQuery()))

查询:

选择BASM.,BAS. FROM (从(FLATTEN([data.base_audience_segment_map20160817],user_ids.rmId)中选择user_ids.rmId AID,id,user_ids.regis,segment_id)) 加入
(从[data.base_audience_segments]中选择类别,子类别,类型,名称,segment_id,last_compute_day,描述) 在 BASM.segment_id = BAS. segment_id按BASM.AID,BASM.id限制100的顺序

SELECT BASM.,BAS. FROM (Select user_ids.rmId AID, id, user_ids.regis, segment_id from(FLATTEN( [data.base_audience_segment_map20160817], user_ids.rmId)) ) BASM join
(Select category, sub_category, type, name, segment_id, last_compute_day, description from [data.base_audience_segments]) BAS on BASM.segment_id=BAS. segment_id order by BASM.AID,BASM.id limit 100

如果在上面的查询中看到user_ids.rmId是重复记录类型列.

If you see in the above query user_ids.rmId is a Repeatable record type column.

预先感谢

推荐答案

我认为默认行为是,如果您的查询返回的列的空值大于TableRow对象下该列的空值,则该

I think the default behaviour is if your query is returning null values for a column than that column will not be visible under TableRow object

这篇关于TableRow对象未返回dataFlow作业中的记录类型列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 07:23