Skip to content

token-terminal/tt-dbt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tt-dbt

Single binary DBT docker wrapper with Token Terminal configurations.

Install

  1. Download binary from github releases and extract (eg. gzip -d -N ./path/to/downloaded/file) or build binary from source.

  2. Add execution rights for the binary chmod +x /path/to/extracted/binary.

  3. Add binary to PATH eg. sudo mv /path/to/extracted/binary /usr/local/bin

  4. Run tt-dbt test-installation

  5. You can now run DBT with Token Terminal configuration in any DBT folder

Usage

Run DBT commands normally

# Run normal DBT commands
tt-dbt ls -m model_name
tt-dbt run -m tag:temp_tag

tt-dbt sqlfluff lint path/to/model

# Print help usage help
tt-dbt help

Building

Single binary is built using Bun.

Install Bun.

Install dependencies:

bun install

To build single platform:

bun build ./index.ts --minify --compile --sourcemap  --target=bun-darwin-arm64 --outfile ./bin/tt-dbt

To build all platforms:

./build.sh

Automatic releases

Releasing binaries can be done by pushing version tag to repo.

git tag -a v0.1.0 -m "Initial release"
git push origin v0.1.0

Releasing new version of docker runtime.

git tag -a docker/v1.0.0 -m "Initial DBT runtime docker release"
git push origin docker/v1.0.0

Manual release

Example releasing v0.1.0.

./build.sh && gh release create v0.1.0 --title="tt-dbt 0.1.0" --generate-notes ./releases/*.gz