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
Meta info api #502
Merged
Merged
Meta info api #502
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
kshitij123456
commented
Dec 14, 2021
•
edited by manassolanki
edited by manassolanki
- Added the new refactored API for fetching the meta information of any database or data warehouse
- Add the schema support for the DB/DW (wherever applicable)
- Added the new field for the DB/DW schema and corresponding migration script
- Incorporated the schema related changes in the data loader class.
- This file contains the configuration pertaining to the schema availability of various databases - It also contains configuration pertaining to the views and materialized views availability of various databases
- get_schema_availability: to check if the datasource supports schemas - list_schemas: to get the list of schemas belonging to a particular datasource - list_tables: to get the list of tables belonging to a particular schema
✔️ Deploy Preview for frontend-sb canceled. 🔨 Explore the source changes: cd2d954 🔍 Inspect the deploy log: https://app.netlify.com/sites/frontend-sb/deploys/61c59ece97ffc000076b8c6f |
- views-available: returns a boolean signifying if a database supports views - materialize-views-available: returns a boolean signifying if a database supports materialize views
- list-views: returns list of views in a schema of a database
- merge the views availability and materialize_views availability endpoints into a single API endpoint
bhargavsk1077
force-pushed
the
api-meta-info
branch
from
December 15, 2021 17:07
5b26374
to
d9c9cb1
Compare
bhargavsk1077
force-pushed
the
api-meta-info
branch
from
December 15, 2021 17:09
d9c9cb1
to
5566b4d
Compare
manassolanki
requested changes
Dec 16, 2021
|
||
return jsonify({"message":message, "status":status, "view_names":view_names}) | ||
|
||
@blueprint.route("/table-info",methods=["GET"]) |
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.
Suggested change
@blueprint.route("/table-info",methods=["GET"]) | |
@blueprint.route("/table-info",methods=["POST"]) |
…into api-meta-info
- two endpoints, one of them returning schema availability and the second returning views and materialize views availability have been merged into one
Created a helper fucntion in `connectors/__init__.py` which returns table data as a Dictionary. Changed table-info API to use the new helper function.
Validated if datasource exists correspodin to the provided id. fixed minor bug in error handling.
bhargavsk1077
force-pushed
the
api-meta-info
branch
from
December 17, 2021 05:26
f707650
to
c998768
Compare
- The api endpoint ("/list-schema") to get the list of schemas was modified - The api endpoint ("/get-table-list") to get the list of tables in a schema was modified - The api endpoint ("/get-view-list") to get the list of views and materialized views was modified
Set the schema to None in table-into API in the case BigQuery is the datasource type.
manassolanki
requested changes
Dec 21, 2021
Added schema name such that `_get_table_name` returns 'schema_name.table_name' for KPIs where schemas are present. and 'table_name' when schema is None. Used `get_datasource_data_from_id` instead of the DataSource Model to fetch datasource info.
- schema_name was also added to as_dict and safe_dict in KPI model
- safe_dict was being returned by get_datasource_data_from_id, because of which certain keys which were required were not available
Added schema_name while creating a KPI object in Kpi View. Added schema_name in as_dict and safe_dict methods in Kpi Model.
- the changes were done in kpi_model.py file
manassolanki
approved these changes
Dec 23, 2021
manassolanki
force-pushed
the
api-meta-info
branch
2 times, most recently
from
December 24, 2021 10:16
64d6238
to
cd5b456
Compare
manassolanki
force-pushed
the
api-meta-info
branch
from
December 24, 2021 10:19
cd5b456
to
cd2d954
Compare
manassolanki
added
✨ enhancement
New feature or request
and removed
don't merge
PR which doesn't need to be merged right now
labels
Jan 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.