Databases
Teradata Database Management in VS Code
Overview
Section titled “Overview”Teradata is a massively parallel enterprise data warehouse used for large-scale analytics in finance, telecom, retail, and government. Key characteristics include:
- Database-as-schema model: A Teradata “database” is the namespace that owns tables, views, macros, procedures, and functions. DBCode surfaces each database as a schema.
- Standard plus dialect SQL: ANSI-style SQL with Teradata-specific features such as
QUALIFY,TOP, andSAMPLEfor row limiting. - Object variety: Tables, views, macros (a Teradata-specific object), stored procedures, and user-defined functions.
- Enterprise scale: Shared-nothing MPP architecture, primary indexes, and statistics-driven optimization.
DBCode connects over Teradata’s native protocol using Teradata’s official driver, so you can explore and query a Teradata Vantage environment - including a free ClearScape Analytics Experience instance - without leaving Visual Studio Code.
Connecting
Section titled “Connecting”To connect to Teradata in DBCode:
- Open the DBCode Extension: Launch Visual Studio Code and open the DBCode extension.
- Add a New Connection: Click the “Add Connection” icon.
- Enter the connection settings: Select Teradata as the database type and enter:
- Host: hostname of your Teradata system (for ClearScape, the environment host)
- Port: TCP port (default: 1025)
- Logon Mechanism:
TD2(username / password) orLDAP - Username / Password: Teradata credentials
- Optionally, turn on SSL/TLS: see Encryption below.
- Accept the driver download: Teradata’s driver is proprietary, so DBCode does not bundle it. On first connect you are prompted to download Teradata’s official
teradatasqldriver from the public npm registry for your own use, under Teradata’s license. DBCode verifies the download before installing it. - Connect: Click save to connect, then browse databases, tables, views, and macros and run queries.
For detailed connection instructions, refer to the Connect article.
Encryption
Section titled “Encryption”Teradata carries TLS over its HTTPS port (443), alongside the Teradata port. A direct connection uses TLS whenever the server offers it. With SSL/TLS turned on, DBCode requires TLS and the Certificate Verification setting chooses how the server’s certificate is checked:
- Full Verification: the certificate is trusted and matches the host name.
- CA Only: the certificate is trusted, and the host name is not checked. Use this for a server whose certificate names another host, such as a ClearScape Analytics Experience environment, with that certificate in SSL Server Certificate.
- No Verification: the session is encrypted and the certificate is accepted as presented.
SSL Server Certificate takes the CA certificate (a file path or the PEM text) that the server’s certificate must chain to.
Teradata Features in DBCode
Section titled “Teradata Features in DBCode”DBCode enhances your Teradata workflow with:
- SQL query editor: Write and execute Teradata SQL with syntax highlighting and multi-statement support.
- Schema browsing: Navigate databases, tables (including
NO PRIMARY INDEXand queue tables), views, macros, procedures, functions, and triggers, with column types, primary keys (including unique primary indexes), foreign keys, indexes, and table sizes. - Data editing: Insert, update, and delete rows inline in the data grid. Each page of a table holds its rows once, in a stable order, even when the sorted column repeats values: DBCode breaks ties on the table’s unique key, or on all of its columns.
- DDL scripting: Script tables, views, macros, procedures, functions (each overload separately, by its specific name), and triggers from the schema browser through
SHOW. Views, macros, procedures, functions, and triggers are scripted asREPLACEstatements that run again as they are. - Execution plans: View Teradata’s
EXPLAINtext plan for a query. - Transactions: Pin a connection to run statements in a transaction and commit or roll back together.
- Query cancellation: Stopping a running query in the editor stops it on the server.
- Server monitoring: View active sessions and system information from the monitoring panel. Cancel Query aborts a session’s running request through
SYSLIB.AbortSessions, and the session stays logged on. Cancelling another user’s request needs theABORTSESSIONprivilege on that user. - Statistics: Optionally run
COLLECT STATISTICSto refresh row counts during introspection.
Data types
Section titled “Data types”BIGINT, DECIMAL(38), and NUMBER values keep every digit. DATE, TIME, and TIMESTAMP values show as the server stores them, whatever time zone your machine is in, from year 0001 to 9999 and with every fractional digit. WITH TIME ZONE values are instants, shown in your machine’s time zone. PERIOD values show both bounds the same way, and DBCode’s date and time formatting settings control how all of them are displayed. INTERVAL values show as Teradata writes them.
CHAR(n) values show without their trailing pad spaces. Teradata compares CHAR values as if padded, so filtering on a shown value, or editing it in the grid, still matches its row.
By using Teradata with DBCode, you can explore, query, and manage your data warehouse directly within Visual Studio Code.
For more information about Teradata, visit teradata.com.