This release is a pre-release and may not be stable for production use.
SAS DBT adapter
The dbt-sas package allows dbt to connect to SAS.
Installation
pip install dbt-sas
Configurations
Basic profile.yml for connecting to SAS:
sas-test:
outputs:
dev:
type: sas
host: SAS host
port: 8591
database: sas (keep 'sas', don't change)
schema: default libray name
user: SAS username
password: SAS password
autoexec: optional local path of autoexec.sas file
lib_base_path: optional path (on the SAS server) for new libraries
threads: 1
fail_on_warnings: False
lib_name_strict_mode: False
target: dev
| Key | Required | Description |
|---|---|---|
type |
Yes | The specific adapter to use (sas) |
host |
Yes | SAS server hostname |
port |
Yes | SAS server port |
database |
Yes | sas, don't change |
schema |
Yes | Default SAS libname |
username |
Yes | The username to use to connect to the server |
password |
Yes | The password to use for authenticating to the server |
handler |
Yes | SAS handler ws (default) or saspy |
autoexec |
No | Local path of autoexec.sas file |
lib_base_path |
No | Base path on the SAS server for new libraries |
fail_on_warnings |
No | Raise and error if it encounters a warning |
lib_name_strict_mode |
No | Enable strict libname/identifier check |
Features
| Key | Supported | Description |
|---|---|---|
| Tests | Yes | Run dbt tests on SAS |
| Load seed files | Yes | Load seeds from CSV files to SAS |
| View Materialization | Yes | Materialize dbt models as views in SAS |
| Table Materialization | Yes | Materialize dbt models as tables in SAS |
| Ephemeral Materialization | Partial | Materialize dbt ephemeral tables as temporary views in SAS |
| Incremental Materialization | No | |
| Snapshots | No | |
| Grants | No | SQL grants are not supported by SAS |
Limitations
- Schemas (lib names) are limited to 8 characters.
- Table names, column names, and aliases are limited to 32 characters.
Usage
- Create dbt project, choose sas database and set up connection
$ dbt init <project_name>
Query Logging
Enable additional logging by setting the DBT_SAS_LOG environment variable to the log filename, e.g.:
export DBT_SAS_LOG='file.log'
Select the log families, e.g.:
export DBT_SAS_FAMILY='sas,sql'
Log families are:
- sas
- sql
- original_sql
Adapter Testing
- Install dev requirements
$ pip install -r dev_requirements.txt
- Run pytest
$ python -m pytest tests/
Licence
Apache License, Version 2.0
Links
Metadata
Release files for dbt-sas 1.3.0a17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dbt-sas-1.3.0a17.tar.gz | 26.0 kB | Without provenance | Details for dbt-sas-1.3.0a17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dbt_sas-1.3.0a17-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for dbt_sas-1.3.0a17-py2.py3-none-any.whl |
Total release size: 66.3 kB
Release files / dbt-sas-1.3.0a17.tar.gz
| Download URL | dbt-sas-1.3.0a17.tar.gz |
|---|---|
| Size | 26.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4692d52162e2f8f7a5a22c22519cbaabeb2a4205511e1f8543aad98d8fe96584
|
|
BLAKE2b-256 checksum How to use checksums |
740398d16f106a418cc61461791acb5eb2e8fd83a5689cc57145319761f45984
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Release files / dbt_sas-1.3.0a17-py2.py3-none-any.whl
| Download URL | dbt_sas-1.3.0a17-py2.py3-none-any.whl |
|---|---|
| Size | 40.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8347e13f85280cb778c361429363b35b8fd157a5c328459092bcf33d17ca7629
|
|
BLAKE2b-256 checksum How to use checksums |
82bdb20bdb0b9c0c5ee3caee15067e1b6513f1988b6dcbd23c94abd2b77ed337
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Security for dbt-sas 1.3.0a17
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.