QQ - How do I load JSON data into Datajet?
  • 1 Minute to read
  • Dark
    Light
  • PDF

QQ - How do I load JSON data into Datajet?

  • Dark
    Light
  • PDF

Article summary

Use the CreateTableFromJSON method.  Use primer to tell the method which data to load.

{
  "method": "CreateTableFromJSON",
  "filename": "%DATAPATH%Demo_Modelling/BikeOverview/BikePoints.JSON",
  "fileIsArray": true,
  "table": "BikePoints",
  "primer": {
    "id": "BikePoints_254",
    "commonName": "Chadwell Street, Angel",
    "placeType": "BikePoint",
    "lat": 51.530515,
    "lon": -0.106408
  },
  "project": "Model1"
}

Sample Data:

{
"$type":"Tfl.Api.Presentation.Entities.Place, Tfl.Api.Presentation.Entities",
"id":"BikePoints_254",
"url":"/Place/BikePoints_254",
"commonName":"Chadwell Street, Angel",
"placeType":"BikePoint",
"additionalProperties":[
{"$type":"Tfl.Api.Presentation.Entities.AdditionalProperties, Tfl.Api.Presentation.Entities","category":"Description","key":"TerminalName","sourceSystemKey":"BikePoints","value":"003471","modified":"2022-09-21T11:42:02.45Z"},
{"$type":"Tfl.Api.Presentation.Entities.AdditionalProperties, Tfl.Api.Presentation.Entities","category":"Description","key":"Installed","sourceSystemKey":"BikePoints","value":"true","modified":"2022-09-21T11:42:02.45Z"},
{"$type":"Tfl.Api.Presentation.Entities.AdditionalProperties, Tfl.Api.Presentation.Entities","category":"Description","key":"Locked","sourceSystemKey":"BikePoints","value":"false","modified":"2022-09-21T11:42:02.45Z"},
{"$type":"Tfl.Api.Presentation.Entities.AdditionalProperties, Tfl.Api.Presentation.Entities","category":"Description","key":"InstallDate","sourceSystemKey":"BikePoints","value":"1279704540000","modified":"2022-09-21T11:42:02.45Z"},
{"$type":"Tfl.Api.Presentation.Entities.AdditionalProperties, Tfl.Api.Presentation.Entities","category":"Description","key":"RemovalDate","sourceSystemKey":"BikePoints","value":"","modified":"2022-09-21T11:42:02.45Z"},
{"$type":"Tfl.Api.Presentation.Entities.AdditionalProperties, Tfl.Api.Presentation.Entities","category":"Description","key":"Temporary","sourceSystemKey":"BikePoints","value":"false","modified":"2022-09-21T11:42:02.45Z"},
{"$type":"Tfl.Api.Presentation.Entities.AdditionalProperties, Tfl.Api.Presentation.Entities","category":"Description","key":"NbBikes","sourceSystemKey":"BikePoints","value":"3","modified":"2022-09-21T11:42:02.45Z"},
{"$type":"Tfl.Api.Presentation.Entities.AdditionalProperties, Tfl.Api.Presentation.Entities","category":"Description","key":"NbEmptyDocks","sourceSystemKey":"BikePoints","value":"15","modified":"2022-09-21T11:42:02.45Z"},
{"$type":"Tfl.Api.Presentation.Entities.AdditionalProperties, Tfl.Api.Presentation.Entities","category":"Description","key":"NbDocks","sourceSystemKey":"BikePoints","value":"18","modified":"2022-09-21T11:42:02.45Z"},
{"$type":"Tfl.Api.Presentation.Entities.AdditionalProperties, Tfl.Api.Presentation.Entities","category":"Description","key":"NbStandardBikes","sourceSystemKey":"BikePoints","value":"3","modified":"2022-09-21T11:42:02.45Z"},
{"$type":"Tfl.Api.Presentation.Entities.AdditionalProperties, Tfl.Api.Presentation.Entities","category":"Description","key":"NbEBikes","sourceSystemKey":"BikePoints","value":"0","modified":"2022-09-21T11:42:02.45Z"}
],
"children":[],
"childrenUrls":[],
"lat":51.530515,
"lon":-0.106408
},

Loaded Data:



Was this article helpful?