Skip to main content

d-blocks Logo

d-blocks: Bringing Teradata Code Under Control

Overview

d-blocks is a open-source framework designed to bring Teradata database code under Git-based version control while seamlessly integrating with modern CI/CD processes. With d-blocks, organizations of all sizes--from large enterprises to smaller teams--can standardize and automate their daily database code workflows.

Why d-blocks?

🚀 Gain full control over your Teradata DDLs by leveraging Git as the single source of truth.
🔄 Synchronize Git branches with Teradata environments (development, testing, production).
📦 Deploy safely from Git to database environments with various deployment strategies, including incremental changes and rollback options.
⚖️ Compare environments and Git versions to track changes and resolve discrepancies efficiently.
🤖 Automate package creation and deployments, making release management easier.
🌍 Leverage best practices and lessons learned from global teams to improve your database development workflows.

d-blocks is not just a tool--it's a community-driven initiative that continuously evolves to incorporate the best strategies for database source control and release management.

Visit Detail Use Cases section to understand where d-blocks can support your team!

Documentation

Below are additional sections covering various aspects of d-blocks:


Quick Start

1. Prerequisites

Before installing d-blocks, ensure you have the following:

  • Python 3.11+ installed (Download Python)
  • Access to a Teradata database (e.g., local VM, cloud, or on-prem)

2. Installation

Install d-blocks-core using pip:

pip install -U d-blocks-core

3. Clone Demo Repository

To ensure a smooth testing experience, clone our demo project repository, which contains a small data warehouse definition, including:

  • DDL scripts to initialize the environment
  • DDL scripts for database objects (tables, views, indexes, etc.)

Clone the repository using Git client:

git clone https://github.com/d-blocks/d-blocks-demo.git

Alternatively, you can download the repository as a ZIP file from GitHub, but we encourage users to use Git client for better version control and easy updates.

4. Configure and Test the Utility

After cloning the demo repository, configure and test the utility by following these steps:

Edit the Configuration File

  1. Navigate to the directory where you cloned the demo repository:
    cd d-blocks-demo
    
  2. Locate the configuration file dblocks.toml in the root directory and edit it.
  3. The configuration file looks like this:
    config_version = "1.0.0"
    
    # Configuration for our demo environment called d-blocks-demo
    [ environments.d-blocks-demo ]
    
    # Set authentication info for your machine
    host = "your_machine_host"
    username = "your_user"
    password = "your_password"        # We keep password here for demo purposes.
                                      # It is strongly recommended to define user 
                                      # password via environment variable.
    
    extraction.databases = [ "dev_admin" ]   # This is the root database - under 
                                             # it, we create the demo environment
    git_branch = "master"
    writer.target_dir="./teradata-code"
    tagging_rules = [ "{{env}}%" ]
    
    # Code in Git is typically environment agnostic - it does not contain 
    # any specific environment values like database prefixes. Based on 
    # tagging_rules, we replace any database prefix "dev" with {{env}}
    # and contrary once deploying agnostic code from Git to d-blocks-demo
    # environment we replace {{env}} by "dev" value.
    [ environments.d-blocks-demo.tagging_variables ]
    env = "dev"
    
  4. Follow the instructions in the configuration file and fill in the correct host name, user name, and database password.

Test the Configuration and Database Connection

Once you've updated the configuration, verify that everything is set up correctly:

d-bee cfg-check
d-bee env-test-connection d-blocks-demo

If these commands run successfully, your environment is ready to use d-blocks for database management.

5. Basic Usage

The demo project contains script (env-init/demo_env_init.sql) that will create database structures in demo environment under demo_user database. Once staying in root folder of demo project run the follwoing initilization:

d-bee quickstart

Deploy database structures from Git to your environment:

d-bee env-deploy --if-extsts drop dev

Synchronize Git with your development Teradata environment:

d-bee env-extract dev

For more details, visit the User Guidelines.


Typical Use Cases

d-blocks helps projects solve common database source control and deployment challenges, including:

  • Version-controlling Teradata code and integrating it into existing Git workflows.
  • Managing multiple environments (development, testing, production) and ensuring consistency.
  • Deploying incremental changes while minimizing risks.
  • Comparing database states across environments and branches.
  • Automating routine database deployment processes with CI/CD pipelines.

Visit Detail Use Cases section to understand more!


📢 Join the Community!
💬 Connect with us on Slack, contribute on GitHub, and help shape the future of d-blocks!

Release files for d-blocks-core 0.9.3.43

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for d-blocks-core 0.9.3.43
File Size Uploaded
d_blocks_core-0.9.3.43.tar.gz 107.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for d-blocks-core 0.9.3.43
File Interpreter ABI Platform
d_blocks_core-0.9.3.43-py3-none-any.whl Python 3 none any Details

Total release size: 235.2 kB

Release files / d_blocks_core-0.9.3.43.tar.gz

Download URL d_blocks_core-0.9.3.43.tar.gz
Size 107.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8473f3fee7289bd717875ec1cea98ee271d13abbd36947f9de926ca4d3d37676
BLAKE2b-256 checksum
How to use checksums
6aeff35cc7a9ea55794f3c0c70edfc0be2452d3ebac9cc3ff2686816016a5344
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.14.0 Linux/6.17.0-105014-tuxedo

Release files / d_blocks_core-0.9.3.43-py3-none-any.whl

Download URL d_blocks_core-0.9.3.43-py3-none-any.whl
Size 127.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96ea84ead7ae885cbe7d07f498a9b4cbd7af2cf231c42f877eae2161befb1385
BLAKE2b-256 checksum
How to use checksums
516285e7c5584969e2b41b923e31779d3b55210592e6c22414cb2da93249db27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.14.0 Linux/6.17.0-105014-tuxedo

Release history Release notifications | RSS feed

This release

0.9.3.43 This release

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.1.0

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page