Skip to content

vdk-ipython: add support for %%vdksql magic command#2619

Merged
antoniivanov merged 6 commits intomainfrom
person/aivanov/vdk-ipython-sql
Sep 1, 2023
Merged

vdk-ipython: add support for %%vdksql magic command#2619
antoniivanov merged 6 commits intomainfrom
person/aivanov/vdk-ipython-sql

Conversation

@antoniivanov
Copy link
Copy Markdown
Contributor

@antoniivanov antoniivanov commented Aug 29, 2023

To provide a seamless user experience for data professionals using VDK
Notebooks for SQL queries. The feature allows them to execute SQL
queries (and VDK SQL steps in the future) right within the notebook, visualize the
results in an interactive grid, and resuse managed SQL connections
through VDK.

Leveraged the ipyaggrid package to display SQL query results in a
user-friendly, interactive grid. Also added auto-initialization for VDK
job and managed its connections for SQL execution. Opted for ipyaggrid
over other options like qgrid due to its flexibility and feature set.
Other evaluated were itables (not as rich), beakers (could not get
it to work), qgrid (could not get it to work)

Ipyaggrid is optional because it's not clear if every notebook installation would support (and vdk-ipython should work not just with jupyterlab or even some versions of jupyterlab may not)

Did minor refactoring. Move all Job control related functionality into vdk.plugin.ipython.job module.
The new SQL functionality is in vdk.plugin.ipython.sql while the registration is kept in vdk.plugin.ipython module (though __init__.py file)

Tested with functional and unit tests. Manual testing was also performed to confirm the user
experience and feature functionality. See attached screenshots and video

ipyaggrid is optional but if it is installed, the grid result would work like this.

image

vdk-ipython-sql.mp4

Without ipyaggrid i looks like :

image

@duyguHsnHsn
Copy link
Copy Markdown
Contributor

What happens with the standard run, currently vdk-run only works with standard python so cells which contain this would automatically fail, please change the vdk-notebook to work with those too if we are really going to provide this as functionality

@duyguHsnHsn
Copy link
Copy Markdown
Contributor

duyguHsnHsn commented Aug 29, 2023

If we are not going to add it as a step now, i would say this might cause a lot of errors since probably the users will try to add it as a step and there will be difference between development and full execution of a job

@antoniivanov
Copy link
Copy Markdown
Contributor Author

If we are not going to add it as a step now, i would say this might cause a lot of errors since probably the users will try to add it as a step and there will be difference between development and full execution of a job

I've specified in the description we are going to support and VDK SQL steps in the future

@antoniivanov
Copy link
Copy Markdown
Contributor Author

If we are not going to add it as a step now, i would say this might cause a lot of errors since probably the users will try to add it as a step and there will be difference between development and full execution of a job

I am not sure that's true. But I do have the change for notebook step ready . But that will be separate Pull Request

@antoniivanov
Copy link
Copy Markdown
Contributor Author

If we are not going to add it as a step now, i would say this might cause a lot of errors since probably the users will try to add it as a step and there will be difference between development and full execution of a job

I am not sure that's true. But I do have the change for notebook step ready . But that will be separate Pull Request

You can see the change in vdk-notebook in #2622

@antoniivanov antoniivanov force-pushed the person/aivanov/ipython branch from 7314215 to 8e7e3d3 Compare August 29, 2023 19:27
@duyguHsnHsn
Copy link
Copy Markdown
Contributor

Please add the changes to the README of the plugin and also include a simple example there

@antoniivanov antoniivanov force-pushed the person/aivanov/ipython branch from a75a0fb to 5b97791 Compare August 30, 2023 11:16
Base automatically changed from person/aivanov/ipython to main August 30, 2023 11:21
@antoniivanov antoniivanov force-pushed the person/aivanov/vdk-ipython-sql branch from f8af977 to 99793d4 Compare August 30, 2023 17:15
antoniivanov added a commit that referenced this pull request Aug 31, 2023
vdk run now would recognize %%vdksql cell as steps and execute them and
SQL steps.

This is a continuation of
#2619
@antoniivanov antoniivanov force-pushed the person/aivanov/vdk-ipython-sql branch from f749848 to badacaa Compare August 31, 2023 15:08
antoniivanov and others added 6 commits September 1, 2023 13:25
To provide a seamless user experience for data professionals using VDK
Notebooks for SQL queries. The feature allows them to execute SQL
queries (and VDK SQL steps) right within the notebook, visualize the
results in an interactive grid, and resuse managed SQL connections
through VDK."qgrid",

Leveraged the ipyaggrid package to display SQL query results in a
user-friendly, interactive grid. Also added auto-initialization for VDK
job and managed its connections for SQL execution. Opted for ipyaggrid
over other options like qgrid due to its flexibility and feature set.
Other evaluated were  `itables` (not as rich), `beakerx` (could not get
it to work), `qgrid` (could not get it to work)

Unit tests.  Manual testing was also performed to confirm the user
experience and feature functionality. See attached screenshots.
To provide a seamless user experience for data professionals using VDK
Notebooks for SQL queries. The feature allows them to execute SQL
queries (and VDK SQL steps) right within the notebook, visualize the
results in an interactive grid, and resuse managed SQL connections
through VDK."qgrid",

Leveraged the ipyaggrid package to display SQL query results in a
user-friendly, interactive grid. Also added auto-initialization for VDK
job and managed its connections for SQL execution. Opted for ipyaggrid
over other options like qgrid due to its flexibility and feature set.
Other evaluated were  `itables` (not as rich), `beakerx` (could not get
it to work), `qgrid` (could not get it to work)

Unit tests.  Manual testing was also performed to confirm the user
experience and feature functionality. See attached screenshots.
To provide a seamless user experience for data professionals using VDK
Notebooks for SQL queries. The feature allows them to execute SQL
queries (and VDK SQL steps) right within the notebook, visualize the
results in an interactive grid, and resuse managed SQL connections
through VDK."qgrid",

Leveraged the ipyaggrid package to display SQL query results in a
user-friendly, interactive grid. Also added auto-initialization for VDK
job and managed its connections for SQL execution. Opted for ipyaggrid
over other options like qgrid due to its flexibility and feature set.
Other evaluated were  `itables` (not as rich), `beakerx` (could not get
it to work), `qgrid` (could not get it to work)

Unit tests.  Manual testing was also performed to confirm the user
experience and feature functionality. See attached screenshots.
To provide a seamless user experience for data professionals using VDK
Notebooks for SQL queries. The feature allows them to execute SQL
queries (and VDK SQL steps) right within the notebook, visualize the
results in an interactive grid, and resuse managed SQL connections
through VDK."qgrid",

Leveraged the ipyaggrid package to display SQL query results in a
user-friendly, interactive grid. Also added auto-initialization for VDK
job and managed its connections for SQL execution. Opted for ipyaggrid
over other options like qgrid due to its flexibility and feature set.
Other evaluated were  `itables` (not as rich), `beakerx` (could not get
it to work), `qgrid` (could not get it to work)

Unit tests.  Manual testing was also performed to confirm the user
experience and feature functionality. See attached screenshots.
@antoniivanov antoniivanov force-pushed the person/aivanov/vdk-ipython-sql branch from badacaa to 23eff68 Compare September 1, 2023 10:25
@antoniivanov antoniivanov merged commit fdc2f68 into main Sep 1, 2023
@antoniivanov antoniivanov deleted the person/aivanov/vdk-ipython-sql branch September 1, 2023 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants