Defining a query template for a specific database
A query template defines the query logic required to analyze columns against regular expressions.
The steps to define a query template in Talend Studio include the following:
- Create a query template for a specific database,
- Set the database-specific regular expression if this expression is not simple enough to be used with all databases.
The below example shows how to define a query template specific for the Microsoft SQL Server database.
Before you begin
Procedure
Results
You have finalized creating the query template specific for the Ingres database. You can now start analyzing the columns in this database against regular expressions.
If the regular expression you want to use to analyze data on this server is simple enough to be used with all databases, you can start your column analyses immediately. If not, you must edit the definition of the regular expression to work with this specific database, Ingres in this example.
If an analysis with a user-defined indicator runs successfully at least one time and later the indicator definition template for the database is deleted, the analysis does not fail. It keeps running successfully because it uses the previously generated SQL query.
For more information on how to set the database-specific regular expression definition, see Editing a regular expression or an SQL pattern.