Scheduled Query Error although permissions are set up to bigquery.admin - google-bigquery

I am new to BigQuery and trying to schedule a query. However, I am getting "Scheduled Query Error", although settings are valid. The query also runs manually without problems.
The IAM permissions are set up to bigquery.admin. Any ideas what could be the reason for this error message?
I also tried running the query before setting up the schedule, as recommened on one forum. But still got the same error message.

Related

Can't save query in Schedule Query. "Scheduled Query Error"

I have created a View in BigQuery and want to set it to update. When trying to save a query in a Schedule Query, an error occurs: Scheduled Query Error
This error is about permissions. You need these permissions to create a query scheduler with BigQuery:
bigquery.transfers.update or (bigquery.jobs.create and
bigquery.transfers.get )
bigquery.jobs.create
bigquery.datasets.update
Another option is adding this role roles/bigquery.admin , including all the permissions you need to schedule or modify a query.
You can read more information about permissions.
When I run a query, unless I manually specify the data location to run the query, BQ defaults to the US multi-region and uses resources in the US.
But then, The BQ Data Transfer Service throws an error since I are now trying to export the data from a query that was executed in US to a table that sits in EU.
So, to fix that, before you schedule the query, I have to go under the query detailed settings, and change the Data Location to EU
Then save these settings, and finish scheduling the query.
Before that, make sure you have enable the Billing
enter image description here
And then maybe because of BigQuery Data Transfer Service (trusted through the pop-up windows……)
bother me a lot……
If the pop-up window does not appear, you should check the address bar to make sure the window is not blocked, if it's not the cause,you can try to change the location of data(related to where you store your data),and submit.
enter image description here
I had the same problem and it turned out to be the pop-up blocker on my Firefox browser. The pop-up blocker on Chrome also stopped the scheduled query working but Chrome was a bit more visible that pop-ups were blocked.
On Firefox, click on the circled icon in the address bar to see blocked pop-ups
Change the pop-up permission to 'Allow'.
I had exactly this generic error message 'Scheduled query error', and it was driving me mad. I checked all permissions and locations etc.
I turns out that the 'Time Travel Window' was set to less than 48 hours for the dataset I was trying to write into. Which apparently BigQuery doesn't like.
To fix this I executed this query
ALTER SCHEMA `PROJECTNAME.DATASETNAME`
SET OPTIONS(
max_time_travel_hours = 72);

Bigquery schedule query creating resulting in error

I'm trying to create a scheduled job based out of saved query in big query. I'm following steps as per documentation here
After entering all the filelds, I'm getting response "Error creating scheduled query: Aq" with no additional details.
In on BigQuery documentation also, I didn't find anything.
I could run the query which I'm trying to create a schedule for, is running fine and giving appropriate results.
It turned out that, when schedule query is created for first time, the console is taking permission by take user to new tab in browser. Browser settings was suppressing it.
After acknowledging the required permissions, I could create scheduled query successfully.

Error when creating scheduled query on Bigquery "Error creating scheduled query: er"

I just started a new project on Google Cloud, set up some bigquery datasets and tables. I now want to set up some scheduled queries. I have already enabled BigQuery Data Transfer API. My query is valid (it's just SELECT * FROM table). I can't find anything about this error online.
See screenshot
UPDATE: I've experimented a bit and it seems to be an organization wide issue. All projects, new and old within my organization get this same error when trying to schedule a query. I tried for a project in a different organization and did not have the issue. What could be causing this error for ALL projects in an organization?
UPDATE 2:
By querying a table that is not empty the error change to "Error creating scheduled query: Yn" instead of "Error creating scheduled query: er" (when the scheduled query would have queried an empty table).
I faced the same issue than you, and basically I just needed to run the query first before creating the the scheduled query... And that did the trick.
from the BQ FAQs :
"Scheduled queries use features of BigQuery Data Transfer Service. Verify that you have completed all actions required in Enabling BigQuery Data Transfer Service."
basically, what this means is that you need to enable the data transfer api in your project, AND give the user who creates the scheduled query a BQ admin role in order to have the right permissions to access that transfer service.
If done right, you should get a popup when creating the scheduled query to confirm that the data transfer service has access to your uses account (if you block popups you might not see this message and get stuck)
If this error only occurs in your organisation, I believe it might be caused by a organisation policy on Google Cloud. I would encourage you to double check if there is any org policy causing this error. If that's not the case, open a support ticket with GCP.
What worked for me was signing in through Incognito Mode with just my account and attempting to save the scheduled query. I have multiple Google Accounts signed it at one time and for whatever reason, BigQuery throws this generic error after authorization is successful and BigQuery is granted the access it requested.
You need to make sure that you are creating the query under the project targeted not in any other projects because it won't appear
Also you need to enable the API as one of the above answers
This eventually worked for me when i ran this in an cognito window

Google Bigquery: In internal error occurred and the request could not be completed

I am having difficulty getting a BigQuery job to execute from the Web Interface. If I try to run the job I get the error message
Error: An internal error occurred and the request could not be completed.
Job ID: rhi-localytics-db:job_V-6F5YOk0k9ENTgDfGX84Ghnxz8
Does anyone have any idea what problem this error message means? The query I'm using is not terribly complicated.
Thanks,
Brad
I checked the internal error details and your query appears to have hit a transient internal error. The error should have nothing to do with your specific query. We'll investigate internally to reduce the occurrence of errors like this.
Does your query reliably fail with this error if you rerun it, or did you only receive this error on the one query job?
Thank you for the report. We are now tracking the issue internally.

Cron is not Working in Alfresco

I have written a cron to run every 30 minutes in scheduled-action-services-context.xml file
However I see that it is not working, when I check the log I can find only this error.
For my cron, I have also used lucene search. So I beleive this error is regarding that, so kindly help me in fixing it. Here is the error:
ERROR [quartz.core.JobRunShell] [DefaultScheduler_Worker-8] Job jobGroup.jobD threw an unhandled Exception:
org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 03020086
The error log you show is most likely the reason behind your scheduled action not properly working. In facts, it seems that the action is properly scheduled, but it then fails to complete as you provided an invalid Lucene query. Without the query itself or any other detail such as the relevant Spring config or action implementation details, I can only tell you to:
double check the lucene query
verify that that error log appears precisely when you would expect your action to be scheduled