Exemplo n.º 1
0
 /// <summary>
 /// Asynchronously uploads a stream of Parquet data to a table.
 /// This method just creates a <see cref="TableReference"/> and delegates to <see cref="BigQueryClient.UploadParquetAsync(TableReference, Stream, UploadParquetOptions, CancellationToken)"/>.
 /// </summary>
 /// <param name="tableId">The table ID. Must not be null.</param>
 /// <param name="input">The stream of input data. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
 /// <returns>A task representing the asynchronous operation. When complete, the result is
 /// a data upload job.</returns>
 public Task <BigQueryJob> UploadParquetAsync(string tableId, Stream input, UploadParquetOptions options = null, CancellationToken cancellationToken = default) =>
 _client.UploadParquetAsync(GetTableReference(tableId), input, options, cancellationToken);
Exemplo n.º 2
0
 /// <summary>
 /// Uploads a stream of Parquet data to a table.
 /// This method just creates a <see cref="TableReference"/> and delegates to <see cref="BigQueryClient.UploadParquet(TableReference, Stream, UploadParquetOptions)"/>.
 /// </summary>
 /// <param name="tableId">The table ID. Must not be null.</param>
 /// <param name="input">The stream of input data. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <returns>A data upload job.</returns>
 public BigQueryJob UploadParquet(string tableId, Stream input, UploadParquetOptions options = null) =>
 _client.UploadParquet(GetTableReference(tableId), input, options);
        /// <inheritdoc />
        public override BigQueryJob UploadParquet(TableReference tableReference, Stream input, UploadParquetOptions options = null)
        {
            GaxPreconditions.CheckNotNull(tableReference, nameof(tableReference));
            GaxPreconditions.CheckNotNull(input, nameof(input));

            var configuration = new JobConfigurationLoad
            {
                DestinationTable = tableReference,
                SourceFormat = "PARQUET"
            };
            options?.ModifyConfiguration(configuration);

            return UploadData(configuration, input, "application/vnd.apache.parquet+binary", options);
        }
        /// <inheritdoc />
        public override async Task<BigQueryJob> UploadParquetAsync(TableReference tableReference, Stream input, UploadParquetOptions options = null, CancellationToken cancellationToken = default)
        {
            GaxPreconditions.CheckNotNull(tableReference, nameof(tableReference));
            GaxPreconditions.CheckNotNull(input, nameof(input));

            var configuration = new JobConfigurationLoad
            {
                DestinationTable = tableReference,
                SourceFormat = "PARQUET"
            };
            options?.ModifyConfiguration(configuration);

            return await UploadDataAsync(configuration, input, "application/vnd.apache.parquet+binary", options, cancellationToken).ConfigureAwait(false);
        }
Exemplo n.º 5
0
 /// <summary>
 /// Uploads a stream of Parquet data to this table.
 /// This method just creates a <see cref="TableReference"/> and delegates to <see cref="BigQueryClient.UploadParquet(TableReference, Stream, UploadParquetOptions)"/>.
 /// </summary>
 /// <param name="input">The stream of input data. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <returns>A data upload job.</returns>
 public BigQueryJob UploadParquet(Stream input, UploadParquetOptions options = null) => _client.UploadParquet(Reference, input, options);
Exemplo n.º 6
0
 /// <summary>
 /// Asynchronously uploads a stream of Parquet data to this table.
 /// This method just creates a <see cref="TableReference"/> and delegates to <see cref="BigQueryClient.UploadParquetAsync(TableReference, Stream, UploadParquetOptions, CancellationToken)"/>.
 /// </summary>
 /// <param name="input">The stream of input data. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
 /// <returns>A task representing the asynchronous operation. When complete, the result is
 /// a data upload job.</returns>
 public Task <BigQueryJob> UploadParquetAsync(Stream input, UploadParquetOptions options = null, CancellationToken cancellationToken = default) =>
 _client.UploadParquetAsync(Reference, input, options, cancellationToken);