Google BiqQuery Unstable, Query Execution Failure on Almost all Table Queries : "Error: Error preparing subsidiary query: null"
<p>Google BiqQuery Query Execution is failing on Almost all Table Queries. The Table Queries were working initially when we initially deployed our application. When the dataset started growing we started seeing below Errors. We have huge number of tables in each dataset . I am not sure whether it is linked with this error. However when we run this query on smaller dataset in a different biqquery account it is succeeding.  </p>

<p>"Error: Error preparing subsidiary query: null"</p>

<p>Below Are some sample Queries which we are trying to Execute both from our application and Google Biq Query Web console  and all our attempts were unsuccessful with above error. </p>

<pre><code>SELECT * FROM  (TABLE_DATE_RANGE([sampledataset.location], 
            TIMESTAMP('2016-07-10'), 
            TIMESTAMP('2016-07-11')))
</code></pre>

<p>Reference Biq Query  JOB ID :bquijob_286a4921_155dd7d8868</p>

<pre><code>SELECT count(*) FROM (TABLE_QUERY(sampledataset,'table_id CONTAINS "location201606"'))
</code></pre>

<p>Reference Biq Query JOB ID : bquijob_531d0e3_155dda8f7dc</p>

<p>Even When I am executing a Table Summary Query I am getting Error's . I am not sure whether this error is related.  </p>

<pre><code>SELECT * FROM sampledataset.__TABLES_SUMMARY__ 
WHERE MSEC_TO_TIMESTAMP(creation_time)  &lt; 
   DATE_ADD(CURRENT_TIMESTAMP(), -7, 'DAY')
</code></pre>

<p>Resources exceeded during query execution: Too many tables in dataset metatable :sampledataset.<strong>TABLES_SUMMARY</strong>, exceeded 500000 limit.</p>

<p>Because of these issues we think Gogole Biq Query is pretty Unstable and there are not much resources available to resolve our issues. 
Before even proceeding with smaller table partitions we did enquire in stackoverflow </p>

<p><a href="https://stackoverflow.com/questions/14220428/is-there-a-limit-to-the-number-of-tables-allowed-in-bigquery">Is there a limit to the number of tables allowed in bigquery</a> ?</p>

<p>and we received a positive answer confirming that there are no limits from  @jordan-tigani <a href="https://stackoverflow.com/users/1366527/jordan-tigani">https://stackoverflow.com/users/1366527/jordan-tigani</a></p>

<p>Because of this issue we are even forced to migrate from Google Biq Query to AWS Redshift.</p>

<p><strong>Update 1</strong>: As per the update from @Felipe Hoffa , it seems like  TABLE_DATE_RANGE function provided from Big Query has issues when large number of tables are present in the given data set. At present there is no fix for this issue from Google Big Query Platform and Projects which were relying on TABLE_DATE_RANGE Functionality needs to migrate to  "Partitioned Tables" (New Feature rolled out by Google) inorder for the application to be functional. I thought to highlight since it might help people while designing their schema for Biq Query since the limitations of TABLE_DATE_RANGE and similar functions are not documented elsewhere</p>