BigQuery - 每天滚动数据,如何减少流程中对 Data Studio Dashboard 的中断
BigQuery - Rolling the data every day, how to reduce the interruptions to the Data Studio Dashboard in the process
我有一个 BigQuery table。整个table每天都会刷新。所以我现在正在做的是
- 将最新数据加载到云存储中。
- 删除当前table
- 创建同名的新table
- 将云存储中的数据加载到新的table(同名)
问题是我的数据工作室仪表板使用与数据源相同的 table。在上述过程中,dashboard会出现中断,比如刚刚删除但没有完成新数据加载回来时显示空数据或更少。
我应该采取哪些简单的良好做法来避免 Data Studio 仪表板中断?
谢谢!
尝试以下
- 不要删除首字母 table
- 将云存储中的数据加载到新的 table(名称不同)
- 用overwrite/truncate
复制新的table到初始的table
这可能是一个微不足道的答案,但为什么不能向您的 table 添加 DateTimeAdded 列之类的内容。然后,不要删除当前的 table 并重新创建它,只需从 Cloud Storage 添加新数据,使用更新的 DateTimeAdded 值,完成后,删除所有不是当前 DateTimeAdded?
这样一来,您的仪表板就不会中断,因为数据将始终存在,尽管可能会出现一段时间的不稳定,因为新旧数据都用于您的指标。
是否有不使用仪表板的时间段?到时候刷新你的数据。
为什么要删除 table?
你完全可以 运行 负载 运行cate。
$ bq help load
--[no]replace: If true erase existing contents before loading new data.
(default: 'false')
如果您使用 API:
writeDisposition
[Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. [...]
我有一个 BigQuery table。整个table每天都会刷新。所以我现在正在做的是
- 将最新数据加载到云存储中。
- 删除当前table
- 创建同名的新table
- 将云存储中的数据加载到新的table(同名)
问题是我的数据工作室仪表板使用与数据源相同的 table。在上述过程中,dashboard会出现中断,比如刚刚删除但没有完成新数据加载回来时显示空数据或更少。
我应该采取哪些简单的良好做法来避免 Data Studio 仪表板中断?
谢谢!
尝试以下
- 不要删除首字母 table
- 将云存储中的数据加载到新的 table(名称不同)
- 用overwrite/truncate 复制新的table到初始的table
这可能是一个微不足道的答案,但为什么不能向您的 table 添加 DateTimeAdded 列之类的内容。然后,不要删除当前的 table 并重新创建它,只需从 Cloud Storage 添加新数据,使用更新的 DateTimeAdded 值,完成后,删除所有不是当前 DateTimeAdded?
这样一来,您的仪表板就不会中断,因为数据将始终存在,尽管可能会出现一段时间的不稳定,因为新旧数据都用于您的指标。
是否有不使用仪表板的时间段?到时候刷新你的数据。
为什么要删除 table?
你完全可以 运行 负载 运行cate。
$ bq help load
--[no]replace: If true erase existing contents before loading new data.
(default: 'false')
如果您使用 API:
writeDisposition
[Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. [...]