如何命名包含点的表格列? [英] How to name a table column including dot?

查看:94
本文介绍了如何命名包含点的表格列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到如果我重命名一个列名包含,例如 device.name ,它会是自动转换为BigQuery中的 device_name

I noticed that if I rename a column name include ., e.g., device.name, it would be automatically converted to device_name in BigQuery.

select Device device.name from mydataset.DeviceTable limit 10

无论如何,我可以在列名中使用点吗?

Is there anyway I can use dot in column names?

推荐答案

点被保留用于指示嵌套。您可以通过json导入导入嵌套数据(例如 {device:{namefoo}} )。

Dots are reserved for indicating nesting. You can import nested data via json import (e.g. {device: {name "foo"}} ).

查询结果变平,查询结果中的点将​​变为下划线。

Query results get flattened, and so dots in query results will get turned to underscores.

这篇关于如何命名包含点的表格列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆