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

fixes merge statement casting for JSONB and array types #830

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

heavycrystal
Copy link
Contributor

  1. Replaces the legacy JSON_EXTRACT_* functions with JSON_VALUE_* equivalents which fixes quoting issues in certain types.
  2. Changes some logging and Pyroscope to be less noisy.

Copy link
Contributor

@Amogh-Bharadwaj Amogh-Bharadwaj left a comment

Choose a reason for hiding this comment

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

Tested

@iskakaushik iskakaushik merged commit 99ccad7 into main Dec 15, 2023
12 checks passed
iskakaushik pushed a commit that referenced this pull request Jan 1, 2024
Similar to how #830 fixes JSON structure for BigQuery, this one does it
for Snowflake by performing a [PARSE_JSON
transformation](https://docs.snowflake.com/en/sql-reference/functions/parse_json)
in Copy (for initial load) and Merge (CDC) steps

<img width="1111" alt="Screenshot 2024-01-01 at 5 23 52 PM"
src="https://github.com/PeerDB-io/peerdb/assets/65964360/03549553-56c5-475b-b668-0e83b68c8eb0">

You can now query synced Postgres JSONs by PeerDB to Snowflake Variants
using:
```sql
SELECT j:tags FROM mysftable
``` 
Adds a test for this. Also tested manually

Fixes #828
@serprex serprex deleted the bigquery-json-array-fixes branch July 19, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants