The SQL query string to be executed (e.g., SELECT Column1, Column2 FROM TABLE).
expectedResult
string
The expected result in the SQL response
errorMessage
string
The error message to display in case of criterion failure
SQL Source
<source-name>:
type: sql
query: #
Attribute Key
Data Type
Description
type
string
Specifies the type of SQL source (sql).
query
string
The SQL query string to be executed (e.g., SELECT Column1, Column2 FROM TABLE).
To differentiate the current source, which executes inner SQL queries using the internal MetricsHub DB engine, we should consider renaming the type of the inner SQL source to reflect its engine-based nature. A suitable option could be localSql.
Should we support for SELECT * FROM TABLE
If yes, we need to define a new attribute columns in the sql source.
Should we override the url in a source
If yes, we need to define a new attribute url, that overrides the user's url. It that, in the new url, macros should be correctly replaced by the engine.
Specification
JDBC SQL User's Configuration
metricshub.yaml
username
null
password
null
url
null
or generated based ontype
anddatabase
.timeout
120
secondstype
null
port
null
or generated based ontype
database
null
SQL Criterion
type
sql
).query
SELECT Column1, Column2 FROM TABLE
).expectedResult
errorMessage
SQL Source
type
sql
).query
SELECT Column1, Column2 FROM TABLE
).To differentiate the current source, which executes inner SQL queries using the internal MetricsHub DB engine, we should consider renaming the type of the inner SQL source to reflect its engine-based nature. A suitable option could be
localSql
.SELECT * FROM TABLE
columns
in the sql source.url
, that overrides the user's url. It that, in the newurl
, macros should be correctly replaced by the engine.