jupysql
jupysql copied to clipboard
SqlMagic.autolimit doesn't add a limit clause to the query
What happens?
We're using jupysql to query a trino cluster through jupyter notebook. I want to autolimit the query results that we query to the cluster, as it's intended to be used for an interactive analytics workload.
I expect the SqlMagic.autolimit to add a LIMIT clause to the query, but it doesn't, i can see the original query in the Trino Admin UI.
To Reproduce
- Create a trino sqlalchemy connection.
trino_connection = create_engine("trino://trino_cluster....")
- set an autolimit.
%config SqlMagic.autolimit=500
- Use the connection:
%sql trino_connection
- Run a query:
%sql SELECT * FROM BIG_TABLE
- Get the result sets or See the query in the trino UI. You'll get the
SELECT * FROM BIG_TABLE
without the LIMIT Clause
OS:
Linux
JupySQL Version:
0.10.10
Full Name:
Takieddine KADIRI
Affiliation:
Société Générale Assurances