algosqlite - SQLite Database for Algorithmia

SQLite JDBC Driver for using SQLite databases on Algorithmia.

(no tags)

Algorithmia Platform License
apl

Run an Example

Copy
Copy
"{\"isError\":false,\"errorMessage\":\"Running SQL is completed successfully!\",\"errorCode\":\"Success\",\"results\":{\"outputFile\":\"data://.algo/magicanded/algosqlite/temp/algosqlite-output3034687057958228041.json\",\"outputFileUrl\":\"https://algorithmia.com/v1/data/.algo%2Fmagicanded%2Falgosqlite%2Ftemp%2Falgosqlite-output3034687057958228041.json\"}}"
Running algorithm...

Install & Use

Use

curl -X POST -d '{
  "dbFile": "data://.algo/temp/db001.sqlite",
  "sqlList": [
    {
      "sql": "CREATE TABLE `person` (code VARCHAR(36) NOT NULL PRIMARY KEY, first_name VARCHAR(100) NOT NULL, last_name VARCHAR(100) NOT NULL)",
      "action": "execute",
      "parameters": [
      ]
    },
    {
      "sql": "INSERT INTO `person` (code, first_name, last_name) VALUES (?, ?, ?)",
      "action": "execute",
      "parameters": [
        {
          "type": "string",
          "value": "234567"
        },
        {
          "type": "string",
          "value": "John"
        },
        {
          "type": "string",
          "value": "Smith"
        }
      ]
    },
    {
      "sql": "SELECT * FROM `person`",
      "action": "query",
      "parameters": [
      ]
    }
  ]
}' -H 'Content-Type: application/json' -H 'Authorization: Simple YOUR_API_KEY' https://api.algorithmia.com/v1/algo/magicanded/algosqlite/0.2.4