0
votes

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.

2

2 Answers

0
votes

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

0
votes

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.