-
Notifications
You must be signed in to change notification settings - Fork 7
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: Custom schema for SQL query visualization #51
Conversation
api/app.py
Outdated
|
||
def verify_token(token: str = Depends(oauth2_scheme)): | ||
try: | ||
payload = jwt.decode(token, "key", algorithms=["HS256"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shall be replaced by a ENV variable
client/src/assets/js/shared.js
Outdated
const payload = { | ||
user_id: user_id, | ||
}; | ||
const secret = new TextEncoder().encode("key"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will be present in an ENV variable
api/backend/duckdb.py
Outdated
conn.load_extension("substrait") | ||
self.conn_pool.append(conn) | ||
|
||
def check_pool(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this function here if we're doing something similar in the init?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's mostly to check if the pool has active connection instances before providing one in the get_connection()
method below. I have moved the code to a different method to avoid code repetitions.
Can we add docstrings to some of python functions to get a better understanding of what they're doing? |
Yes, considering the big change, docstrings will be good for giving a better understanding of the workflow. I will add them. |
…b connection pool
c48b62b
to
9cb1642
Compare
api/components/duckdb.py
Outdated
|
||
# Pool size is default at 5 for maintaining | ||
# 5 concurrent DuckDB connection objects | ||
POOL_SIZE = 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also make this as an ENV variable
The Cypress Test in |
34c9b5d
to
26926fe
Compare
This PR adds support for defining custom schema in the SQL CodeView. Previously, querying only on the
lineitem
table was allowed through SQL in the fiddle, but with this feature, different table schemas can be defined and queries can be visualized.