是否可以在 google bigquery 中检索扩展或完整的查询历史记录? [英] Is it possible to retrieve an extended or full query history in google bigquery?

查看:10
本文介绍了是否可以在 google bigquery 中检索扩展或完整的查询历史记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近发现我不小心从 BigQuery 中删除了一个表,该表是通过查询其他表(我仍然拥有)构建的.

I recently discovered I accidentally deleted a table from BigQuery, which was constructed by querying other tables (which I still have).

由于 BigQuery 中的表删除是永久性的(对吗?),我想重建丢失的表,最好不要重写查询.

As table deletes in BigQuery are permanent (right?), I would like to reconstruct the lost table, preferably without rewriting the query.

WebUI 中的查询历史显然只显示有限数量的查询.不幸的是,我正在寻找的那个不在该列表中.

The Query History in the webUI obviously only displays a limited number of queries. The one I am looking for is unfortunately not in that list.

所以我的问题是,是否有可能以某种方式恢复从查询历史记录中消失的查询?

So my question is, is it possible to somehow recover the queries which have disappeared from the query history?

(我知道我要查找的查询的创建日期)

(I do know the creation date of the query I am looking for)

推荐答案

使用 JobID,您可以查询特定的作业 (此处记录).这将为您提供一个 Jobs 资源,其中将包含您的查询.

Using the JobID, you can query for a specific job (documented here). This will give you a Jobs resource, which will contain your query.

如果您不知道 JobID...这取决于我假设查询的运行方式.它可能由 App Engine(如果您通过代码运行)记录在开发者控制台的日志部分.您还可以查看工作列表(归功于OP 的那个)并在那里寻找你最近的工作.您还可以从列表中获取工作资源,因此它们将包含您需要的所有内容.

If you don't know the JobID... it depends on how the query was ran I assume. It's possibly logged by the App Engine (if you ran it via code) in the Logs section of the Developer console. You could also take a look at the Jobs List (credit to the OP for that one) and look in there for your recent jobs. From the list you get Jobs Resources as well, so they will contain all you need.

这篇关于是否可以在 google bigquery 中检索扩展或完整的查询历史记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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