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-mysql] No empty sample #48545

Merged
merged 2 commits into from
Nov 18, 2024
Merged

[source-mysql] No empty sample #48545

merged 2 commits into from
Nov 18, 2024

Conversation

xiaohansong
Copy link
Contributor

What

https://github.com/airbytehq/airbyte-internal-issues/issues/10773

(without fix it was loading 0 records because it thought table is empty; after the fix it can load the record and successfully exit)

Screenshot 2024-11-18 at 2 37 50 PM

How

Review guide

User Impact

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

@xiaohansong xiaohansong requested a review from a team as a code owner November 18, 2024 22:39
Copy link

vercel bot commented Nov 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Nov 18, 2024 10:40pm

@xiaohansong xiaohansong enabled auto-merge (squash) November 18, 2024 22:58
@xiaohansong xiaohansong merged commit 4b39143 into master Nov 18, 2024
38 checks passed
@xiaohansong xiaohansong deleted the xiaohan/countfix branch November 18, 2024 23:02
tryangul pushed a commit that referenced this pull request Nov 20, 2024
tryangul pushed a commit that referenced this pull request Nov 21, 2024
val quickCount =
"SELECT table_rows FROM information_schema.tables WHERE table_schema = '$namespace' AND table_name = '$name'"
"SELECT GREATEST(10, table_rows) FROM information_schema.tables WHERE table_schema = '$namespace' AND table_name = '$name'"
Copy link

@oliviertassinari oliviertassinari Dec 10, 2024

Choose a reason for hiding this comment

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

I'm not convinced this is working. I have:

(SELECT GREATEST(10, table_rows) FROM information_schema.tables WHERE table_schema = 'sghost05_wp789' AND table_name = 'view_orders')

that returns NULL on my end. MySQL v8.0.39-30.

SCR-20241210-nhoj

We used to sync all the records with:

SCR-20241210-nglt

https://cloud.airbyte.com/workspaces/9e090881-de2e-48c7-b268-2e86ad2525d9/connections/b46a92b8-8aa3-44e9-b17a-26067781a1cc/timeline

and now since https://cloud.airbyte.com/workspaces/9e090881-de2e-48c7-b268-2e86ad2525d9/connections/b46a92b8-8aa3-44e9-b17a-26067781a1cc/timeline

SCR-20241210-ngqb

It syncs 0 records.

Why does it happen? Because I'm syncing a view (TABLE_TYPE = VIEW), it's not a regular table:

SCR-20241210-nidm

The logic in #48035 doesn't look correct.

Choose a reason for hiding this comment

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

Moved to a dedicated issue #49804.

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.

4 participants