Expand all | Collapse all

Loading json files into omnisci

  • 1.  Loading json files into omnisci

    Posted 10-31-2019 07:38

    I looked at the data loading options page for OmniSciDB
    I can only see loading "geo" json files as an option? Not sure what that is?
    Is there the capability to automatically load data from a json file such as this directly into a table?  

    {"month": {"0": 6, "1": 6}, "year": {"0": 2019, "1": 2019}, "previousmonth": {"0": 5, "1": 5}, "previousyear": {"0": 2019, "1": 2019}}
    So two row table, with four columns

    Do I need to specify a table structure (create table with all data types for columns) first?


  • 2.  RE: Loading json files into omnisci

    Posted 10-31-2019 07:55
    Hi @Michael Kay

    GeoJSON is a specific format for geospatial data: https://geojson.org/​. We support this because it's a specific standard, as opposed to plain JSON, which may or may not be in a record structure. So for your case, we do not import arbitrary JSON directly. If you want your JSON to look like a relational table, you can use something like pandas in Python to read the JSON into a table, then either write the pandas dataframe to CSV or use pymapd to import the data into OmniSci.

    Randy Zwitch
    Senior Director of Developer Advocacy | OmniSci

  • 3.  RE: Loading json files into omnisci

    Posted 11-01-2019 00:02
    Thanks Randy - I will use Pandas as an intermediary as you say