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
      • DuckDB
      • DuckLake
      • MotherDuck
      • MariaDB
      • MongoDB
      • Elasticsearch
      • MySQL
      • Oracle
      • Postgres
      • Prometheus
      • Proton
      • Redshift
      • 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
  1. Connections
  2. Database Connections

Cloudflare D1

Connect & Ingest data from / to a Cloudflare D1 database

Setup

The following credentials keys are accepted:

  • account_id (required) -> The Cloudflare account ID

  • api_token (required) -> The API Token to access D1 resources

  • database (required) -> The database name (not UUID)

  • insert_concurrency (optional) -> The max number of concurrent requests when inserting data. Default is 50.

Using sling conns

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

# for local files 
$ sling conns set D1 type=d1 account_id=<account_id> api_token=<api_token> database=<database>

# Or use url
$ sling conns set D1 url="d1://any_user:<api_token>@<account_id>/<database>"

Environment Variable

export D1='d1://any_user:<api_token>@<account_id>/<database>'
export D1='{ type: d1, api_token: "<api_token>", account_id: "<account_id>", database: "<database>" }'

$env:D1="d1://any_user:<api_token>@<account_id>/<database>" # For Windows PowerShell

Sling Env File YAML

connections:
  D1:
    type: d1
    account_id: <account_id>
    api_token: <api_token>
    database: <database>
    insert_concurrency: 100
PreviousBigQueryNextClickhouse

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