rfaulkner / wikipedia_user_metrics

Wikimedia Foundation E3 Team Analysis Code
Other
9 stars 5 forks source link

Backend. Move metrics SQL query definitions to separate file #42

Closed dartar closed 11 years ago

dartar commented 11 years ago

Make it easier for ops to audit queries required by each metric by moving their definition to a dedicated file instead of hardcoding them into each class.

rfaulkner commented 11 years ago

implemented for threshold: https://github.com/rfaulkner/E3_analysis/commit/60b368c003eb7e9573c0aa2b328090c47c3c8f25

dartar commented 11 years ago

The latest commit breaks the metric, it looks like threshold_ts is incorrectly parsed from the job parameters:

ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') and rev_user = 18323618 and rev_timestamp <= 2013' at line 1")
rfaulkner commented 11 years ago

fixed. https://github.com/rfaulkner/E3_analysis/commit/074564f5aa19463cbcfc987a795e778ffe1bc51f

rfaulkner commented 11 years ago

implemented. see src/metrics/query_calls.py