如何使用BigQuery Ruby库创建临时表?

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

How to create a temporary table using the BigQuery Ruby library?

问题

文档中找不到相应的选项。是否可以使用BigQuery Ruby库创建临时表?

英文:

I can't find a corresponding option in the documentation. Is it possible to create a temporary table with the BigQuery Ruby library?

答案1

得分: 1

我假设你的“temporary”意味着你只想创建一个仅供一次使用的表。

在这种情况下,据我所知,没有直接的选项,但你可以创建它然后像执行事务一样删除它。

require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

# 对数据集执行操作

dataset.delete
英文:

I assume your 'temporary' means you want to create a table only for one time usage.

In that case, as far as I know, there is no direct option but you can create and then delete it like a transactional behavior

require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

# Do something with the dataset

dataset.delete

huangapple
  • 本文由 发表于 2023年2月8日 21:11:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/75386301.html
匿名

发表评论

匿名网友

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

确定