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

feat: add TDengine.py driver to db_engine #32041

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

DuanKuanJun
Copy link

@DuanKuanJun DuanKuanJun commented Jan 30, 2025

feat: SuperSet support TDengine data source

SUMMARY

Through db_engine_spec for TDengine, Superset can support TDengine data sources and provide functions such as data presentation and analysis, see detail.

TESTING INSTRUCTIONS

  1. Install python connector for TDengine pip3 install taospy && pip3 install taos-ws-py
  2. Enter the new database connection page, "Superset" → "Setting" → "Database Connections" → "+DATABASE"
  3. Select TDengine database connection, select the "TDengine" option from the drop-down list of "SUPPORTED DATABASES".
  4. Write a name of connection in "DISPLAY NAME"
  5. The "SQLALCHEMY URL" field is a key connection information string, and it must be filled in correctly.
    format: taosws://user:password@host:port
  6. Configure the connection string, click "TEST CONNECTION" to test if the connection can be successful. After passing the test, click the "CONNECT" button to complete the connection

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@dosubot dosubot bot added data:connect Namespace | Anything related to db connections / integrations enhancement:db Suggest new DB connections labels Jan 30, 2025
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Fix Detected
Security Insecure Credential Example in URI Placeholder ▹ view

Need a new review? Comment /korbit-review on this PR and I'll review your latest changes.

Korbit Guide: Usage and Customization

Interacting with Korbit

  • You can manually ask Korbit to review your PR using the /korbit-review command in a comment at the root of your PR.
  • You can ask Korbit to generate a new PR description using the /korbit-generate-pr-description command in any comment on your PR.
  • Too many Korbit comments? I can resolve all my comment threads if you use the /korbit-resolve command in any comment on your PR.
  • Chat with Korbit on issues we post by tagging @korbit-ai in your reply.
  • Help train Korbit to improve your reviews by giving a 👍 or 👎 on the comments Korbit posts.

Customizing Korbit

  • Check out our docs on how you can make Korbit work best for you and your team.
  • Customize Korbit for your organization through the Korbit Console.

Feedback and Support

superset/db_engine_specs/TDengine.py Outdated Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@pull-request-size pull-request-size bot added size/M and removed size/S labels Jan 30, 2025
@github-actions github-actions bot added the doc Namespace | Anything related to documentation label Jan 30, 2025
@sadpandajoe
Copy link
Member

@DuanKuanJun thanks for opening this PR. Can you fill out the description for this PR?

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.33%. Comparing base (b12f515) to head (26d87e6).
Report is 18 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #32041       +/-   ##
===========================================
+ Coverage        0   83.33%   +83.33%     
===========================================
  Files           0      546      +546     
  Lines           0    39051    +39051     
===========================================
+ Hits            0    32543    +32543     
- Misses          0     6508     +6508     
Flag Coverage Δ
mysql 75.87% <93.33%> (?)
postgres 75.94% <93.33%> (?)
presto 53.04% <93.33%> (?)
python 83.33% <100.00%> (?)
sqlite 75.46% <93.33%> (?)
unit 61.01% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pull-request-size pull-request-size bot added size/L and removed size/M labels Feb 1, 2025
@DuanKuanJun
Copy link
Author

DuanKuanJun commented Feb 1, 2025

@DuanKuanJun thanks for opening this PR. Can you fill out the description for this PR?

already fill out the description
@sadpandajoe

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

Please check how to correctly define the dependencies. Also, tests seem to be failing, please check CI logs.

docs/docs/configuration/databases.mdx Outdated Show resolved Hide resolved
@DuanKuanJun
Copy link
Author

Please check how to correctly define the dependencies. Also, tests seem to be failing, please check CI logs.
@villebro , I submit fixed code, but CI could not run, show tips "Expected — Waiting for status to be reported"

@DuanKuanJun DuanKuanJun requested a review from villebro February 2, 2025 08:31
@rusackas
Copy link
Member

rusackas commented Feb 2, 2025

Running CI now 🤞

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

A few additional comments. CI is still failing, please check the logs for what the issues are.

superset/db_engine_specs/TDengine.py Outdated Show resolved Hide resolved
superset/db_engine_specs/TDengine.py Outdated Show resolved Hide resolved
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM. There's still CI issues, please check those. You may benefit from installing pre-commit hooks. Please check https://superset.apache.org/docs/contributing/development#git-hooks, as these automatically correct any code formatting issues for you.

superset/db_engine_specs/TDengine.py Outdated Show resolved Hide resolved
superset/db_engine_specs/TDengine.py Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:connect Namespace | Anything related to db connections / integrations doc Namespace | Anything related to documentation enhancement:db Suggest new DB connections size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants