上传数据框至 BigQuery 导致空值。

huangapple go评论45阅读模式
英文:

Uploading a dataframe to BigQuery results in null values

问题

我有以下数据框架,我正在将其上传到BigQuery。上传后,在Bigquery中,除了sessions和date列以外的所有列最终都变成了null值,尽管在数据框架中没有null值。

为什么会这样?我已更改为正确的数据类型并指定了Bigquery的架构,但没有成功。

上传数据框至 BigQuery 导致空值。

英文:

I have the following dataframe that I'm uploading to BigQuery. When uploaded, all columns except for sessions and date end up with null values in Bigquery despite having 0 null values in the dataframe.

Why would this be? I've changed to the correct datatypes and specified the schema to Bigquery to no avail.

上传数据框至 BigQuery 导致空值。

答案1

得分: 4

问题在于如果API没有提供适当的反馈,列名中的任何空格都会导致所有数值上传到数据库时都变为null。

编辑:如果在列名中使用了一个“:”,在从Google Analytics获取自定义事件时也会发生这种情况。

英文:

The problem was that WITHOUT the api giving appropriate feedback any spaces in the column names result in the values all being uploaded as null to the database.

EDIT: this also occurs if using a ":" in the column name that can be found when pulling custom events from google analytics

huangapple
  • 本文由 发表于 2023年6月13日 00:46:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/76458730.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定