[MDEV-15535] CONNECT JSON Table Type Created: 2018-03-10  Updated: 2018-03-13  Resolved: 2018-03-13

Status: Closed
Project: MariaDB Server
Component/s: Documentation, Storage Engine - Connect
Affects Version/s: 10.2.13
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Eduardo Reyes Assignee: Ian Gilfillan
Resolution: Fixed Votes: 0
Labels: connect-engine
Environment:

mariadb v10.2.13
CONNECT v1.06.0005
openSUSE Leap 42.3 x64
4GB RAM, 2 CPUs, 40GB HDD Virtual Machine on ESXi6


Issue Links:
Relates
relates to MDEV-15521 CONNECT XML Table Type Open

 Description   

I have found a couple of issues on webpage https://mariadb.com/kb/en/library/connect-json-table-type/

Section: Alternate Table Arrangement
[
[56, "Coucou", 500.00],
[[2,0,1,4], "Hello World", 2.0316],
["1784", "John Doo", 32.4500],
[1914, ["Nabucho","donosor"], 5.12],
[7, "sept", [0.77,1.22,2.01]],
[8, "huit", 13.0],
]

insert into xjson values(25, 'Breakfast', 1.414);
Returns: SQL Error (1296): Got error 174 'Unexpected ',]' near ],' from CONNECT

Solution: Remove comma after the last JSON item [8, "huit", 13.0]

Section: CRUD operations on JSON tables
CREATE TABLE jauthor (
FIRSTNAME CHAR(64),
LASTNAME CHAR(64))
ENGINE=CONNECT table_type= JSON File_name='biblio3.json' option_list='Object=2.AUTHOR';

select * from jauthor;
Returns: SQL Error (1296): Got error 174 'Cannot find array value 2' from CONNECT

Solution: Either option_list='Object=1.AUTHOR' or option_list='Object=2.AUTHOR, Base=1'



 Comments   
Comment by Ian Gilfillan [ 2018-03-13 ]

bertrandop FYI - fixed in the online docs.

Generated at Thu Feb 08 08:22:03 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.