Skip to main content

No project description provided

Project description

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 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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

d_blocks_core-0.9.0.tar.gz (62.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

d_blocks_core-0.9.0-py3-none-any.whl (74.8 kB view details)

Uploaded Python 3

File details

Details for the file d_blocks_core-0.9.0.tar.gz.

File metadata

  • Download URL: d_blocks_core-0.9.0.tar.gz
  • Upload date:
  • Size: 62.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.11.0-108014-tuxedo

File hashes

Hashes for d_blocks_core-0.9.0.tar.gz
Algorithm Hash digest
SHA256 2a4faa039b66777ceca01bfcd4e9f56553d6efef1ff84a4a7e6036c7fca1533e
MD5 fd5a76335d761811363ad52ec0ff4c5f
BLAKE2b-256 f6c592753cef84bfb364b66503f5e7219ec0b71ce6103f739cf3cbbc39f59f9e

See more details on using hashes here.

File details

Details for the file d_blocks_core-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: d_blocks_core-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 74.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.11.0-108014-tuxedo

File hashes

Hashes for d_blocks_core-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1a9ea33237bd67c814093b97b454eefbb45cf0f4c162914326320f2cfb9030f
MD5 bf526b1a6b223abdb56c2f154b5a8e90
BLAKE2b-256 f38a5aae62e706b360ba55861eac53b9cebb3cda5d8abaa73abb2d864edda7e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page