将数据存储备份中的数据加载到大查询中会引发无效的字段名称错误 [英] loading data from a datastore backup into big query throws invalid field name error

查看:44
本文介绍了将数据存储备份中的数据加载到大查询中会引发无效的字段名称错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将数据存储备份中的数据加载到大查询中时,出现以下错误

When loading data from a datastore backup into big query I get the following error

错误:无效的字段名称"hq-country".字段必须仅包含字母,数字和下划线,以字母或下划线开头,并且最多为128个字符.

Errors: Invalid field name "hq-country". Fields must contain only letters, numbers, and underscores, start with a letter or underscore, and be at most 128 characters long.

此问题的解决方法是什么?

What the work around for this ?

推荐答案

请注意该错误消息,因为该错误消息已列出了允许的字母.

Pay attention to the error message, as it already lists the allowed letters.

并且连字符(-)标点符号不在列出的有效字母中.连字符是一个大问题,因为如果您最终将列名映射到变量,则大多数语言都不喜欢在变量名中包含连字符,因为它主要代表 minus/deduction .

And the hyphen (‐) punctuation mark is not among the listed valid letters. Hyphens are a big problem because if you end up mapping a column name to a variable, most languages do not like to have hyphens inside variable names, as it mostly stands for minus/deduction.

重命名该字段,使其仅包含字母,数字和下划线,以字母或下划线开头,并且最长为128个字符.

Rename the field, to contain only letters, numbers, and underscores, start with a letter or underscore, and be at most 128 characters long.

您可以使用例如: hq_country ,或者如果您有多个 hq 字段,则可以创建具有 hq 作为一个具有多个属性的 RECORD ,则它将为hq.country

You can use for example: hq_country, or if you have multiple hq fields, than you can create a schema that has hq as a RECORD with multiple properties and then it would be hq.country

这篇关于将数据存储备份中的数据加载到大查询中会引发无效的字段名称错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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