Skip to main content

dbt (data build tool) adapter for SAS

Project description

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
Load seed files Yes
View Materialization Yes
Table Materialization Yes
Ephemeral Materialization Partial
Incremental Materialization No
Snapshots No
Grants No

Usage

  • Create dbt project, choose sas database and set up connection
$ dbt init <project_name>

Testing

  • Install dev requirements
$ pip install -r dev_requirements.txt
  • Run pytest
$ python -m pytest tests/

Logging

export DBT_SAS_LOG='file.log'
export DBT_SAS_FAMILY='sas,sql'
export DBT_SAS_FAMILY='sas,sql,original_sql'

TODO

$ make venv
$ source ./bin/activate
$ python
Python 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import saspy
>>> sas=saspy.SASsession(java='/usr/bin/java', iomhost='***', iomport=8591, omruser='***', omrpw='***')
Using SAS Config named: default
SAS Connection established. Subprocess id is 1139816

>>>

Licence

Apache License, Version 2.0

Links

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

dbt-sas-1.3.0a1.tar.gz (31.7 kB view details)

Uploaded Source

Built Distribution

dbt_sas-1.3.0a1-py2.py3-none-any.whl (38.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file dbt-sas-1.3.0a1.tar.gz.

File metadata

  • Download URL: dbt-sas-1.3.0a1.tar.gz
  • Upload date:
  • Size: 31.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for dbt-sas-1.3.0a1.tar.gz
Algorithm Hash digest
SHA256 ec6ac3d45e79d594e2e82dab05d7aff44e1b5a7af01b62283ba5aa4715c5572a
MD5 605b2193238e2b085be67bf9ec4acc5c
BLAKE2b-256 b723061ab22bccb7c49fdd76ba84673cc44718c2c51d82c5dff9c97ed60b59c9

See more details on using hashes here.

File details

Details for the file dbt_sas-1.3.0a1-py2.py3-none-any.whl.

File metadata

  • Download URL: dbt_sas-1.3.0a1-py2.py3-none-any.whl
  • Upload date:
  • Size: 38.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for dbt_sas-1.3.0a1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f42889fbfeeeb54cb9d36b8d506bd8292a959696617dc3cf9942eab151cc315c
MD5 a6d20af792cfffc6a7cc98973af2685e
BLAKE2b-256 6b79c6573084102c5873fc4a3cdd2ede4f88d14db3d900985f8f436201568351

See more details on using hashes here.

Supported by

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