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

fix: big numbers in Postgres #12710

Merged
merged 1 commit into from
Dec 4, 2024
Merged

fix: big numbers in Postgres #12710

merged 1 commit into from
Dec 4, 2024

Conversation

ZeRego
Copy link
Contributor

@ZeRego ZeRego commented Dec 4, 2024

Closes: #12699

Description:

pg client doesn't support native BitInt values (ref) so we have to implement the workaround suggested here

Type parser was introduced in e8a4ea1

Data:
Screenshot 2024-12-04 at 09 58 05

Before:
Screenshot 2024-12-04 at 09 57 47

After:
Screenshot 2024-12-04 at 10 50 45

Replicate steps

Update raw_plan.csv

id,plan_name,metadata,big_number
1,free,{"created_by":"John Miller"},9223358433259708591
2,silver,{"created_by":"Elliot Stone"},9223358433259708592
3,gold,{"created_by":"John Miller"},9223358433259708593
4,platinum,{"created_by":"Elliot Stone"},9223358433259708594
5,diamond,{"created_by":"John Miller"},9223358433259708595

Update dbt_project.yml

    raw_plan:
      +column_types:
        metadata: jsonb
        big_number: bigint

Update plan.yml

      - name: big_number
        meta:
          dimension:
            type: number
            format: id

Add user attribute is_admin with default true so you can query the plans table.

Reviewer actions

  • I have manually tested the changes in the preview environment
  • I have reviewed the code
  • I understand that "request changes" will block this PR from merging

@ZeRego ZeRego requested a review from joaoviana December 4, 2024 10:59
@ZeRego ZeRego self-assigned this Dec 4, 2024
@owlas owlas requested a deployment to fix/big-numbers-in-postgres - jaffle_db_pg_13 PR #12710 December 4, 2024 10:59 — with Render Abandoned
@owlas owlas temporarily deployed to fix/big-numbers-in-postgres - headless-browser PR #12710 December 4, 2024 10:59 — with Render Destroyed
Copy link

netlify bot commented Dec 4, 2024

Deploy Preview for peaceful-bassi-cbf284 ready!

Name Link
🔨 Latest commit 1b5c9a3
🔍 Latest deploy log https://app.netlify.com/sites/peaceful-bassi-cbf284/deploys/675035ff52ef390008e2a356
😎 Deploy Preview https://deploy-preview-12710--peaceful-bassi-cbf284.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@owlas owlas temporarily deployed to fix/big-numbers-in-postgres - lightdash PR #12710 December 4, 2024 11:00 — with Render Destroyed
@ZeRego ZeRego merged commit 9ac78a1 into main Dec 4, 2024
45 of 48 checks passed
@ZeRego ZeRego deleted the fix/big-numbers-in-postgres branch December 4, 2024 13:21
lightdash-bot pushed a commit that referenced this pull request Dec 4, 2024
## [0.1397.2](0.1397.1...0.1397.2) (2024-12-04)

### Bug Fixes

* big numbers in Postgres ([#12710](#12710)) ([9ac78a1](9ac78a1))
@lightdash-bot
Copy link
Collaborator

🎉 This PR is included in version 0.1397.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bigint in postgres is adding trailing 0s in Lightdash
4 participants