magicanded

magicanded / algosqlite / 0.2.4

algosqlite - SQLite Database for Algorithmia

1 Credit Royalty API Calls - 28
SQLite JDBC Driver for using SQLite databases on Algorithmia.
Permissions
The Algorithm Platform License is the set of terms that are stated in the Software License section of the Algorithmia Application Developer and API License Agreement. It is intended to allow users to reserve as many rights as possible without limiting Algorithmia's ability to run it as a service. Learn More

Run an Example

Input
Output
"{\"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\"}}"

Install and Use

Install

Install the Algorithmia CLI client by running:

curl -sSLf https://algorithmia.com/install.sh | sh

Then authenticate by running:

algo auth
# Enter API Key: YOUR_API_KEY
CLI Install Docs

Use



algo run magicanded/algosqlite/0.2.4 -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": [
      ]
    }
  ]
}'
  
CLI Docs