Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tableau json format

In Tableau Public's documentation one can read that

A single JSON object cannot exceed 128 MB.

When a single object top-level array exceeds 128 MB, you must convert it to a file where the JSON objects are defined one per line.

When trying to load a (95 MB!) JSON file into Tableau, i get an error:

Tableau encountered a single object larger than 128 MB in the JSON file. Please try again with a smaller JSON file.

My file is one large array in the following format:

[
  {"id":"1389406","updatedDate":"2018-01-31T10:17:31Z","createdDate":"2018-01-31T10:17:31Z","deleted":false,"Ids":["2466958"],"location":{"code":"bibd","name":"Main Library"},"status":{"code":"-","display":"AVAILABLE"},"barcode":"blah blah","callNumber":"TS","itemType":"In-house loan"},
  {"id":"1389406","updatedDate":"2018-01-31T10:17:31Z","createdDate":"2018-01-31T10:17:31Z","deleted":false,"Ids":["2466958"],"location":{"code":"bibd","name":"Main Library"},"status":{"code":"-","display":"AVAILABLE"},"barcode":"blah blah","callNumber":"TS","itemType":"In-house loan"}
...
]

What could i do to make Tableau accept this file?

like image 481
Fontanka16 Avatar asked Oct 16 '22 23:10

Fontanka16


1 Answers

Well, you basically have to do it as the help text stipulates. One JSON object per line. Nothing more. I tried just that, but I forgot to remove the comma (,) i had at the end of every line.

Your file should look like this:

{"id":"1389406","updatedDate":"2018-01-31T10:17:31Z","createdDate":"2018-01-31T10:17:31Z","deleted":false,"Ids":["2466958"],"location":{"code":"bibd","name":"Main Library"},"status":{"code":"-","display":"AVAILABLE"},"barcode":"blah blah","callNumber":"TS","itemType":"In-house loan"}
{"id":"1389406","updatedDate":"2018-01-31T10:17:31Z","createdDate":"2018-01-31T10:17:31Z","deleted":false,"Ids":["2466958"],"location":{"code":"bibd","name":"Main Library"},"status":{"code":"-","display":"AVAILABLE"},"barcode":"blah blah","callNumber":"TS","itemType":"In-house loan"}
like image 62
Fontanka16 Avatar answered Oct 21 '22 07:10

Fontanka16