123456789101112131415161718192021222324252627 |
- sqlquery:
- # driver name: oracle
- # username: otel
- # password: password
- # host: localhost
- # container exposed port: 51521
- # Oracle DB service name: XE
- # Refer to Oracle Go Driver go_ora documentation for full connection string options
- datasource: "oracle://otel:password@localhost:51521/XE"
- driver: oracle
- queries:
- # Note: The table name may need to be preceded by the name of the user who created the table.
- # If the table is created by an initialization script within a docker container, it would be referred
- # to as "sys.movie", as the sys user runs initialization scripts. Permission would need to be granted
- # to the "otel" user to access or modify the table in that case.
- # This example assumes "otel" created the movie table.
- - sql: "select count(*) as count, genre, avg(imdb_rating) as avg from otel.movie group by genre"
- metrics:
- - metric_name: genre.count
- # Note that COUNT and GENRE are now all capital letters, the queries will return nothing if this isn't
- # accounted for.
- value_column: "COUNT"
- attribute_columns: [ GENRE ]
- - metric_name: genre.imdb
- value_column: "AVG"
- attribute_columns: [ GENRE ]
- value_type: "double"
|