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

add cubejs as a datasource #1466

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

lordk911
Copy link
Contributor

@lordk911 lordk911 commented Apr 25, 2024

Description

https://python.langchain.com/docs/integrations/document_loaders/cube_semantic/

Cube’s data model provides structure and definitions that are used as a context for LLM to understand data and generate correct queries. LLM doesn’t need to navigate complex joins and metrics calculations because Cube abstracts those and provides a simple interface that operates on the business-level terminology, instead of SQL table and column names. This simplification helps LLM to be less error-prone and avoid hallucinations.

How Has This Been Tested?

image

image

@Aries-ckt
Copy link
Collaborator

hi, @lordk911 Thank you very much for your contribution, cubejs is a great feature, could you fix some mypy error
just make mypy

@lordk911
Copy link
Contributor Author

lordk911 commented Apr 25, 2024

hi, @lordk911 Thank you very much for your contribution, cubejs is a great feature, could you fix some mypy error just make mypy

I've done make mypy , only one error left :

dbgpt/datasource/rdbms/conn_cubejs.py:8: error: Cannot find implementation or library stub for module named "jwt" [import-not-found]

Is this need to care about? pyjwt is required-by: zhipuai

@Aries-ckt
Copy link
Collaborator

hi, there are some conflicts, could you fix that?
and could you give some example how to mock cubejs data?

@lordk911
Copy link
Contributor Author

and could you give some example how to mock cubejs data?

please flow this quick start docment, we can use the sample database

image

in DB-GPT create a cubejs connection:

image

current I use the remark value to config cubejs restapi infomation,for example:
{"CUBE_API_URL":"http://10.9.27.29:4000/cubejs-api/v1","CUBE_API_SECRET":"399f4816ea860e0d5676154441860b7f"}

in CUBEJS_DEV_MODE we didn't use authentication
so Username Password and CUBE_API_SECRET could be any , also DB Name could be any

@Aries-ckt
Copy link
Collaborator

ok, we will have a quick test and put cubejs datasource feature in v0.5.6 version.

@lordk911 lordk911 marked this pull request as ready for review May 8, 2024 07:18
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