We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f513b4 commit 875a24bCopy full SHA for 875a24b
1 file changed
tests/iterator_bug.py
@@ -0,0 +1,23 @@
1
+from jsoniq import RumbleSession
2
+from unittest import TestCase
3
+import json
4
+class TryTesting(TestCase):
5
+ def test1(self):
6
+ # The syntax to start a session is similar to that of Spark.
7
+ # A RumbleSession is a SparkSession that additionally knows about RumbleDB.
8
+ # All attributes and methods of SparkSession are also available on RumbleSession.
9
+ rumble = RumbleSession.builder.appName("PyRumbleExample").getOrCreate();
10
+ # A more complex, standalone query
11
+
12
+ seq = rumble.jsoniq("""
13
+ %%jsoniq
14
+ max(
15
+ let $path := "http://www.rumbledb.org/samples/git-archive-small.json"
16
+ for $event in json-lines($path)
17
+ return 1
18
+ )
19
+ """);
20
21
+ expected = (1)
22
23
+ self.assertTrue(json.dumps(seq.json()) == json.dumps(expected))
0 commit comments