Page Properties | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
Description
Check for SQL usage on DB connectors and stages. Developers should avoid using SQL to filter data and instead utilise DataStage's features
This currently only allows generated SQL where there are no other clauses specified in stages with that option. Any user-defined SQL, generated SQL with additional clauses, or query file inputs will fail this rule.
Actions
...
|
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 |
Generated | Underlying SQL is generated by the Stage at runtime. | Rule fails if |
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.
Actions
Configure your Enterprise Database Stages and Connector Stages to use the SQL approach that best suits your team.
Notes
This rule is mutually exclusive related to the SELECT * used in custom SQL rule. Choose your preferred approach and adopt/adapt these example rules as appropriate.