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

SNOW-1794377: Add support for Dataframe.toJSON #2774

Conversation

sfc-gh-jrose
Copy link
Contributor

@sfc-gh-jrose sfc-gh-jrose commented Dec 17, 2024

  1. Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes SNOW-1794377

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
      • If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am adding new credentials
    • I am adding a new dependency
    • If this is a new feature/behavior, I'm adding the Local Testing parity changes.
    • I acknowledge that I have ensured my changes to be thread-safe. Follow the link for more information: Thread-safe Developer Guidelines
  3. Please describe how your code solves the related issue.

    This PR adds an approximation of pysparks Dataframe.toJSON method. Notably Snowpark does not support RDDs so instead we return a Dataframe. Additionally Snowflake JSON methods don't support the use_unicode flag that pyspark provides so that is left out as well. We could add it as a dummy value for compatibility, but I think we should stick to what the Snowflake API can provide.

@sfc-gh-jrose sfc-gh-jrose marked this pull request as ready for review December 18, 2024 23:59
@sfc-gh-jrose sfc-gh-jrose requested review from a team as code owners December 18, 2024 23:59
@sfc-gh-jrose sfc-gh-jrose requested review from sfc-gh-smirzaei and removed request for a team December 18, 2024 23:59
Copy link
Contributor

@sfc-gh-aalam sfc-gh-aalam left a comment

Choose a reason for hiding this comment

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

we also should update the dataframe.rst file

@sfc-gh-jrose sfc-gh-jrose force-pushed the jrose_snow_1794377_dataframe_tojson_support branch from c68883f to 9a16be6 Compare December 20, 2024 19:24
@sfc-gh-jrose sfc-gh-jrose requested a review from a team as a code owner December 20, 2024 19:34
@sfc-gh-jrose sfc-gh-jrose requested review from sfc-gh-joshi and sfc-gh-jjiao and removed request for a team December 20, 2024 19:34
Copy link

Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing

@sfc-gh-jrose sfc-gh-jrose force-pushed the jrose_snow_1794377_dataframe_tojson_support branch from 8b81bd8 to e0a7435 Compare December 20, 2024 19:41
@sfc-gh-jrose sfc-gh-jrose merged commit 0d47fb6 into SNOW-1830033-dataframe-api-bcrs Dec 20, 2024
36 of 37 checks passed
@sfc-gh-jrose sfc-gh-jrose deleted the jrose_snow_1794377_dataframe_tojson_support branch December 20, 2024 21:10
@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 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.

2 participants