Skip to content

Commit bb043b7

Browse files
authored
🐛 Destination BigQuery Denormalized: Fixed compilation error (#5917)
* Fixed destination bigquery denormalized compilation error (caused by #5614)
1 parent edcd83d commit bb043b7

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

.github/workflows/publish-command.yml

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ jobs:
8181
SOURCE_AWS_CLOUDTRAIL_CREDS: ${{ secrets.SOURCE_AWS_CLOUDTRAIL_CREDS }}
8282
AZURE_STORAGE_INTEGRATION_TEST_CREDS: ${{ secrets.AZURE_STORAGE_INTEGRATION_TEST_CREDS }}
8383
BIGQUERY_INTEGRATION_TEST_CREDS: ${{ secrets.BIGQUERY_INTEGRATION_TEST_CREDS }}
84+
BIGQUERY_DENORMALIZED_INTEGRATION_TEST_CREDS: ${{ secrets.BIGQUERY_DENORMALIZED_INTEGRATION_TEST_CREDS }}
8485
SOURCE_BING_ADS_CREDS: ${{ secrets.SOURCE_BING_ADS_CREDS }}
8586
BIGQUERY_TEST_CREDS: ${{ secrets.BIGQUERY_TEST_CREDS }}
8687
BRAINTREE_TEST_CREDS: ${{ secrets.BRAINTREE_TEST_CREDS }}

.github/workflows/test-command.yml

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ jobs:
8181
AWS_REDSHIFT_INTEGRATION_TEST_CREDS: ${{ secrets.AWS_REDSHIFT_INTEGRATION_TEST_CREDS }}
8282
AZURE_STORAGE_INTEGRATION_TEST_CREDS: ${{ secrets.AZURE_STORAGE_INTEGRATION_TEST_CREDS }}
8383
BIGQUERY_INTEGRATION_TEST_CREDS: ${{ secrets.BIGQUERY_INTEGRATION_TEST_CREDS }}
84+
BIGQUERY_DENORMALIZED_INTEGRATION_TEST_CREDS: ${{ secrets.BIGQUERY_DENORMALIZED_INTEGRATION_TEST_CREDS }}
8485
SOURCE_BING_ADS_CREDS: ${{ secrets.SOURCE_BING_ADS_CREDS }}
8586
BIGQUERY_TEST_CREDS: ${{ secrets.BIGQUERY_TEST_CREDS }}
8687
BRAINTREE_TEST_CREDS: ${{ secrets.BRAINTREE_TEST_CREDS }}

airbyte-integrations/connectors/destination-bigquery-denormalized/src/main/java/io/airbyte/integrations/destination/bigquery/BigQueryDenormalizedDestination.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ protected String getTargetTableName(String streamName) {
7171
protected AirbyteMessageConsumer getRecordConsumer(BigQuery bigquery,
7272
Map<AirbyteStreamNameNamespacePair, BigQueryWriteConfig> writeConfigs,
7373
ConfiguredAirbyteCatalog catalog,
74-
Consumer<AirbyteMessage> outputRecordCollector) {
74+
Consumer<AirbyteMessage> outputRecordCollector,
75+
boolean isGcsUploadingMode,
76+
boolean isKeepFilesInGcs) {
7577
return new BigQueryDenormalizedRecordConsumer(bigquery, writeConfigs, catalog, outputRecordCollector, getNamingResolver());
7678
}
7779

airbyte-integrations/connectors/destination-bigquery-denormalized/src/main/java/io/airbyte/integrations/destination/bigquery/BigQueryDenormalizedRecordConsumer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public BigQueryDenormalizedRecordConsumer(BigQuery bigquery,
6464
ConfiguredAirbyteCatalog catalog,
6565
Consumer<AirbyteMessage> outputRecordCollector,
6666
StandardNameTransformer namingResolver) {
67-
super(bigquery, writeConfigs, catalog, outputRecordCollector);
67+
super(bigquery, writeConfigs, catalog, outputRecordCollector, false, false);
6868
this.namingResolver = namingResolver;
6969
invalidKeys = new HashSet<>();
7070
}

airbyte-integrations/connectors/destination-bigquery-denormalized/src/test-integration/java/io/airbyte/integrations/destination/bigquery/BigQueryDenormalizedDestinationTest.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ void setup(TestInfo info) throws IOException {
107107
final String credentialsJsonString = new String(Files.readAllBytes(CREDENTIALS_PATH));
108108
final JsonNode credentialsJson = Jsons.deserialize(credentialsJsonString);
109109

110-
final String projectId = credentialsJson.get(BigQueryDestination.CONFIG_PROJECT_ID).asText();
110+
final String projectId = credentialsJson.get(BigQueryConsts.CONFIG_PROJECT_ID).asText();
111111
final ServiceAccountCredentials credentials = ServiceAccountCredentials.fromStream(new ByteArrayInputStream(credentialsJsonString.getBytes()));
112112
bigquery = BigQueryOptions.newBuilder()
113113
.setProjectId(projectId)
@@ -124,10 +124,10 @@ void setup(TestInfo info) throws IOException {
124124
dataset = bigquery.create(datasetInfo);
125125

126126
config = Jsons.jsonNode(ImmutableMap.builder()
127-
.put(BigQueryDestination.CONFIG_PROJECT_ID, projectId)
128-
.put(BigQueryDestination.CONFIG_CREDS, credentialsJsonString)
129-
.put(BigQueryDestination.CONFIG_DATASET_ID, datasetId)
130-
.put(BigQueryDestination.CONFIG_DATASET_LOCATION, datasetLocation)
127+
.put(BigQueryConsts.CONFIG_PROJECT_ID, projectId)
128+
.put(BigQueryConsts.CONFIG_CREDS, credentialsJsonString)
129+
.put(BigQueryConsts.CONFIG_DATASET_ID, datasetId)
130+
.put(BigQueryConsts.CONFIG_DATASET_LOCATION, datasetLocation)
131131
.put(BIG_QUERY_CLIENT_CHUNK_SIZE, 10)
132132
.build());
133133

tools/bin/ci_credentials.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function write_standard_creds() {
2323

2424
# Please maintain this organisation and alphabetise.
2525
write_standard_creds destination-bigquery "$BIGQUERY_INTEGRATION_TEST_CREDS" "credentials.json"
26-
write_standard_creds destination-bigquery-denormalized "$BIGQUERY_INTEGRATION_TEST_CREDS" "credentials.json"
26+
write_standard_creds destination-bigquery-denormalized "$BIGQUERY_DENORMALIZED_INTEGRATION_TEST_CREDS" "credentials.json"
2727
write_standard_creds destination-gcs "$DESTINATION_GCS_CREDS"
2828
write_standard_creds destination-kvdb "$DESTINATION_KVDB_TEST_CREDS"
2929
write_standard_creds destination-keen "$DESTINATION_KEEN_TEST_CREDS"

0 commit comments

Comments
 (0)