Execute query and copy results to a new table

The following method will execute the query and copy the results to the destination table. Set the allow_large_results flag to true if the data returned from the query will be more than 128 MB in compressed format. Specify the mode to insert the data into the destination table in the write_disposition flag. The SQL used in this method is Standard SQL dialect. Set the UseQueryCache flag to true to use the results of the query from cache to save money on billing:

Call this method in main method and pass the required parameters such as the new destination table name. Customize the method to be generic as per your use cases:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.216.75