diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
index b0f85a1e55..ab539fe39e 100644
--- a/.github/workflows/e2e.yml
+++ b/.github/workflows/e2e.yml
@@ -40,7 +40,7 @@ jobs:
)
strategy:
matrix:
- tests: [bigquery, common, gcs, pubsub, spanner, gcscreate, gcsdelete, gcsmove, bigqueryexecute, gcscopy, datastore, bigtable]
+ tests: [bigquery, common, gcs, pubsub, spanner, gcscreate, gcsdelete, gcsmove, bigqueryexecute, gcscopy]
fail-fast: false
steps:
# Pinned 1.0.0 version
diff --git a/pom.xml b/pom.xml
index 5db23d9490..15b5383217 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1211,7 +1211,7 @@
io.cdap.tests.e2e
cdap-e2e-framework
- 0.3.2
+ 0.3.3
test
diff --git a/src/main/java/io/cdap/plugin/gcp/bigquery/source/PartitionedBigQueryInputFormat.java b/src/main/java/io/cdap/plugin/gcp/bigquery/source/PartitionedBigQueryInputFormat.java
index e3a195e0d3..afd77c00bb 100644
--- a/src/main/java/io/cdap/plugin/gcp/bigquery/source/PartitionedBigQueryInputFormat.java
+++ b/src/main/java/io/cdap/plugin/gcp/bigquery/source/PartitionedBigQueryInputFormat.java
@@ -221,7 +221,7 @@ String generateQuery(String partitionFromDate, String partitionToDate, String fi
}
}
- String tableName = datasetProject + "." + dataset + "." + table;
+ String tableName = String.format("`%s.%s.%s`", datasetProject, dataset, table);
StringBuilder query = new StringBuilder("select * from ").append(tableName);
if (condition.length() > 0) {
diff --git a/src/test/java/io/cdap/plugin/gcp/bigquery/source/PartitionedBigQueryInputFormatTest.java b/src/test/java/io/cdap/plugin/gcp/bigquery/source/PartitionedBigQueryInputFormatTest.java
index caf8ff8e3d..c29a9c7e44 100644
--- a/src/test/java/io/cdap/plugin/gcp/bigquery/source/PartitionedBigQueryInputFormatTest.java
+++ b/src/test/java/io/cdap/plugin/gcp/bigquery/source/PartitionedBigQueryInputFormatTest.java
@@ -1,4 +1,4 @@
-/*
+ /*
* Copyright © 2020 Cask Data, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -114,7 +114,7 @@ public void testGenerateQueryForMaterializingView_AllOptions() {
@Test
public void testGenerateQuery_WithFilterOnly() {
- String expectedQuery = String.format("select * from %s where %s",
+ String expectedQuery = String.format("select * from `%s` where %s",
TEST_TABLE_SPEC, TEST_FILTER);
String generatedQuery = format.generateQuery(null, null,
@@ -126,7 +126,7 @@ public void testGenerateQuery_WithFilterOnly() {
@Test
public void testGenerateQuery_AllOptions() {
- String expectedQuery = String.format("select * from %s where %s order by %s limit %s",
+ String expectedQuery = String.format("select * from `%s` where %s order by %s limit %s",
TEST_TABLE_SPEC, TEST_FILTER, TEST_ORDER_BY, TEST_LIMIT);
String generatedQuery = format.generateQuery(null, null,
@@ -141,7 +141,7 @@ public void testGenerateQuery_TimePartitionWithDates() {
when(mockTableDefinition.getTimePartitioning()).thenReturn(mockTimePartitioning);
when(mockTimePartitioning.getField()).thenReturn(null);
- String expectedQuery = String.format("select * from %s where (%s)",
+ String expectedQuery = String.format("select * from `%s` where (%s)",
TEST_TABLE_SPEC,
TEST_PARTITION_CONDITION);
@@ -156,7 +156,7 @@ public void testGenerateQuery_TimePartitionWithDates() {
public void testGenerateQuery_TimePartitionRequiredAndFilter() {
when(mockTableDefinition.getTimePartitioning()).thenReturn(mockTimePartitioning);
when(mockTimePartitioning.getField()).thenReturn(null);
- String expectedQuery = String.format("select * from %s where %s and (%s)",
+ String expectedQuery = String.format("select * from `%s` where %s and (%s)",
TEST_TABLE_SPEC, TEST_DEFAULT_TIME_CONDITION, TEST_FILTER);
String generatedQuery = format.generateQuery(null, null,
@@ -175,7 +175,7 @@ public void testGenerateQuery_TimeUnitPartitionWithDates() {
when(mockFieldList.get(TEST_TIME_UNIT_COL)).thenReturn(mockField);
when(mockField.getType()).thenReturn(LegacySQLTypeName.DATE);
- String expectedQuery = String.format("select * from %s where (%s)",
+ String expectedQuery = String.format("select * from `%s` where (%s)",
TEST_TABLE_SPEC, TEST_TIME_UNIT_PARTITION_CONDITION);
String generatedQuery = format.generateQuery(TEST_FROM_DATE, TEST_TO_DATE, null,
@@ -190,7 +190,7 @@ public void testGenerateQuery_TimePartitionFilterNotRequiredWithDates() {
when(mockTableDefinition.getTimePartitioning()).thenReturn(mockTimePartitioning);
when(mockTimePartitioning.getField()).thenReturn(null);
- String expectedQuery = String.format("select * from %s where (%s)",
+ String expectedQuery = String.format("select * from `%s` where (%s)",
TEST_TABLE_SPEC,
TEST_PARTITION_CONDITION);
@@ -212,7 +212,7 @@ public void testGenerateQuery_NoOptions_ShouldReturnNull() {
@Test
public void testGenerateQuery_WithLimitOnly_ShouldAssertQuery() {
- String expectedQuery = String.format("select * from %s limit %s", TEST_TABLE_SPEC,
+ String expectedQuery = String.format("select * from `%s` limit %s", TEST_TABLE_SPEC,
TEST_LIMIT);
String generatedQuery = format.generateQuery(null, null,
@@ -224,7 +224,7 @@ public void testGenerateQuery_WithLimitOnly_ShouldAssertQuery() {
@Test
public void testGenerateQuery_WithOrderByOnly_ShouldAssertQuery() {
- String expectedQuery = String.format("select * from %s order by %s", TEST_TABLE_SPEC,
+ String expectedQuery = String.format("select * from `%s` order by %s", TEST_TABLE_SPEC,
TEST_ORDER_BY);
String generatedQuery = format.generateQuery(null, null,
@@ -239,7 +239,7 @@ public void testGenerateQuery_TimePartitionNotRequired_WithDates_ShouldAssertQue
when(mockTableDefinition.getTimePartitioning()).thenReturn(mockTimePartitioning);
when(mockTimePartitioning.getField()).thenReturn(null);
- String expectedQuery = String.format("select * from %s where (%s)",
+ String expectedQuery = String.format("select * from `%s` where (%s)",
TEST_TABLE_SPEC,
TEST_PARTITION_CONDITION);
@@ -255,7 +255,7 @@ public void testGenerateQuery_TimePartitionRequired_WithFilterOnly_ShouldAssertQ
when(mockTableDefinition.getTimePartitioning()).thenReturn(mockTimePartitioning);
when(mockTimePartitioning.getField()).thenReturn(null);
- String expectedQuery = String.format("select * from %s where %s and (%s)",
+ String expectedQuery = String.format("select * from `%s` where %s and (%s)",
TEST_TABLE_SPEC, TEST_DEFAULT_TIME_CONDITION, TEST_FILTER);
String generatedQuery = format.generateQuery(null, null,
@@ -270,7 +270,7 @@ public void testGenerateQuery_RangePartitionRequiredAndFilter() {
when(mockTableDefinition.getRangePartitioning()).thenReturn(mockRangePartitioning);
when(mockRangePartitioning.getField()).thenReturn("range_col");
- String expectedQuery = String.format("select * from %s where %s and (%s)",
+ String expectedQuery = String.format("select * from `%s` where %s and (%s)",
TEST_TABLE_SPEC, TEST_DEFAULT_RANGE_CONDITION, TEST_FILTER);
String generatedQuery = format.generateQuery(null, null, TEST_FILTER,
@@ -285,7 +285,7 @@ public void testGenerateQuery_RangePartitionRequiredWithLimit() {
when(mockTableDefinition.getRangePartitioning()).thenReturn(mockRangePartitioning);
when(mockRangePartitioning.getField()).thenReturn("range_col");
- String expectedQuery = String.format("select * from %s where %s limit %s",
+ String expectedQuery = String.format("select * from `%s` where %s limit %s",
TEST_TABLE_SPEC, TEST_DEFAULT_RANGE_CONDITION, TEST_LIMIT);
String generatedQuery = format.generateQuery(null, null, null,
@@ -300,7 +300,7 @@ public void testGenerateQuery_TimeUnitPartitionRequiredAndFilter() {
when(mockTableDefinition.getTimePartitioning()).thenReturn(mockTimePartitioning);
when(mockTimePartitioning.getField()).thenReturn(TEST_TIME_UNIT_COL);
- String expectedQuery = String.format("select * from %s where %s and (%s)",
+ String expectedQuery = String.format("select * from `%s` where %s and (%s)",
TEST_TABLE_SPEC, TEST_DEFAULT_TIME_UNIT_CONDITION, TEST_FILTER);
String generatedQuery = format.generateQuery(null, null, TEST_FILTER,
@@ -315,7 +315,7 @@ public void testGenerateQuery_TimeUnitPartitionRequiredWithLimit() {
when(mockTableDefinition.getTimePartitioning()).thenReturn(mockTimePartitioning);
when(mockTimePartitioning.getField()).thenReturn(TEST_TIME_UNIT_COL);
- String expectedQuery = String.format("select * from %s where %s limit %s",
+ String expectedQuery = String.format("select * from `%s` where %s limit %s",
TEST_TABLE_SPEC, TEST_DEFAULT_TIME_UNIT_CONDITION, TEST_LIMIT);
String generatedQuery = format.generateQuery(null, null, null,