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

Java CDK: Staging destinations include timezone in extracted_at in CSV file #35313

Merged
merged 2 commits into from
Mar 1, 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 @@ -166,7 +166,8 @@ MavenLocal debugging steps:

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:-----------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 0.23.10 | 2024-03-01 | [\#35303](https://github.com/airbytehq/airbyte/pull/35303) | various improvements for tests TestDataHolder |
| 0.23.11 | 2024-03-01 | [\#35313](https://github.com/airbytehq/airbyte/pull/35313) | Preserve timezone offset in CSV writer for destinations |
| 0.23.10 | 2024-03-01 | [\#35303](https://github.com/airbytehq/airbyte/pull/35303) | Migration framework with DestinationState for softReset |
| 0.23.9 | 2024-03-01 | [\#35720](https://github.com/airbytehq/airbyte/pull/35720) | various improvements for tests TestDataHolder |
| 0.23.8 | 2024-02-28 | [\#35529](https://github.com/airbytehq/airbyte/pull/35529) | Refactor on state iterators |
| 0.23.7 | 2024-02-28 | [\#35376](https://github.com/airbytehq/airbyte/pull/35376) | Extract typereduper migrations to separte method |
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=0.23.10
version=0.23.11
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import io.airbyte.cdk.integrations.base.JavaBaseConstants;
import io.airbyte.commons.json.Jsons;
import io.airbyte.protocol.models.v0.AirbyteRecordMessage;
import java.sql.Timestamp;
import java.time.Instant;
import java.util.Collections;
import java.util.LinkedList;
Expand Down Expand Up @@ -62,14 +61,14 @@ public List<Object> getDataRow(final UUID id, final String formattedString, fina
if (useDestinationsV2Columns) {
return List.of(
id,
Timestamp.from(Instant.ofEpochMilli(emittedAt)),
Instant.ofEpochMilli(emittedAt),
"",
formattedString);
} else {
return List.of(
id,
formattedString,
Timestamp.from(Instant.ofEpochMilli(emittedAt)));
Instant.ofEpochMilli(emittedAt));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,10 @@ public void writesContentsCorrectly_when_stagingDatabaseConfig() throws IOExcept
// carriage returns are required b/c RFC4180 requires it :(
// Dynamically generate the timestamp because we generate in local time.
assertEquals(
String.format(
"""
f6767f7d-ce1e-45cc-92db-2ad3dfdd088e,"{""foo"":73}",%s\r
2b95a13f-d54f-4370-a712-1c7bf2716190,"{""bar"":84}",%s\r
""",
Timestamp.from(Instant.ofEpochMilli(1234)),
Timestamp.from(Instant.ofEpochMilli(2345))),
"""
f6767f7d-ce1e-45cc-92db-2ad3dfdd088e,"{""foo"":73}",1970-01-01T00:00:01.234Z\r
2b95a13f-d54f-4370-a712-1c7bf2716190,"{""bar"":84}",1970-01-01T00:00:02.345Z\r
""",
outputStreams.get(0).toString(StandardCharsets.UTF_8));
}

Expand Down
Loading