Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connector: SQLite [Source/Destination] #2006

Open
alarbada opened this issue Dec 10, 2024 · 3 comments
Open

Connector: SQLite [Source/Destination] #2006

alarbada opened this issue Dec 10, 2024 · 3 comments
Assignees
Labels
connector:destination Request for a destination connector connector:source Request for a source connector triage Needs to be triaged

Comments

@alarbada
Copy link

Resource name

SQLite

Resource link

https://www.sqlite.org/

Connector type

Source

Expected connector behavior

It should be able to read and write structured data from / to an sqlite file.

SQLite has very rough limitations for the destination connector, as only one single writer is allowed when writing to it. We can however retry the operation a few times and document this behaviour, add retry count parameters, etc.

It's an interesting connector. Apart from the typical RDB connector usecases, it might be useful to have a way to quickly write structured data from any source into a file, and then be able to query it. For that to happen we should support somehow creating tables from the connector schema, which I have never done yet.

My usecase for my pet projects is to have SQLite as a source, and #2004 as a destination, so that I have a better alternative than using the fts5 extension.

@alarbada alarbada added the triage Needs to be triaged label Dec 10, 2024
@alarbada alarbada self-assigned this Dec 10, 2024
@nickchomey
Copy link

nickchomey commented Dec 10, 2024

This is a great idea - SQLite has become enormously popular in the past couple years, and is even being implemented in a distributed manner nowadays through various tools and services.

As far as the single writer goes, if I'm not mistaken, you can use the WAL to improve concurrenecy - though it might only help with concurrent reads and writes, but not multiple writers.

However, batching is surely the best way to make this happen (and thats probably the case for any destination connector) - the destination connector could use goroutines to process the records (if needed), but then just do a single batch write (or a handful of transactions if there's snapshot, create, update, delete records in the batch received from the pipeline - I implemneted something like this in my WIP surrealdb destination connector

You could probably get inspiration (and perhaps even code) from rqlite's bulk writes and queued writes, as well as marmot. Both are golang.

@gedw99
Copy link

gedw99 commented Dec 10, 2024

+1

Would love to have a Sqlite connector.

@hariso hariso removed this from Conduit Main Dec 11, 2024
@hariso
Copy link
Contributor

hariso commented Dec 11, 2024

FYI I've added this (and other connector requests) to our internal connectors' project where we prioritize all connector requests. We'll let you know once we figure when we're going to work on this.

@hariso hariso added connector:destination Request for a destination connector connector:source Request for a source connector labels Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
connector:destination Request for a destination connector connector:source Request for a source connector triage Needs to be triaged
Projects
None yet
Development

No branches or pull requests

4 participants