/// <inheritdoc /> public override BigqueryJob UploadJson(TableReference tableReference, TableSchema schema, Stream input, UploadJsonOptions options = null) { GaxPreconditions.CheckNotNull(tableReference, nameof(tableReference)); GaxPreconditions.CheckNotNull(input, nameof(input)); schema = schema ?? GetSchema(tableReference); var configuration = new JobConfigurationLoad { DestinationTable = tableReference, SourceFormat = "NEWLINE_DELIMITED_JSON", Schema = schema }; options?.ModifyConfiguration(configuration); return(UploadData(configuration, input, "text/json")); }
/// <inheritdoc /> public override async Task <BigqueryJob> UploadJsonAsync(TableReference tableReference, TableSchema schema, Stream input, UploadJsonOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) { GaxPreconditions.CheckNotNull(tableReference, nameof(tableReference)); GaxPreconditions.CheckNotNull(input, nameof(input)); schema = schema ?? await GetSchemaAsync(tableReference, cancellationToken).ConfigureAwait(false); var configuration = new JobConfigurationLoad { DestinationTable = tableReference, SourceFormat = "NEWLINE_DELIMITED_JSON", Schema = schema }; options?.ModifyConfiguration(configuration); return(await UploadDataAsync(configuration, input, "text/json", cancellationToken).ConfigureAwait(false)); }