Commit 27573f89 authored by Pierre-Yves Gibello's avatar Pierre-Yves Gibello
Browse files

Added MRL thresholds metadata insertion (if present)

parent 04dda602
Pipeline #11054 passed with stages
in 11 minutes and 21 seconds
......@@ -19,3 +19,12 @@ java -jar $MRL_ROOT/data-collection/target/ow2-mrl-data-0.0.1-SNAPSHOT.jar $MRL_
# Load data in MySQL database
mysql -u $MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DB -Bse "LOAD DATA LOCAL INFILE '/tmp/MRL/metric_values.csv' INTO TABLE RawData FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';"
# Load MRL metadata if present
if [ -e /tmp/MRL/MRL_thresholds.csv ]
then
mysql -u $MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DB -Bse "DROP TABLE IF EXISTS SpareMetric;"
mysql -u $MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DB -Bse "CREATE TABLE SpareMetric as select * from Metric;"
mysql -u $MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DB -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);"
fi
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