コード例 #1
0
        /// <summary>Snippet for GetWriteStreamAsync</summary>
        public async Task GetWriteStreamResourceNamesAsync()
        {
            // Snippet: GetWriteStreamAsync(WriteStreamName, CallSettings)
            // Additional: GetWriteStreamAsync(WriteStreamName, CancellationToken)
            // Create client
            BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();

            // Initialize request argument(s)
            WriteStreamName name = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]");
            // Make the request
            WriteStream response = await bigQueryWriteClient.GetWriteStreamAsync(name);

            // End snippet
        }
コード例 #2
0
        /// <summary>Snippet for GetWriteStreamAsync</summary>
        public async Task GetWriteStreamAsync()
        {
            // Snippet: GetWriteStreamAsync(string, CallSettings)
            // Additional: GetWriteStreamAsync(string, CancellationToken)
            // Create client
            BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();

            // Initialize request argument(s)
            string name = "projects/[PROJECT]/datasets/[DATASET]/tables/[TABLE]/streams/[STREAM]";
            // Make the request
            WriteStream response = await bigQueryWriteClient.GetWriteStreamAsync(name);

            // End snippet
        }
        /// <summary>Snippet for CreateWriteStreamAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task CreateWriteStreamRequestObjectAsync()
        {
            // Create client
            BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();

            // Initialize request argument(s)
            CreateWriteStreamRequest request = new CreateWriteStreamRequest
            {
                ParentAsTableName = TableName.FromProjectDatasetTable("[PROJECT]", "[DATASET]", "[TABLE]"),
                WriteStream       = new WriteStream(),
            };
            // Make the request
            WriteStream response = await bigQueryWriteClient.CreateWriteStreamAsync(request);
        }
        /// <summary>Snippet for BatchCommitWriteStreamsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task BatchCommitWriteStreamsRequestObjectAsync()
        {
            // Create client
            BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();

            // Initialize request argument(s)
            BatchCommitWriteStreamsRequest request = new BatchCommitWriteStreamsRequest
            {
                Parent       = "",
                WriteStreams = { "", },
            };
            // Make the request
            BatchCommitWriteStreamsResponse response = await bigQueryWriteClient.BatchCommitWriteStreamsAsync(request);
        }
コード例 #5
0
        /// <summary>Snippet for BatchCommitWriteStreamsAsync</summary>
        public async Task BatchCommitWriteStreamsAsync()
        {
            // Snippet: BatchCommitWriteStreamsAsync(string, CallSettings)
            // Additional: BatchCommitWriteStreamsAsync(string, CancellationToken)
            // Create client
            BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();

            // Initialize request argument(s)
            string parent = "";
            // Make the request
            BatchCommitWriteStreamsResponse response = await bigQueryWriteClient.BatchCommitWriteStreamsAsync(parent);

            // End snippet
        }
        /// <summary>Snippet for FlushRowsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task FlushRowsRequestObjectAsync()
        {
            // Create client
            BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();

            // Initialize request argument(s)
            FlushRowsRequest request = new FlushRowsRequest
            {
                WriteStreamAsWriteStreamName = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]"),
                Offset = 0L,
            };
            // Make the request
            FlushRowsResponse response = await bigQueryWriteClient.FlushRowsAsync(request);
        }
コード例 #7
0
        /// <summary>Snippet for CreateWriteStreamAsync</summary>
        public async Task CreateWriteStreamAsync()
        {
            // Snippet: CreateWriteStreamAsync(string, WriteStream, CallSettings)
            // Additional: CreateWriteStreamAsync(string, WriteStream, CancellationToken)
            // Create client
            BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();

            // Initialize request argument(s)
            string      parent      = "projects/[PROJECT]/datasets/[DATASET]/tables/[TABLE]";
            WriteStream writeStream = new WriteStream();
            // Make the request
            WriteStream response = await bigQueryWriteClient.CreateWriteStreamAsync(parent, writeStream);

            // End snippet
        }
コード例 #8
0
        /// <summary>Snippet for CreateWriteStreamAsync</summary>
        public async Task CreateWriteStreamResourceNamesAsync()
        {
            // Snippet: CreateWriteStreamAsync(TableName, WriteStream, CallSettings)
            // Additional: CreateWriteStreamAsync(TableName, WriteStream, CancellationToken)
            // Create client
            BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();

            // Initialize request argument(s)
            TableName   parent      = TableName.FromProjectDatasetTable("[PROJECT]", "[DATASET]", "[TABLE]");
            WriteStream writeStream = new WriteStream();
            // Make the request
            WriteStream response = await bigQueryWriteClient.CreateWriteStreamAsync(parent, writeStream);

            // End snippet
        }
コード例 #9
0
        /// <summary>Snippet for FinalizeWriteStreamAsync</summary>
        public async Task FinalizeWriteStreamRequestObjectAsync()
        {
            // Snippet: FinalizeWriteStreamAsync(FinalizeWriteStreamRequest, CallSettings)
            // Additional: FinalizeWriteStreamAsync(FinalizeWriteStreamRequest, CancellationToken)
            // Create client
            BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();

            // Initialize request argument(s)
            FinalizeWriteStreamRequest request = new FinalizeWriteStreamRequest
            {
                WriteStreamName = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]"),
            };
            // Make the request
            FinalizeWriteStreamResponse response = await bigQueryWriteClient.FinalizeWriteStreamAsync(request);

            // End snippet
        }
コード例 #10
0
        /// <summary>Snippet for CreateWriteStreamAsync</summary>
        public async Task CreateWriteStreamRequestObjectAsync()
        {
            // Snippet: CreateWriteStreamAsync(CreateWriteStreamRequest, CallSettings)
            // Additional: CreateWriteStreamAsync(CreateWriteStreamRequest, CancellationToken)
            // Create client
            BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();

            // Initialize request argument(s)
            CreateWriteStreamRequest request = new CreateWriteStreamRequest
            {
                ParentAsTableName = TableName.FromProjectDatasetTable("[PROJECT]", "[DATASET]", "[TABLE]"),
                WriteStream       = new WriteStream(),
            };
            // Make the request
            WriteStream response = await bigQueryWriteClient.CreateWriteStreamAsync(request);

            // End snippet
        }
コード例 #11
0
        /// <summary>Snippet for BatchCommitWriteStreamsAsync</summary>
        public async Task BatchCommitWriteStreamsRequestObjectAsync()
        {
            // Snippet: BatchCommitWriteStreamsAsync(BatchCommitWriteStreamsRequest, CallSettings)
            // Additional: BatchCommitWriteStreamsAsync(BatchCommitWriteStreamsRequest, CancellationToken)
            // Create client
            BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();

            // Initialize request argument(s)
            BatchCommitWriteStreamsRequest request = new BatchCommitWriteStreamsRequest
            {
                Parent       = "",
                WriteStreams = { "", },
            };
            // Make the request
            BatchCommitWriteStreamsResponse response = await bigQueryWriteClient.BatchCommitWriteStreamsAsync(request);

            // End snippet
        }