Teradata@1
Teradata@1 provider lets you read data from Teradata databases, no drivers needed.
Teradata@1 provider works out-of-the-box, you don’t need any drivers installed.
Example
Data sources:
- Name: MyTeradataDatabase
Provider: Teradata@1
Connection string: "Data Source=TeradataServer; User Id=myuser;Password=%PASSWORD%;"
Notice you can use an environment variable instead of real password (enclose the environment variable name with percents). See How to work with Passwords. You can also hide the entire connection string in an environment variable like this:
Data sources:
- Name: MyTeradataDatabase
Provider: Teradata@1
Connection string: "%MY_CONNECTION_STRING%"
Details
This provider is built on top of Teradata.Client.Provider for .NET. Here you can find more details, including connection string options:
Prerequisites
CAT already contains the underlying drivers out of the box, you don’t need to install any other prerequisites.
Storing Test definitions and Data Source definitions in DB
Reading and testing data is not the only purpose of providers. You can also use them for retrieving (potentially also automatically generating) test defintions and / or data sources.
Any SQL statement that returns columns expected by Test definition or Data source defintition will work. But if you want to persist those, you might find useful these scripts that prepares the necessary tables:
Test schema first if it doesn’t exist in your Teradata database. Also, you might need to adjust the syntax (e.g., quoted identifiers, semicolons) based on your Teradata version and configuration.CREATE TABLE Test.CAT_TestDefinition(
TestSuite VARCHAR(300) NULL,
"Order" INTEGER NULL,
TestCase VARCHAR(300) NULL,
TestName VARCHAR(300) NOT NULL,
Description VARCHAR(64000) NULL,
FirstDataSource VARCHAR(200) NULL,
FirstQuery VARCHAR(64000) NULL,
SecondDataSource VARCHAR(200) NULL,
SecondQuery VARCHAR(64000) NULL,
Expectation VARCHAR(50) NOT NULL,
Categories VARCHAR(100) NULL,
Tolerance DECIMAL(19, 4) NULL,
Timeout INTEGER NULL,
"Key" VARCHAR(100) NULL,
MaximumErrorsLogged INTEGER NULL
);
CREATE TABLE Test.CAT_ConnectionDefinition(
Name VARCHAR(200) NOT NULL,
Provider VARCHAR(200) NOT NULL,
ConnectionString VARCHAR(2000) NOT NULL
);
Just fill them up with data and let CAT know about them (see Project files).