/// <inheritdoc /> public override BigqueryJob CreateQueryJob(BigqueryCommand command, CreateQueryJobOptions options = null) { GaxPreconditions.CheckNotNull(command, nameof(command)); var query = new JobConfigurationQuery { UseLegacySql = false }; command.PopulateJobConfigurationQuery(query); options?.ModifyRequest(query); var job = Service.Jobs.Insert(new Job { Configuration = new JobConfiguration { Query = query }, }, ProjectId).Execute(); return(new BigqueryJob(this, job)); }
/// <inheritdoc /> public override async Task <BigqueryJob> CreateQueryJobAsync(BigqueryCommand command, CreateQueryJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) { GaxPreconditions.CheckNotNull(command, nameof(command)); var query = new JobConfigurationQuery { UseLegacySql = false }; command.PopulateJobConfigurationQuery(query); options?.ModifyRequest(query); var job = await Service.Jobs.Insert(new Job { Configuration = new JobConfiguration { Query = query }, }, ProjectId).ExecuteAsync(cancellationToken).ConfigureAwait(false); return(new BigqueryJob(this, job)); }