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

🐛 Source Snowflake: Fixed parsing of extreme values for FLOAT and NUMBER data types #7257

Merged
merged 3 commits into from
Oct 22, 2021

Conversation

irynakruk
Copy link
Contributor

@irynakruk irynakruk commented Oct 21, 2021

What

Connector provides wrong values for a datatype:

  1. For all Data Types for Fixed-point Numbers in Snowflake the range of values is all integer values from -99999999999999999999999999999999999999 to +99999999999999999999999999999999999999 (inclusive), but returned NULL. The MIN and MAX values are Long extreme values.
  2. FLOAT - NaN, inf, -inf values is returned as NULL, but should be mapped to Double NaN / POSITIVE_INFINITY / NEGATIVE_INFINITY

How

Added SnowflakeSourceOperations class with two overrided methods: putDouble and putBigInt, which contain specific data type handling for Snowflake.

Recommended reading order

  1. SnowflakeSourceOperations.java
  2. SnowflakeSourceDatatypeTest.java

Pre-merge Checklist

Updating a connector

Community member or Airbyter

  • Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • Changelog updated in docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
  • PR name follows PR naming conventions
  • Connector version bumped like described here

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here

@github-actions github-actions bot added area/connectors Connector related issues area/documentation Improvements or additions to documentation labels Oct 21, 2021
@irynakruk irynakruk changed the title Source Snowflake: Fixed parsing of extreme values for FLOAT and NUMBER data types 🐛 Source Snowflake: Fixed parsing of extreme values for FLOAT and NUMBER data types Oct 21, 2021
@irynakruk irynakruk linked an issue Oct 21, 2021 that may be closed by this pull request
@irynakruk irynakruk temporarily deployed to more-secrets October 21, 2021 20:37 Inactive
@irynakruk
Copy link
Contributor Author

irynakruk commented Oct 21, 2021

/test connector=connectors/source-snowflake

🕑 connectors/source-snowflake https://github.com/airbytehq/airbyte/actions/runs/1369613127
✅ connectors/source-snowflake https://github.com/airbytehq/airbyte/actions/runs/1369613127
No Python unittests run

@jrhizor jrhizor temporarily deployed to more-secrets October 21, 2021 20:44 Inactive
@irynakruk
Copy link
Contributor Author

irynakruk commented Oct 22, 2021

/publish connector=connectors/source-snowflake

🕑 connectors/source-snowflake https://github.com/airbytehq/airbyte/actions/runs/1372926470
✅ connectors/source-snowflake https://github.com/airbytehq/airbyte/actions/runs/1372926470

@jrhizor jrhizor temporarily deployed to more-secrets October 22, 2021 16:07 Inactive
@alexandr-shegeda alexandr-shegeda marked this pull request as ready for review October 22, 2021 16:08
@irynakruk irynakruk temporarily deployed to more-secrets October 22, 2021 16:29 Inactive
@irynakruk irynakruk temporarily deployed to more-secrets October 22, 2021 17:03 Inactive
@irynakruk irynakruk temporarily deployed to more-secrets October 22, 2021 18:37 Inactive
@irynakruk irynakruk temporarily deployed to more-secrets October 22, 2021 19:08 Inactive
@irynakruk irynakruk merged commit 1ae5cf4 into master Oct 22, 2021
@irynakruk irynakruk deleted the irynakruk/4316-snowflake-datatype-fix branch October 22, 2021 19:48
schlattk pushed a commit to schlattk/airbyte that referenced this pull request Jan 4, 2022
…BER data types (airbytehq#7257)

* Fixed parsing of extreme values for FLOAT and NUMBER data types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source Snowflake: Connector provides wrong values for a datatype
3 participants