Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,13 @@ Even more queries can be found [here](https://colab.research.google.com/github/R

# Latest updates

## Version 2.0.0
- Aligned on the brand new RumbleDB 2.0 release.
- Improved display of pandas dataframes output with -pdf in Jupyter notebooks.
- if error info is activated in the configuration, then they are now printed in the notebook.
- JSON nulls are now by default conflated with absent upon validating for dataframe output, this can be deactivated in the configuration.
- The materialization error upon df/pdf output is now fixed.

## Version 2.0.0 alpha 1
- When returning a single-column DataFrame with atomic values, the name is now __value and not value to avoid collisions with user-defined columns.
- Improved schema inferrence: DataFrames can be returned in a wider range of cases.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "jsoniq"
version = "2.0.0a1"
version = "2.0.0"
description = "Python edition of RumbleDB, a JSONiq engine"
requires-python = ">=3.11"
dependencies = [
Expand Down
Binary file modified src/jsoniq/jars/rumbledb-2.0.0.jar
Binary file not shown.
35 changes: 25 additions & 10 deletions src/jsoniqmagic/magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,20 @@ def run(self, line, cell=None, timed=False):
try:
df = response.df();
except Py4JJavaError as e:
print(e.java_exception.getMessage())
if rumble.getRumbleConf().getShowErrorInfo() :
raise e;
else:
print(e.java_exception.getMessage())
return
except Exception as e:
print("Query unsuccessful.")
print("Usual reasons: firewall, misconfigured proxy.")
print("Error message:")
print(e.args[0])
return
if rumble.getRumbleConf().getShowErrorInfo() :
raise e;
else:
print("Query unsuccessful.")
print("Usual reasons: firewall, misconfigured proxy.")
print("Error message:")
print(e.args[0])
return
except:
print("Query unsuccessful.")
print("Usual reasons: firewall, misconfigured proxy.")
Expand All @@ -89,7 +95,10 @@ def run(self, line, cell=None, timed=False):
try:
pdf = response.pdf()
except Py4JJavaError as e:
print(e.java_exception.getMessage())
if rumble.getRumbleConf().getShowErrorInfo() :
raise e;
else:
print(e.java_exception.getMessage())
return
except Exception as e:
print("Query unsuccessful.")
Expand All @@ -102,14 +111,17 @@ def run(self, line, cell=None, timed=False):
print("Usual reasons: firewall, misconfigured proxy.")
return
if pdf is not None:
print(pdf)
return pdf

if (args.apply_updates):
if ("PUL" in response.availableOutputs()):
try:
response.applyPUL()
except Py4JJavaError as e:
print(e.java_exception.getMessage())
if rumble.getRumbleConf().getShowErrorInfo() :
raise e;
else:
print(e.java_exception.getMessage())
return
except Exception as e:
print("Query unsuccessful.")
Expand All @@ -129,7 +141,10 @@ def run(self, line, cell=None, timed=False):
try:
capplusone = response.take(rumble.getRumbleConf().getResultSizeCap() + 1)
except Py4JJavaError as e:
print(e.java_exception.getMessage())
if rumble.getRumbleConf().getShowErrorInfo() :
raise e;
else:
print(e.java_exception.getMessage())
return
except Exception as e:
print("Query unsuccessful.")
Expand Down