Skip to content
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

truncated message does not appear in the terminal #682

Closed
edublancas opened this issue Jun 28, 2023 · 2 comments · Fixed by #802
Closed

truncated message does not appear in the terminal #682

edublancas opened this issue Jun 28, 2023 · 2 comments · Fixed by #802
Labels
bug Something isn't working good first issue Good for newcomers stash Label used to categorize issues that will be worked on next

Comments

@edublancas
Copy link

we truncate results to 10 by default and show a message in Jupyter to let the user know. However, this message is not implemented in the text-based view, which is rendered when running jupysql in the terminal (the __repr__ method)

In [1]: %load_ext sql

In [2]: %sql duckdb://

In [3]: %sql select * from penguins.csv
Running query in 'duckdb://'
Out[3]:
+---------+-----------+----------------+---------------+-------------------+-------------+--------+
| species |   island  | bill_length_mm | bill_depth_mm | flipper_length_mm | body_mass_g |  sex   |
+---------+-----------+----------------+---------------+-------------------+-------------+--------+
|  Adelie | Torgersen |      39.1      |      18.7     |        181        |     3750    |  MALE  |
|  Adelie | Torgersen |      39.5      |      17.4     |        186        |     3800    | FEMALE |
|  Adelie | Torgersen |      40.3      |      18.0     |        195        |     3250    | FEMALE |
|  Adelie | Torgersen |      None      |      None     |        None       |     None    |  None  |
|  Adelie | Torgersen |      36.7      |      19.3     |        193        |     3450    | FEMALE |
|  Adelie | Torgersen |      39.3      |      20.6     |        190        |     3650    |  MALE  |
|  Adelie | Torgersen |      38.9      |      17.8     |        181        |     3625    | FEMALE |
|  Adelie | Torgersen |      39.2      |      19.6     |        195        |     4675    |  MALE  |
|  Adelie | Torgersen |      34.1      |      18.1     |        193        |     3475    |  None  |
|  Adelie | Torgersen |      42.0      |      20.2     |        190        |     4250    |  None  |
+---------+-----------+----------------+---------------+-------------------+-------------+--------+
@edublancas edublancas added bug Something isn't working good first issue Good for newcomers stash Label used to categorize issues that will be worked on next labels Jun 28, 2023
@tl3119
Copy link

tl3119 commented Jun 29, 2023

How do we test this in terminal?

@edublancas
Copy link
Author

run ipython and you'll start the shell:

> ipython
Python 3.11.3 (main, May 15 2023, 18:01:31) [Clang 14.0.6 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.14.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]:

then you can run the snippet I showed above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers stash Label used to categorize issues that will be worked on next
Projects
None yet
2 participants