public class BigQueryAsserts
extends java.lang.Object
| Constructor and Description |
|---|
BigQueryAsserts() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.beam.it.truthmatchers.RecordsSubject |
assertThatBigQueryRecords(com.google.cloud.bigquery.TableResult tableResult)
Creates a
RecordsSubject to assert information within a list of records. |
static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
bigQueryRowsToRecords(java.util.List<com.google.cloud.bigquery.InsertAllRequest.RowToInsert> rows)
Convert BigQuery
InsertAllRequest.RowToInsert to a list of maps. |
static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
bigQueryRowsToRecords(java.util.List<com.google.cloud.bigquery.InsertAllRequest.RowToInsert> rows,
java.util.List<java.lang.String> excludeCols)
Convert BigQuery
InsertAllRequest.RowToInsert to a list of maps. |
static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
tableResultToRecords(com.google.cloud.bigquery.TableResult tableResult)
Convert BigQuery
TableResult to a list of maps. |
public static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> tableResultToRecords(com.google.cloud.bigquery.TableResult tableResult)
TableResult to a list of maps.tableResult - Table Result to parseRecordsSubjectpublic static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> bigQueryRowsToRecords(java.util.List<com.google.cloud.bigquery.InsertAllRequest.RowToInsert> rows)
InsertAllRequest.RowToInsert to a list of maps.rows - BigQuery rows to parse.RecordsSubjectpublic static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> bigQueryRowsToRecords(java.util.List<com.google.cloud.bigquery.InsertAllRequest.RowToInsert> rows,
java.util.List<java.lang.String> excludeCols)
InsertAllRequest.RowToInsert to a list of maps.rows - BigQuery rows to parse.excludeCols - BigQuery columns to filter out of result.RecordsSubjectpublic static org.apache.beam.it.truthmatchers.RecordsSubject assertThatBigQueryRecords(com.google.cloud.bigquery.TableResult tableResult)
RecordsSubject to assert information within a list of records.tableResult - Records in BigQuery TableResult format to use in the comparison.