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 support for Vertica analytical database #1538

Merged
merged 3 commits into from
May 20, 2024

Conversation

dingqiangliu
Copy link
Contributor

@dingqiangliu dingqiangliu commented May 18, 2024

Description

DB-GPT_00
DB-GPT_01
DB-GPT_02
DB-GPT_03
DB-GPT_04

Add RDBMS connector for Vertica to support this project running on data warehouse with large data volume.
This connect only requires open source python driver of Vertica, vertica-python https://github.com/vertica/vertica-python. Its dependency is added in setup.py at the same time.

How Has This Been Tested?

All features about RDBMS connecor are tested including Chat DB and Chat Data.

  1. pull a Vertica community version docker image.
docker pull vertica/vertica-ce

# see also: https://hub.docker.com/r/vertica/vertica-ce
docker run -p 5433:5433 -p 5444:5444 \
          --mount type=volume,source=vertica-data,target=/data \
          --name vertica_ce \
          vertica/vertica-ce
  1. create database in DB-GPT with DB Type Vertica.

The database name is vertica_ce, port is 5433, username is dbadmin, and password is empty by default.

  1. go to Chart DB and ask question about data model in database.

  2. go to Chart Data and ask question about data in database.

Snapshots:

Include snapshots for easier review.

Checklist:

add support for Vertica analytical database

  • My code follows the style guidelines of this project
  • I have already rebased the commits and make the commit message conform to the project standard.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules

@github-actions github-actions bot added the enhancement New feature or request label May 18, 2024
@fangyinc
Copy link
Collaborator

Hi, @dingqiangliu, thank you for your contribution. Please fix pylint error with following commands:

make fmt
make mypy

@dingqiangliu
Copy link
Contributor Author

Hello @fangyinc, pylint error fixed, please review it again.

@csunny
Copy link
Collaborator

csunny commented May 19, 2024

@dingqiangliu Hello, I installed docker according to the above command, but an error occurred when linking.

The database vertica_ce does not exist

I noticed that you wrote testdb in the screenshot, but the default docker log is VMart. Can you give detailed instructions on how to create a test database and load test data?

@csunny
Copy link
Collaborator

csunny commented May 19, 2024

I use default VMart database, chatdb works well
image

@fangyinc
Copy link
Collaborator

Test passed.
image

image

Copy link
Collaborator

@fangyinc fangyinc left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Collaborator

@csunny csunny left a comment

Choose a reason for hiding this comment

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

LGTM~

@csunny csunny merged commit 8d8411f into eosphoros-ai:main May 20, 2024
5 checks passed
Hopshine pushed a commit to Hopshine/DB-GPT that referenced this pull request Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants