Class FakeBigQueryServices
java.lang.Object
org.apache.beam.sdk.io.gcp.testing.FakeBigQueryServices
- All Implemented Interfaces:
Serializable
,BigQueryServices
A fake implementation of BigQuery's query service..
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
An implementation ofBigQueryServices.BigQueryServerStream
which takes aList
as theIterable
to simulate a server stream.Nested classes/interfaces inherited from interface org.apache.beam.sdk.io.gcp.bigquery.BigQueryServices
BigQueryServices.BigQueryServerStream<T>, BigQueryServices.DatasetService, BigQueryServices.JobService, BigQueryServices.StorageClient, BigQueryServices.StreamAppendClient, BigQueryServices.WriteStreamService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TableRow
convertNumbers
(TableRow tableRow) decodeQueryResult
(String queryResult) static String
encodeQueryResult
(Table table) static String
encodeQueryResult
(Table table, List<TableRow> rows) getDatasetService
(BigQueryOptions bqOptions) Returns a real, mock, or fakeBigQueryServices.DatasetService
.getJobService
(BigQueryOptions bqOptions) Returns a real, mock, or fakeBigQueryServices.JobService
.getStorageClient
(BigQueryOptions bqOptions) Returns a real, mock, or fakeBigQueryServices.StorageClient
.getWriteStreamService
(BigQueryOptions bqOptions) Returns a real, mock, or fakeBigQueryServices.WriteStreamService
.withDatasetService
(FakeDatasetService datasetService) withJobService
(BigQueryServices.JobService jobService) withStorageClient
(BigQueryServices.StorageClient storageClient)
-
Constructor Details
-
FakeBigQueryServices
public FakeBigQueryServices()
-
-
Method Details
-
withJobService
-
withDatasetService
-
withStorageClient
-
getJobService
Description copied from interface:BigQueryServices
Returns a real, mock, or fakeBigQueryServices.JobService
.- Specified by:
getJobService
in interfaceBigQueryServices
-
getDatasetService
Description copied from interface:BigQueryServices
Returns a real, mock, or fakeBigQueryServices.DatasetService
.- Specified by:
getDatasetService
in interfaceBigQueryServices
-
getWriteStreamService
Description copied from interface:BigQueryServices
Returns a real, mock, or fakeBigQueryServices.WriteStreamService
.- Specified by:
getWriteStreamService
in interfaceBigQueryServices
-
getStorageClient
Description copied from interface:BigQueryServices
Returns a real, mock, or fakeBigQueryServices.StorageClient
.- Specified by:
getStorageClient
in interfaceBigQueryServices
-
encodeQueryResult
- Throws:
IOException
-
encodeQueryResult
- Throws:
IOException
-
decodeQueryResult
- Throws:
IOException
-
convertNumbers
-