Skip to content

Commit

Permalink
gireesh/cdk-dbricks
Browse files Browse the repository at this point in the history
  • Loading branch information
gisripa committed May 10, 2024
1 parent 3525225 commit ffd9ee6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
3 changes: 2 additions & 1 deletion airbyte-cdk/java/airbyte-cdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ corresponds to that version.
### Java CDK

| Version | Date | Pull Request | Subject |
|:--------|:-----------| :--------------------------------------------------------- |:---------------------------------------------------------------------------------------------------------------------------------------------------------------|
|:--------|:-----------|:-----------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 0.34.3 | 2024-05-10 | [\#38095](https://github.com/airbytehq/airbyte/pull/38095) | Minor changes for databricks connector |
| 0.34.1 | 2024-05-07 | [\#38030](https://github.com/airbytehq/airbyte/pull/38030) | Add support for transient errors |
| 0.34.0 | 2024-05-01 | [\#37712](https://github.com/airbytehq/airbyte/pull/37712) | Destinations: Remove incremental T+D |
| 0.33.2 | 2024-05-03 | [\#37824](https://github.com/airbytehq/airbyte/pull/37824) | improve source acceptance tests |
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=0.34.2
version=0.34.3
1 change: 1 addition & 0 deletions airbyte-cdk/java/airbyte-cdk/dependencies/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies {
api 'com.fasterxml.jackson.core:jackson-databind'
api 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml'
api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
api 'com.fasterxml.jackson.module:jackson-module-kotlin'
api 'com.google.guava:guava:33.0.0-jre'
api 'commons-io:commons-io:2.15.1'
api ('io.airbyte.airbyte-protocol:protocol-models:0.9.0') { exclude group: 'com.google.api-client', module: 'google-api-client' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,7 @@ abstract class BaseSqlGeneratorIntegrationTest<DestinationState : MinimumDestina

@Test
@Throws(Exception::class)
fun testV1V2migration() {
open fun testV1V2migration() {
// This is maybe a little hacky, but it avoids having to refactor this entire class and
// subclasses
// for something that is going away
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.google.common.collect.Streams
import io.airbyte.commons.json.Jsons
import java.math.BigDecimal
import java.time.*
import java.time.format.DateTimeParseException
import java.util.*
import java.util.function.Function
import java.util.stream.Collectors
Expand Down Expand Up @@ -440,7 +441,16 @@ constructor(
Instant.ofEpochMilli(Long.MIN_VALUE)
} else {
try {
Instant.parse(node.asText())
OffsetDateTime.parse(node.asText()).toInstant()
} catch (parseE: DateTimeParseException) {
// Fallback to using LocalDateTime and try again
// Some databases have Timestamp_TZ mapped to TIMESTAMP with no offset,
// this is sketchy to assume it as always UTC
try {
LocalDateTime.parse(node.asText()).toInstant(ZoneOffset.UTC)
} catch (e: Exception) {
Instant.ofEpochMilli(Long.MIN_VALUE)
}
} catch (e: Exception) {
Instant.ofEpochMilli(Long.MIN_VALUE)
}
Expand Down

0 comments on commit ffd9ee6

Please sign in to comment.