Skip to content

Commit d266507

Browse files
committed
bigquery cdk bump
1 parent f3e781d commit d266507

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

airbyte-integrations/connectors/destination-bigquery/src/main/kotlin/io/airbyte/integrations/destination/bigquery/BigQueryDestination.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,7 @@ class BigQueryDestination : BaseConnector(), Destination {
560560
}
561561

562562
fun main(args: Array<String>) {
563+
log.info { "dumb change to force CI to actually run" }
563564
addThrowableForDeinterpolation(BigQueryException::class.java)
564565
val destination: Destination = BigQueryDestination()
565566
log.info { "Starting Destination : ${destination.javaClass}" }

airbyte-integrations/connectors/destination-bigquery/src/main/kotlin/io/airbyte/integrations/destination/bigquery/typing_deduping/BigQueryDestinationHandler.kt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class BigQueryDestinationHandler(private val bq: BigQuery, private val datasetLo
6161
SELECT TIMESTAMP_SUB(MIN(_airbyte_extracted_at), INTERVAL 1 MICROSECOND)
6262
FROM ${'$'}{raw_table}
6363
WHERE _airbyte_loaded_at IS NULL
64-
64+
6565
""".trimIndent()
6666
)
6767
)
@@ -96,7 +96,7 @@ class BigQueryDestinationHandler(private val bq: BigQuery, private val datasetLo
9696
"""
9797
SELECT MAX(_airbyte_extracted_at)
9898
FROM ${'$'}{raw_table}
99-
99+
100100
""".trimIndent()
101101
)
102102
)
@@ -125,6 +125,17 @@ class BigQueryDestinationHandler(private val bq: BigQuery, private val datasetLo
125125
return null
126126
}
127127

128+
val tableDef = finalTable.getDefinition<StandardTableDefinition>()
129+
val hasGenerationId: Boolean =
130+
tableDef.schema
131+
?.fields
132+
// Field doesn't have a hasColumn(String) method >.>
133+
?.any { it.name == JavaBaseConstants.COLUMN_NAME_AB_GENERATION_ID }
134+
?: false
135+
if (!hasGenerationId) {
136+
return null
137+
}
138+
128139
val result =
129140
bq.query(
130141
QueryJobConfiguration.of(

0 commit comments

Comments
 (0)