Skip to main content

A Collection of assorted Teradata Tools

Project description

PyPi License Python3.4+

tdtools is a collection of tools and utilities that I developed for my personal use. I am making these tools open-source in the hope that someone else might find them useful.

NOTE: These tools are not endorsed by Teradata Inc.

Requirements

Theses tools are tested with Python 3.4 and Python 3.5. Python 2.7 version isn’t part of the testing and most likely will not work. However, if there is a strong interest in using Python 2.7 and changes required to support Python 2.7 are minimal, I may consider making selected modules support Python 2.7.

There is a dependency on teradata python package. It’ll be downloaded automatically if you use standard python installer pip.

Installation

Use Python’s standard pip utility to install tdtools. tdtools can be install in an virtualenv.

$ pip install tdtools

Or

C:\>python -m pip install tdtools

Configuration

No configuration is required except setting up the needed ODBC connections. All scripts that are part of tdtools accept arbitrary ODBC connection strings using --tdconn parameter.

If more flexibility is needed, for example, to use Teradata REST APIs, it may be done by providing sqlcsr_site.py in your PYTHONPATH. Have a look at sqlcsr.py module to get an idea about what can be overriden in sqlcsr_site.py.

Tools

All tools are command-line utilities that are automatically installed when tdtools is installed using pip. What follows is a brief description of each tool. Each tool support --help or -h command-line option that shows detailed description of options supported.

Command

Purpose

dbtree

Prints Teradata database hierarchy.

vwtree

Prints (or save) view hierarchy.

tptload

Generate (and optionally run on Linux) TPT load script.

All show* utilities generate DDLs for different types of Teradata objects.

Command

Objects

showdb

Database or user

showgrant

Grants to user/role

showprof

Profile

showrole

Role

showtvm

Wrapper for Teradata SHOW <object> command

showzone

Zone

All ls* utilities print Teradata object information from DBC tables. Currently supported commands are:

Command

Objects

lstb

Tables

lsvw

Views

lsmc

Macros

lspr

Stored Procedures

lsfn

Functions

lsji

Join Indexes

Known Issues

  1. When using teradata.tdrest as method for database connection, certain show* commands will not work correctly. This is due to an upstream defect. Note that this error does not occur when using teradata.tdodbc, the default method for database connection.

  2. SQL command show in xml view doesn’t always return referenced object list. When this happens, vwtree will print an error and not display view hierarchy.

Support

If you encounter an issue, report it using issue tracker. I’ll try to provide a fix as soon as I can. If you already have a fix, send me a pull request.

Contributions

Feel free to fork this repository and enhance it in a way you see fit. If you think your changes will benefit more people, send me a pull request.

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

tdtools-0.4.2.tar.gz (27.9 kB view details)

Uploaded Source

Built Distribution

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

tdtools-0.4.2-py3-none-any.whl (43.0 kB view details)

Uploaded Python 3

File details

Details for the file tdtools-0.4.2.tar.gz.

File metadata

  • Download URL: tdtools-0.4.2.tar.gz
  • Upload date:
  • Size: 27.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tdtools-0.4.2.tar.gz
Algorithm Hash digest
SHA256 75bbfb88e07ec618870253e8d2cd6e39e86f1405871d83ec32c8e2b4a574ea20
MD5 b8de2f4d8a13db617b1c57c1b384dd44
BLAKE2b-256 085e037170122a7d151b2718067633c1266d1bbd60333d9edbe1f2bc34d50738

See more details on using hashes here.

File details

Details for the file tdtools-0.4.2-py3-none-any.whl.

File metadata

File hashes

Hashes for tdtools-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7b3cc757e91e5fcd96163396673fe5d21ade124b5fca1ce8c338241cd17f48f5
MD5 320223a6ccbbcac336e4a5330eb4989d
BLAKE2b-256 db2dc4ba2e03db8aed0d6a9b302b939dab3a66701b7943941fe51d64bd9f17e0

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