codeforkjeff / dbt-sqlite

A SQLite adapter plugin for dbt (data build tool)
Apache License 2.0
78 stars 13 forks source link

Use YAML objects instead of colon-separated strings #8

Closed edgarrmondragon closed 3 years ago

edgarrmondragon commented 3 years ago

The use of a colon-separated string can be hard to read when there are more than a few datafiles:

schemas_and_paths: 'main=/my_project/data/main.db;source1=/my_project/data/source1.db;source2=/my_project/data/source2.db'

Using a YAML object should allow users to define the file-schema mapping in a friendlier way:

schemas_and_paths:
  main: /my_project/data/main.db
  source1: /my_project/data/source1.db
  source2: /my_project/data/source2.db

A similar thing happens with SQLite extensions:

extensions:
  - /path/to/sqlite-digest/digest.so

I've tested this locally with pytest test/sqlite.dbtspec and the 9 tests pass.

btw @codeforkjeff, thanks for creating this project!

codeforkjeff commented 3 years ago

Thank you so much for this! This is a really good improvement. Apologies again that it has taken me so long to look at this, I really appreciate your patience.