/// <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); var job = await CreateInsertQueryJobRequest(query, options).ExecuteAsync(cancellationToken).ConfigureAwait(false); return(new BigQueryJob(this, job)); }
/// <inheritdoc /> public override BigQueryJob CreateQueryJob(BigQueryCommand command, CreateQueryJobOptions options = null) { GaxPreconditions.CheckNotNull(command, nameof(command)); var query = new JobConfigurationQuery { UseLegacySql = false }; command.PopulateJobConfigurationQuery(query); var job = CreateInsertQueryJobRequest(query, options).Execute(); return(new BigQueryJob(this, job)); }
/// <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)); }