Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDK changes for destination-databricks #38095

Merged
merged 1 commit into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a massive fan. Any reason DatabricksDestination can't override this class?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too much plumbing into BaseTypingDedupingTest and lot of copy-paste

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
Loading