MetricsHub
							MetricsHub Community Connectors 1.0.14
							
						- 
									
									
										Home
									
									
									
- Connector Design Guide Detection 12
SQL (Detection)
The goal of this part is to see how to define SQL criteria.
connector:
  # ...
  detection: # <object>
    # ...
    criteria: # <object-array>
      - type: sql
        query: # <string>
        expectedResult: # <string>
        errorMessage: # <string>
Input Properties
| Input Property | Description | 
|---|---|
| query | SQL query to be executed | 
| expectedResult | Regular expression that is expected to match the result of the SQL query | 
| errorMessage | The message to display if the detection criterion fails | 
Example
connector:
  detection:
    criteria:
      - type: sql
        query: SELECT @@version_comment REGEXP 'mysql' AS is_mysql;
        expectedResult: 1
        errorMessage: Not a MySQL Server
Search Results for {{siteSearch | truncate:'50'}}
							{{resultArray.length}}
							
						
						
						
						
						
					
						No results.
					
				