-
Notifications
You must be signed in to change notification settings - Fork 48
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
Discrepancy in database's run_sql() method #1664
Comments
This PR is still a work in progress. This requires a return statement to return the cursor object to the generated result so that its consistent across all the databases. @rajaths010494 mentioned he would pick this up after other tickets are done for 1.5.1. He needs to sync with @dimberman for this as well @rajaths010494 to provide more details |
@rajaths010494 has set up the meeting today. He will provide more details on this ticket. |
Connected with @dimberman regarding run_sql we would be using get_wrapped_handler to get results for other databases and make necessary other changes for tests |
**Please describe the feature you'd like to see** Currently, the handler param in the run_sql() method is only used in data bricks all other databases are not using it, which leads to different response types since the handler is processed within `run_sql()` for data bricks and not for other databases. Also, the signature of `run_sql()` in data bricks deviates from the base. We need to standardize and when we do, we can remove the below check as well. **Describe the solution you'd like** Ideally, we should have the same signatures for all the run_sql() database implementations. This will prevent adding explicit conditions for data bricks in other parts of the code that should ideally be database agnostic. example: https://github.com/astronomer/astro-sdk/blob/2f8c8d0ccbff3cc13af78685cbefa39f473991c3/python-sdk/src/astro/sql/operators/raw_sql.py#L47 **Acceptance Criteria** - [ ] Where ever we have used run_sql(), we shouldn't be having any database-specific checks. closes #1664
**Please describe the feature you'd like to see** Currently, the handler param in the run_sql() method is only used in data bricks all other databases are not using it, which leads to different response types since the handler is processed within `run_sql()` for data bricks and not for other databases. Also, the signature of `run_sql()` in data bricks deviates from the base. We need to standardize and when we do, we can remove the below check as well. **Describe the solution you'd like** Ideally, we should have the same signatures for all the run_sql() database implementations. This will prevent adding explicit conditions for data bricks in other parts of the code that should ideally be database agnostic. example: https://github.com/astronomer/astro-sdk/blob/2f8c8d0ccbff3cc13af78685cbefa39f473991c3/python-sdk/src/astro/sql/operators/raw_sql.py#L47 **Acceptance Criteria** - [ ] Where ever we have used run_sql(), we shouldn't be having any database-specific checks. closes #1664
**Please describe the feature you'd like to see** Currently, the handler param in the run_sql() method is only used in data bricks all other databases are not using it, which leads to different response types since the handler is processed within `run_sql()` for data bricks and not for other databases. Also, the signature of `run_sql()` in data bricks deviates from the base. We need to standardize and when we do, we can remove the below check as well. **Describe the solution you'd like** Ideally, we should have the same signatures for all the run_sql() database implementations. This will prevent adding explicit conditions for data bricks in other parts of the code that should ideally be database agnostic. example: https://github.com/astronomer/astro-sdk/blob/2f8c8d0ccbff3cc13af78685cbefa39f473991c3/python-sdk/src/astro/sql/operators/raw_sql.py#L47 **Acceptance Criteria** - [ ] Where ever we have used run_sql(), we shouldn't be having any database-specific checks. closes #1664
Please describe the feature you'd like to see
Currently, the handler param in the run_sql() method is only used in data bricks all other databases are not using it, which leads to different response types since the handler is processed within
run_sql()
for data bricks and not for other databases. Also, the signature ofrun_sql()
in data bricks deviates from the base. We need to standardize and when we do, we can remove the below check as well.Describe the solution you'd like
Ideally, we should have the same signatures for all the run_sql() database implementations. This will prevent adding explicit conditions for data bricks in other parts of the code that should ideally be database agnostic.
example:
astro-sdk/python-sdk/src/astro/sql/operators/raw_sql.py
Line 47 in 2f8c8d0
Acceptance Criteria
The text was updated successfully, but these errors were encountered: