The ODPS (MaxCompute) adapter for DBT (data build tool)
Project description
dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.
dbt is the T in ELT. Organize, cleanse, denormalize, filter, rename, and pre-aggregate the raw data in your warehouse so that it's ready for analysis.
ODPS
ODPS, called MaxCompute before. This adapter is a wrapper bridged PyOdps and DBT together.
MaxCompute Features:
Feature | Status |
---|---|
Partition Table | ❎ |
Cluster Table | ❎ |
External Table | ❎ |
Table Properties | ❎ |
DBT features:
Name | Status |
---|---|
Materialization: Table | ✅ |
Materialization: View | ✅ |
Materialization: Incremental - Append | ✅ |
Materialization: Incremental - Insert+Overwrite | ✅ |
Materialization: Incremental - Merge | ✅ |
Materialization: Ephemeral | ✅ |
Seeds | ✅ |
Tests | ✅ |
Snapshots | ✅1 |
Documentation | ✅ |
Getting Started
Install DBT-ODPS
python -m pip install dbt-odps
How to Configure?
For Fresh Codebase
Run following command after installing dbt-odps:
dbt init
For Existing Codebase
Read more in here: https://docs.getdbt.com/docs/core/connection-profiles
Configuration options:
Property | Description | Example |
---|---|---|
Endpoint | The endpoint of odps, read more in https://help.aliyun.com/document_detail/34951.html | http://service.cn-shanghai.maxcompute.aliyun.com/api |
database | The project name of odps, which you can find in https://maxcompute.console.aliyun.com/{your area}/project-list | odps-test-project |
schema | Using default if you don't know what is schema. | default |
access_id | access id | LTAXXXXXXXXX |
secret_access_key | secret access key | bZXXXXXXXXXX |
type | odps | odps |
NOTES
- When using merge statement, ODPS required that table is a transactional table. So, we have to create the snapshot table before select. Under the hook, we using the first referred table as source data structure to create table, so this data source must be a table, view is not supported.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file dbt-odps-0.0.1.tar.gz
.
File metadata
- Download URL: dbt-odps-0.0.1.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cd35380b3770bd21ff1cbc2ee587c6193720c6ee14fd016ef31274848cdc240 |
|
MD5 | 3aef1c5b053d812b032a3cb9d5b86153 |
|
BLAKE2b-256 | 4cc1a72e2cbfc01d80bd6f3b0fabd410e6f82592b73738c35dc66df72024cca2 |