Skip to content

CDK changes to support MSSQL removing normalization #37006

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

Closed
wants to merge 1 commit into from

Conversation

jbfbell
Copy link
Contributor

@jbfbell jbfbell commented Apr 11, 2024

A shared method did not account for the _airbyte_meta column and had a static batch size which did not work for MSSQL


Ellipsis 🚀 This PR description was created by Ellipsis for commit d7d18c2df538c00a21b98d637ffa3e04eb63053e.

Summary:

This PR updates the SqlOperationsUtils.kt to handle the _airbyte_meta column for MSSQL, bumps the CDK version, and documents the change in the README.md.

Key points:

  • Updated SqlOperationsUtils.kt to handle _airbyte_meta column for MSSQL.
  • Bumped CDK version in version.properties.
  • Added new entry in README.md to document the change.

Generated with ❤️ by ellipsis.dev

Copy link

vercel bot commented Apr 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Apr 12, 2024 4:22pm

@octavia-squidington-iii octavia-squidington-iii added the CDK Connector Development Kit label Apr 11, 2024
Copy link
Contributor Author

jbfbell commented Apr 11, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @jbfbell and the rest of your teammates on Graphite Graphite

@jbfbell jbfbell changed the title formatting CDK changes to support MSSQL removing normalization Apr 11, 2024
@jbfbell jbfbell marked this pull request as ready for review April 11, 2024 20:57
@jbfbell jbfbell requested review from a team as code owners April 11, 2024 20:57
@jbfbell jbfbell force-pushed the jbfbell/refactor_sqloputils_for_airbyte_meta branch from d7d18c2 to e70a16f Compare April 11, 2024 20:59
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

No problems found on commit d7d18c2df538c00a21b98d637ffa3e04eb63053e.


Not what you expected? You can customize the content of the reviews using rules. Learn more here.

@jbfbell jbfbell force-pushed the jbfbell/refactor_sqloputils_for_airbyte_meta branch from e70a16f to 0dbdbb1 Compare April 11, 2024 22:24
@jbfbell jbfbell force-pushed the jbfbell/refactor_sqloputils_for_airbyte_meta branch from 0dbdbb1 to 1f34b9c Compare April 12, 2024 16:21
statement.setTimestamp(
i,
Timestamp.from(Instant.ofEpochMilli(message.record!!.emittedAt))
if (isDestinationV2) {
Copy link
Contributor

Choose a reason for hiding this comment

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

shall we avoid this implicit TypingDedupingFlag anymore in new code, especially in static method references. probably pass it along with default value as false with multi-arg methods.

* @param records records to write
* @throws SQLException exception
*/
@Throws(SQLException::class)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is still used in RedshiftSqlOperations v1 insert query call (until everyone adopts the DV2 breaking change that code could get invoked). So keep the @JvmStatic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its still static just moved outside the object since it was the only method in the object

Copy link
Contributor

Choose a reason for hiding this comment

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

interesting, so kotlin doesn't really have static is what i read. In java ctx is it still invocable as SqlOpUtils.insert.. ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah in the stacked PR on top I reference this method via

import static io.airbyte.cdk.integrations.destination.jdbc.SqlOperationsUtilsKt.insertRawRecordsInSingleQuery

@gisripa
Copy link
Contributor

gisripa commented Apr 12, 2024

@jbfbell In Redshift land, when we were switching to Dv2, we ditched this SqlOperationUtils method altogether and have insertRecordv1 and insertRecordv2 as 2 different calls decided in JdbcSqlOperations. Can that code path be leveraged by any chance instead of adding yet another if (isDv2) in a static method ?

@jbfbell jbfbell closed this Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CDK Connector Development Kit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants