Get Help

Properties

A data source definition names a place where data lives and tells CAT how to reach it.

These properties apply wherever the definition lives — inline in the project file, in other YAML files, or in any provider that returns rows (Excel, a database query, …); sources can be combined. In YAML they are keys; in a tabular source they are the columns of one row. See Lists.

Properties

Property Also accepted as Required Meaning
Name Data source name yes The name other definitions use to refer to this data source
Provider yes Which provider CAT opens the data with, as name and version — SqlServer@2, Excel@1, Postgres@1. See Providers
Connection string File path, Directory, Folder — see below the provider decides Everything the provider needs to reach the data: a connection string for a database, a path for a file-based provider
Technology no What the system behind the connection is — AzureSqlDatabase, PowerBIDesktop, Snowflake. Read by CAT Studio only. See Technologies

Property names are matched by synonym and are not case sensitive, so connection_string and ConnectionString address the same property. See Naming conventions.

%NAME% in any value is replaced with the value of the environment variable NAME. See Environment variables.

Data sources:
- Name: FlightsSystem
  Provider: SqlServer@2
  Connection string: "%FLIGHTS_CONNECTION_STRING%"

Name

The name is what a test means by First data source and Second data source, and what a query means by Data source. The match ignores case.

When a definition names a data source that does not exist, CAT raises an error and lists every data source name the project did load, so the typo is visible next to the alternatives.

Names are not checked for duplicates. Two data sources under the same name are both loaded, and which one a test ends up using is not defined — keep them distinct.

Connection string

Connection string is the one slot every provider reads, whatever it holds. A database provider takes a connection string out of it, a file-based provider takes a path, a folder-based provider takes a directory.

Because “connection string” reads oddly for a file, some providers accept an alias for the same slot:

Provider Also accepted as
Excel@1, ExcelOleDB@1, PowerBI@1, PowerBI@2, Yaml@1 File path
Csv@1, CsvOleDB@1 Directory, Folder

Whether a value has to be there is the provider’s decision, not the definition’s: CAT does not reject a data source that carries no connection string. Every provider except two then fails without one — Yaml@1 falls back to Data.yaml, and CsvOleDB@1 falls back to the working directory.

Provider settings

A data source definition is not limited to the four properties above. Every other property on the definition is handed to the provider as one of its settings, so a data source carries whatever its provider understands — a CSV delimiter, a text encoding, a driver-specific option.

Data sources:
- Name: FlightsExport
  Provider: Csv@1
  Folder: ./exports
  Encoding: windows-1250

Which settings a provider accepts, what it expects in the connection string, and what it needs installed on the machine are documented on that provider’s own page. See Providers.