SQL in DB Connectors
Summary
Identifies DB Connectors which use an SQL to filter source data
Description
Both legacy Enterprise Database Stages and Connector Stages provide a number of mechanisms for specifying the means of specifying the data they should retrieve:
Query mode | Description | Behaviour |
———————- | ————————————- | ——————————— |
User Query | A custom query specified in the Stage properties | Rule fails |
SQL Builder | Construct a custom SQL statement with a user interface | Rule fails |
SQL File | A file containing an SQL query is loaded and executed at runtime. | Rule fails |
Table Query | Select the name of the table to use from a drop-down list | Rule fails if SELECT or FILTER clauses specified |
Generated | Underlying SQL is generated by the Stage at runtime | Rule fails if WHERE or OTHER clauses specified |
This rule checks for the use of hardcoded SQL in properties of Database Enterprise Stages and Connector Stages. Development teams may choose to avoid using hardcoded SQL to filter data and instead opt to use downstream stages to process database output.
This rule only permits generated SQL where there are no other clauses specified in connector with that option. Any use-defined SQL, generated SQL with additional clauses or query file inputs will fail.
Actions
Configure your Enterprise Database Stages and Connector Stages to use an approach which does not necessitate the use of hard-coded SQL.