Google Big Query won't let me schedule query [closed] - google-bigquery

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 months ago.
Improve this question
I am an owner of the Google Big Query project and I am trying to setup a schedule query. But it throws me an error as shown on image:
I have investigated across StackOverflow but nothing works for me. I have tried:
Run query first before creating schedule query
Choose data location (in my case EU)
Verify access permission - I am owner of the project.
Can anyone help me please?

You will get this Schedule Query Error message because of the following reasons:
If you selected a wrong Dataset location in the New scheduled query will throw an error message “Scheduled Query Error”.
The least possible limit for the scheduled query under custom is 15 minutes. So, if you try scheduling a query by setting a custom time less than every 15 minutes will throw an error message 'Scheduled Query Error'. Refer to this doc for more information.
If your Cron-like time specification syntax is not valid in the Custom schedule field will throw an error message 'Scheduled Query Error'. Refer to this doc for valid formats.

Related

Statement object has been closed in querying from Amazon Redshift

On attempting to execute a simple query on a table (dimensions: 1,131,714,069 rows by 22 columns), I am running into the error:
[Amazon][JDBC](12080) Statement object has been closed.
Research online has unfortunately not provided much insight into this error.
I will not encounter this error each time I execute a query; so far it seems that its occurrence is unpredictable. The query that most recently caused this error looked was a very simple SELECT ... FROM ... WHERE with no subqueries and only one condition in the WHERE clause.
The query was busy for about 22 minutes before failing, however after waiting a few minutes, then running it again, it completed successfully in a matter of seconds. That being said, this kind of unpredictability and unreliability is exactly what I'm trying to prevent against.
If it helps, the IDE that I am using to connect to my Redshift database is TeamSQL.
What could be causing this error, and what steps could I take to prevent it?

Big Query 'internal error occurred...' on valid query to create view

I have a valid SQL query in Big Query which executes fine when run. However, Big Query tells me 'an internal error occurred and the request could not be completed' under the validator and as such I cannot save the query as a view.
Why is this? It's very frustrating and it hasn't happened with other queries I've written. I've double checked all the schema references are fully defined etc. It's been happening for the past 3 days now.
Many thanks for any help.

Google BigQuery Scheduling Query error on Manual Run

I can successfully run Bigquery Scheduled Queries with #Run_time, #run_date parameters.
You can review Google's inadequate documentation on https://cloud.google.com/bigquery/docs/scheduling-queries
But when I try, manual run fails; "Error in starting transfer runs: Request contains an invalid argument. Dismiss" not any detail :(
Example code: (please be attentions i use #run_date)
Destination table: test_{run_time|"%Y%m%d"}
The parameter named table serves to create a different table for each day.
For example
test_20181112
test_20181113 etc.
SELECT
#run_date AS mydate,
title,
author,
text
FROM `bigquery-public-data.hacker_news.stories`
LIMIT
10
I think the problem is caused by the #run_date parameter in the query during manual operation.
My project is a little more complicated, I've added this code so everyone can try it easily.
 
As I mentioned above, this scheduled task works correctly in the initial setup. But when I try to run manual, it gives an error.
Can you show me the way?
Thanks for your helps.
I think that there is a bug in manunal run.
You should choose carefully the start date and the end date ( the same as a previous run ) in order to not get this error
I just wanted to add something here, since this is a "gotcha" in the BigQuery UI: using today's date as the end date in a scheduled query run will cause an issue, but setting it to one day ahead (i.e. tomorrow) should allow you to create a request with #run_date set to today.

display information from sql server view [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
New to views with sql server, not sure how to view the information it has gathered with vbscript. I know it is not as simple as:
select * from EXAMPLE_VIEW
I want to get the information from my example view loop through it and display it, however when i try to do that sql query i get invalid object name.
My question is how do you sql query a view
You should probably be doing this:
SELECT column1, column2 FROM dbo.EXAMPLE_VIEW;
This is because if your user has a different default schema than dbo, it might be checking for some other view with the same name under a different schema. (You also know not to use SELECT *, right?)
So you should also make sure your user account has select permissions on the view and/or the table(s) behind it.
Bad habits to kick : using SELECT * / omitting the column list
Bad habits to kick : avoiding the schema prefix
select * from EXAMPLE_VIEW
...is the correct way to query a SQL Server view.
If it's not working for you, you have a different kind of problem: maybe no permissions, maybe no server connection, maybe a view called EXAMPLE_VIEW doesn't exist, maybe something else.
Whatever it is - we need the exact error message and as much example code as possible to help you.
But the SQL itself is correct.
Is your current database set correctly after establishing connection? It can be set using connnection string (http://www.connectionstrings.com/) or by specyfying it witin query itself:
SELECT * FROM MYDB.dbo.EXAMPLE_VIEW;

Strange result when running query over a table created from a result of another query

Since yesterday, 1-09-2012, I can't run any queries over a table that has been created from the result of another query.
example query:
SELECT region FROM [project.table] LIMIT 1000
result:
Query Failed
Error: Field 'region' is incompatible with the table schema.
49077933619
These kinds of queries passed successfully every day, last couple of weeks. Has anybody else encountered a similar problem?
We added some additional schema checking on friday. I was unable to reproduce the problem but I'll look into your examples (I was able to find your failed job in the logs). I'm in the process of turning off the additional schema checking in the meantime. Please try again and let us know if the problem continues.