Sling
Slingdata.ioBlogGithubHelp!
  • Introduction
  • Sling CLI
    • Installation
    • Environment
    • Running Sling
    • Global Variables
    • CLI Pro
  • Sling Platform
    • Sling Platform
      • Architecture
      • Agents
      • Connections
      • Editor
      • API
      • Deploy from CLI
  • Concepts
    • Replications
      • Structure
      • Modes
      • Source Options
      • Target Options
      • Columns
      • Transforms
      • Runtime Variables
      • Tags & Wildcards
    • Hooks / Steps
      • Check
      • Command
      • Copy
      • Delete
      • Group
      • Http
      • Inspect
      • List
      • Log
      • Query
      • Replication
      • Store
      • Read
      • Write
    • Pipelines
    • Data Quality
      • Constraints
  • Examples
    • File to Database
      • Custom SQL
      • Incremental
    • Database to Database
      • Custom SQL
      • Incremental
      • Backfill
    • Database to File
      • Incremental
    • Sling + Python 🚀
  • Connections
    • Database Connections
      • Athena
      • BigTable
      • BigQuery
      • Cloudflare D1
      • Clickhouse
      • Databricks
      • DuckDB
      • DuckLake
      • Iceberg
      • MotherDuck
      • MariaDB
      • MongoDB
      • Elasticsearch
      • MySQL
      • Oracle
      • Postgres
      • Prometheus
      • Proton
      • Redshift
      • S3 Tables
      • StarRocks
      • SQLite
      • SQL Server
      • Snowflake
      • Trino
    • Storage Connections
      • AWS S3
      • Azure Storage
      • Backblaze B2
      • Cloudflare R2
      • DigitalOcean Spaces
      • FTP
      • Google Drive
      • Google Storage
      • Local Storage
      • Min.IO
      • SFTP
      • Wasabi
Powered by GitBook
On this page
  • Setup
  • Using sling conns
  • Environment Variable
  • Sling Env File YAML
  • Specifying a SQLite Binary Path
  1. Connections
  2. Database Connections

SQLite

Connect & Ingest data from / to a SQLite database

Setup

The following credentials keys are accepted:

  • instance (required) -> The local file path, HTTP or S3 url of the database file

  • access_key_id (optional) -> The Access Key ID to access the bucket (if providing a S3 url)

  • secret_access_key (optional) -> The Secret Key to access the bucket (if providing a S3 url)

  • endpoint (optional) -> The S3 endpoint hostname for non-AWS providers (if providing a S3 url). Examples: nyc3.digitaloceanspaces.com, a345678c73f3e8bddd084cb125876543.r2.cloudflarestorage.com, etc.

Using sling conns

Here are examples of setting a connection named SQLITE. We must provide the type=sqlite property:

# for local files 
$ sling conns set SQLITE type=sqlite instance=/path/to/file.db

# for local files (Windows), don't use backslash (\)
$ sling conns set SQLITE type=sqlite instance=C:/path/to/file.db

# for HTTP 
$ sling conns set SQLITE_HTTP type=sqlite instance=https://<url>

# for S3
$ sling conns set SQLITE_S3 type=sqlite instance=s3://<bucket>/<key> access_key_id=<access_key_id> secret_access_key=<secret_access_key>

# Or use url (only for local files)
$ sling conns set SQLITE url="sqlite:///path/to/file.db"

# url for Windows, don't use backslash (\)
$ sling conns set SQLITE url="sqlite://C:/path/to/file.db"

Environment Variable

export SQLITE='sqlite:///path/to/file.db'
export SQLITE='{ type: sqlite, instance: "/path/to/file.db" }'

$env:SQLITE="sqlite://C:/path/to/file.db" # For Windows PowerShell

Sling Env File YAML

connections:
  SQLITE:
    type: sqlite
    instance: <instance>

Specifying a SQLite Binary Path

If you already have SQLite on your machine and would like to use it (instead of having Sling download it), you can specify the binary path this way:

export SQLITE_PATH='/opt/homebrew/bin/sqlite'
PreviousStarRocksNextSQL Server

Last updated 1 month ago

See to learn more about the sling env.yaml file.

If you are facing issues connecting, please reach out to us at , on or open a Github Issue .

here
support@slingdata.io
discord
here