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

[Feature] Need robust in memory solution for lite weight unit testing #10070

Closed
3 tasks done
DustinMoriarty opened this issue May 1, 2024 · 4 comments
Closed
3 tasks done
Labels
enhancement New feature or request wontfix Not a bug or out of scope for dbt-core

Comments

@DustinMoriarty
Copy link

DustinMoriarty commented May 1, 2024

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

dbt-sqlite is in need of a maintainer (codeforkjeff/dbt-sqlite#48). While most production use cases would not use sqlite, having an in memory database solution is crucial for any form of local unit testing and development using dbt, especially for software that extends dbt-core itself.

Usually, when unit testing code involving DBT, the actual SQL and SQL backend is trivial. Sometimes interfaces can be mocked entirely. However, a lot of times there are local integration tests which test multiple components together yet are not intended to really test the actual SQL very much and are instead intended to make sure that DBT commands like run, compile, list, etc. work with the software. I suggest that DBT Labs really should step in to assist with the stability of the dbt-sqlite project.

In addition, for docs and demos on DBT functionality, an in memory solution that can be installed with python requirements only is much more portable and easy for people to implement. Demo setup can be a few lines of pip install.

Describe alternatives you've considered

We used to use dbt-sqlite for local testing of our systems pertaining to DBT itself. However, we now have to use more complex solutions with an actual database because dbt-sqlite is out of date. This means managing credentials and allowing IO in places where we usually avoid this type of thing. In some of these cases we don't actually allow traffic to or from the public internet at all because those systems are made for building code and we block all public internet traffic in our build system due to supply chain security concerns. No one wants to have to install PostgreSQL in a transient container just to run unit tests on code that has very little to do with an actual database.

Who will this benefit?

This will benifet dbt-labs and it's customers because it will be easier to locally demo, develop and test DBT commands.

Are you interested in contributing this feature?

yes

Anything else?

I think that the community can help to maintain dbt-sqlite. However, DBT Labs should step in to lead maintenance so that we can count on a stable project moving forward.

@DustinMoriarty DustinMoriarty added enhancement New feature or request triage labels May 1, 2024
@dbeatty10
Copy link
Contributor

Thanks for reaching out @DustinMoriarty.

Is your ask here that dbt Labs takes over maintainership of the dbt-sqlite adapter?

@DustinMoriarty
Copy link
Author

Thanks for reaching out @DustinMoriarty.

Is your ask here that dbt Labs takes over maintainership of the dbt-sqlite adapter?

@dbeatty10 : Yes that would be the most likely solution that I can see if the current maintainer is interested, which sounds pretty likely.

@Fleid
Copy link
Contributor

Fleid commented May 2, 2024

@DustinMoriarty have you considered using DuckDB the same way you are using SQLite now?

@dbeatty10
Copy link
Contributor

dbeatty10 commented May 2, 2024

After discussing further with @Fleid and @amychen1776, we don't have the capacity to take on additional adapters at this time, so I'm going to close this as not planned.

It looks like there is some traction in codeforkjeff/dbt-sqlite#48 for folks that are interested in maintaining dbt-sqlite.

An alternative for users looking for a dbt adapter that supports in-memory usage can take a look at dbt-duckdb which is actively maintained.

@dbeatty10 dbeatty10 closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2024
@dbeatty10 dbeatty10 added wontfix Not a bug or out of scope for dbt-core and removed triage labels May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix Not a bug or out of scope for dbt-core
Projects
None yet
Development

No branches or pull requests

3 participants