Skip to main content

A Collection of assorted Teradata Tools

Project description

tdtools

PyPi License Python3.6+

tdtools is a collection of command-line tools and utilities to explore various Teradata related information that normallt would write custom SQL queries. Although these tools are primarily targeted towards Teradata power users and DBAs, casual users may find them useful.

NOTES:

  • I originally developed these tools for my personal use. I am making these open-source in the hope that someone else might find them useful. These tools do not come with any expressed or implied warranty.
  • These tools are not endorsed by Teradata Inc.

Requirements

Latest version of Python3 series is recommended, however Python 3.6 and above should work.

tdtools depends on tdtypes (for Teradata metadata information) and yappt (for formatting output). These packages and their dependencies will be downloaded and installed automatically if you use the standard python installer pip to install tdtools.

Installation

Use Python's pip utility to install tdtools.

$ pip install -U tdtools

Or

C:\>python -m pip install -U tdtools

Configuration

No configuration is required except setting up the needed ODBC connections. All tools (listed below) from this package rely on tdtypes package for establishing connection to Teradata. Thus, the simplest way to invoke any tool is by supplying a valid ODBC connection string to --tdconn option. Look at tdtypes documentation if more flexibility is needed; for example, using Teradata REST interface instead of ODBC.

Tools

All tools are command-line utilities that are generated automatically and installed (if installed using pip).

Following is a brief description of each tool. Use --help command-line option to show detailed description of all supported options.

Command Purpose
dbtree View Teradata database hierarchy.
vwtree View (or save) Teradata View hierarchy.
tptload Generate (and optionally run) TPT load script.
helpstats View current statistics for any Teradata objects.
tdrights View Teradata permissions on objects or to users.

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
showstats Statistics definition
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
lsdb Databases
lsus Users
lspf Profiles

Known Issues

  • There was a defect in certain earlier releases of Teradata Database that caused views based on NOPI tables to be not detected correctly. A patch is available from Teradata that fixes this defect.

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 feel 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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

tdtools-0.6.2-py3-none-any.whl (54.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tdtools-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 54.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.1

File hashes

Hashes for tdtools-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 951d9c2ee315ff840008b37498531f5301faf43415c824fe974b069d487ce068
MD5 6bd7ad350f1c8be7d3ee0886ad0155ec
BLAKE2b-256 6869135600fa08b10b5f24844c177cad522f1ad95d1374fa51afda652371a2c6

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