Score:1

GCP - Restore Stored Procedures in a Dataset

pt flag
Sin

Is it possible to recover the deleted procedure/s from a dataset that were accidentally deleted. I know I can recover tables but I can't seem to find anything related to stored procedures.

Score:0
it flag
Jay

Datasets cannot be restored once deleted. So any information you have there will be lost once you delete it.

However, there might be a way of recovering a procedure by searching in Logs Explorer. To do so, run the following query:

resource.type="bigquery_resource"
"CREATE OR REPLACE PROCEDURE $NAME_OF_YOUR_DATASET" 
severity="INFO"

As per the timestamp, if you know when a procedure was last launched or created you could search around that timestamps. (This is not strictly needed but it can save you a lot of query processing time).

After that, hopefully you will be able to find logs like this one. If you expand the log payload, in serviceData field you will find the query in the query subfield.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.