Create HTTP Connection and Import Job to ingest JSON metadata for each workbook
Hi
I'm wondering if it's possible to ingest the RESTJSON structures of every workbook back into a workbook through a HTTP/HTTPS import job.
My Goal:
I want a workbook of every workbook's JSON Structure (to be able to do some meta-data analysis)
What I've tried that does not seem to work:
Connection: Custom Protocol (HTTP/HTTPS)
- Base URL: http://<ipAddress>:<port>/rest/workbook/
Import Jobs:
Path as the Workbook ID
-
Hello,
I believe that we can accomplish your goal, but not without prepping the data in which you'll be ingesting.
I suggest reviewing Datameer's API documentation:
https://documentation.datameer.com/documentation/display/DAS50/Accessing+Datameer+Using+the+REST+API
What I am envisioning is using the Workbook's 'List All' API call to build a file containing all of the Workbook IDs. You'll then iterate through those collected IDs and pass them through the Workbook's 'Read' API call to download the JSON representation for that artifact.
Once you have the JSON files in a reachable location, you can create a Datalink/ImportJob in Datameer to ingest them for analysis.
Cheers!
-
Hi Nikhil,
JSON structures are more strict about values, you may have to edit elements before they can be ingested again in a batch format.
Here is another idea you can explore.
Combine the individual JSONs into a single file, flatten it to a CSV using a tool such as:
http://www.convertcsv.com/json-to-csv.htm
https://github.com/SEL-Columbia/json-to-csv
then, ingest the CSV into an import job.
Please sign in to leave a comment.
Comments
3 comments