Stoneridge Data Backfill In Datazilla

RESOLVED FIXED

Status

Data & BI Services Team
DB: MySQL
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: jeads, Unassigned)

Tracking

Details

(Reporter)

Description

5 years ago
A new option was added to the `option` table in stoneridge_perftest_1. New data submitted to the stoneridge database now has the option but the option needs to be backfilled for the existing test runs. Please execute the following SQL.


INSERT INTO `stoneridge_perftest_1`.`test_option_values` (`test_run_id`, `option_id`, `value`)
SELECT tr.id, 1, 'nightly'
FROM `stoneridge_perftest_1`.`test_run` AS tr
WHERE tr.id NOT IN (
	SELECT `test_run_id`
	FROM `stoneridge_perftest_1`.`test_option_values`
);
done!

mysql> INSERT INTO `stoneridge_perftest_1`.`test_option_values` (`test_run_id`, `option_id`, `value`)
    -> SELECT tr.id, 1, 'nightly'
    -> FROM `stoneridge_perftest_1`.`test_run` AS tr
    -> WHERE tr.id NOT IN (
    -> SELECT `test_run_id`
    -> FROM `stoneridge_perftest_1`.`test_option_values`
    -> );
Query OK, 897 rows affected, 1 warning (0.07 sec)
Records: 897  Duplicates: 0  Warnings: 1
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Product: mozilla.org → Data & BI Services Team
You need to log in before you can comment on or make changes to this bug.