diff --git a/src/main/java/io/cdap/plugin/gcp/bigquery/relational/BigQueryRelation.java b/src/main/java/io/cdap/plugin/gcp/bigquery/relational/BigQueryRelation.java index 796cfa2d67..18d12b378b 100644 --- a/src/main/java/io/cdap/plugin/gcp/bigquery/relational/BigQueryRelation.java +++ b/src/main/java/io/cdap/plugin/gcp/bigquery/relational/BigQueryRelation.java @@ -349,6 +349,16 @@ public Relation window(WindowAggregationDefinition definition) { return new BigQueryRelation(datasetName, columns, featureFlagsProvider, this, supplier); } + /** + * Adds schema information to the relation. This can be used for validation purposes. + * + * @param schema The schema. + * @return A new relation with the schema added. + */ + public Relation addSchema(@Nullable Schema schema) { + return new BigQueryRelation(datasetName, columns, featureFlagsProvider, this, sqlStatementSupplier, schema); + } + private static String buildBaseSelect(Map columns, String sourceTable, String datasetName) {