Commit 04dda602 authored by Pierre-Yves Gibello's avatar Pierre-Yves Gibello
Browse files

Update README.md

parent be2d215a
Pipeline #11052 passed with stages
in 1 minute and 46 seconds
......@@ -74,6 +74,31 @@ It can be added to the OW2_MRL database as follows:
$ mysql -u username -p OW2_MRL -Bse "LOAD DATA LOCAL INFILE 'src/main/resources/metric_values.csv' INTO TABLE RawData FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';"
```
### Insert real data and metadata
Real data (after data collection as described above) can be added to the OW2_MRL database as follows, supposing that data collection was issued in /tmp/MRL:
1) Insert metric values:
```
$ mysql -u username -p OW2_MRL -Bse "LOAD DATA LOCAL INFILE '/tmp/MRL/metric_values.csv' INTO TABLE RawData FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';"
```
2) Insert MRL thresholds metadata (if any):
First, it is recommended to save the current Metric values (in case of failure):
```
mysql -u root -p OW2_MRL -Bse "DROP TABLE IF EXISTS SpareMetric;"
mysql -u root -p OW2_MRL -Bse "CREATE TABLE SpareMetric as select * from Metric;"
```
Then, to insert threshold values in Metric table:
```
mysql -u username -p OW2_MRL -Bse "LOAD DATA LOCAL INFILE '/tmp/MRL/MRL_thresholds.csv' REPLACE INTO TABLE Metric FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (MetricName,Threshold1,Threshold2,Threshold3,Threshold4,Threshold5,Reverse);"
```
## Setup the webapp
- Update src/main/resources/mysql.properties with MySQL credentials
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment