Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Snowflake dialect #57

Closed

Conversation

lukasznowak-viacom
Copy link

No description provided.

Copy link

github-actions bot commented Jan 9, 2024

Hi @lukasznowak-viacom, thanks for your contribution. Please prefix the commit message(s) with the DBZ-xxx JIRA issue key.

Copy link

github-actions bot commented Jan 9, 2024

Welcome as a new contributor to Debezium, @lukasznowak-viacom. Reviewers, please add missing author name(s) and alias name(s) to the COPYRIGHT.txt and Aliases.txt respectively.

@mfvitale
Copy link
Member

Hi @lukasznowak-viacom Thanks for this PR. Can you please open an issue explaining the requirements for that? This can help the discussion and review. Thanks.

Copy link
Member

@Naros Naros left a comment

Choose a reason for hiding this comment

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

I left a few inline comments.

Comment on lines +10 to +26
public class SnowflakeDialect extends org.hibernate.dialect.Dialect {

@Override
public DatabaseVersion getVersion() {
return new DatabaseVersion() {
@Override
public int getDatabaseMajorVersion() {
return 0;
}

@Override
public int getDatabaseMinorVersion() {
return 0;
}
};
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Given that the SnowflakeDialect implementation here is basically a generalized shell of Hibernate's Dialect base class, I wonder whether it would make more sense to add a way that a user could influence the dialect chosen directly using the JDBC sink connector's dialect and perhaps we could omit this specific class all together somehow?


/**
* An implementation of {@link Type} that provides compatibility with other dialect's numeric
* types to Oracle's numeric type.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* types to Oracle's numeric type.
* types to Snowflake's numeric type.

import java.util.Optional;

/**
* A {@link DatabaseDialect} implementation for Oracle.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* A {@link DatabaseDialect} implementation for Oracle.
* A {@link DatabaseDialect} implementation for Snowflake.


@Override
protected Optional<String> getDatabaseTimeZoneQuery() {
return Optional.of("SELECT DBTIMEZONE, SESSIONTIMEZONE FROM DUAL");
Copy link
Member

Choose a reason for hiding this comment

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

Does Snowflake support DBTIMEZONE and SESSIONTIMEZONE like Oracle?

@Naros
Copy link
Member

Naros commented Sep 13, 2024

Hi @lukasznowak-viacom, we've moved this repository to the main https://github.com/debezium/debezium repository. If this is still something you are working on and intend to contribute, please re-open this PR against that repository and address the above review comments. Thanks!

@Naros Naros closed this Sep 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants