Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-1285

Use of URLs to retrieve JSON data

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.4.0
    • Future
    • Storage - JSON
    • None

    Description

      Since there are a few databases (MongoDB ,CouchDB) that produce JSON via ReST APIs, and a host of other APIs too, it would be nice to have them as data sources.

      Some examples:

      1. CouchDB: a request like:
        curl -X GET "http://127.0.0.1:5984/drinks/_design/drinks/_view/byName"
        may generate:
        {"total_rows":4,"offset":0,"rows":[
        {"id":"3b510371b46c2f20cd7d72a527007e2a","key":"angler's cocktail","value":"Angler's Cocktail"},
        {"id":"3b510371b46c2f20cd7d72a52700af45","key":"manhattan","value":"Manhattan"},
        {"id":"3b510371b46c2f20cd7d72a527008dd5","key":"martini","value":"Martini"},
        {"id":"3b510371b46c2f20cd7d72a527009c27","key":"old fashioned","value":"Old Fashioned"}
        ]}
      2. A WFS query like:
        curl -X GET "https://geosrv.aurin.org.au/geoserver/grattan/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=grattan:Grattan_Employ_Inc2011&maxFeatures=50&outputFormat=json&propertyName=SSC_NAME,SSC2011"
        may generate:
        {
            "type": "FeatureCollection",
            "features": [
                {
                    "type": "Feature",
                    "id": "Grattan_Employ_Inc2011.1",
                    "geometry": null,
                    "properties": {
                        "SSC_NAME": "Abbotsbury",
                        "SSC2011": 10001
                    }
                },
                {
                    "type": "Feature",
                    "id": "Grattan_Employ_Inc2011.2",
                    "geometry": null,
                    "properties": {
                        "SSC_NAME": "Abbotsford (NSW)",
                        "SSC2011": 10002
                    }
                },
                {
                    "type": "Feature",
                    "id": "Grattan_Employ_Inc2011.3",
                    "geometry": null,
                    "properties": {
                        "SSC_NAME": "Abercrombie",
                        "SSC2011": 10003
                    }
                },
                {
                    "type": "Feature",
                    "id": "Grattan_Employ_Inc2011.4",
                    "geometry": null,
                    "properties": {
                        "SSC_NAME": "Aberdare",
                        "SSC2011": 10004
                    }
                },
                {
                    "type": "Feature",
                    "id": "Grattan_Employ_Inc2011.5",
                    "geometry": null,
                    "properties": {
                        "SSC_NAME": "Aberdeen (NSW)",
                        "SSC2011": 10005
                    }
                },
                {
                    "type": "Feature",
                    "id": "Grattan_Employ_Inc2011.50",
                    "geometry": null,
                    "properties": {
                        "SSC_NAME": "Argents Hill",
                        "SSC2011": 10050
                    }
                }
            ]
        }

      Attachments

        Activity

          People

            Unassigned Unassigned
            lmorandini Luca Morandini
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: