Commit Graph
149 Commits
Author SHA1 Message Date
Javier Goizueta 11cdcc65ad Add safety limit to sample metadata
The sampling probability is now being computed using an estimate of the table row count
This could led to too high probabilities (to large samples) if the estimate is not accurate.
To avoid potential problems with large samples we've added a LIMIT to the sampling queries.
2018-05-21 12:45:16 +02:00
Javier Goizueta fecd63e582 Fix bug 2018-05-21 11:59:49 +02:00
Javier Goizueta 38e55367b1 Revert error behaviour for estimatedFeatureCount
Keep current production behavior of ignoreing errors when computing this stat and returning -1.
This is done as to no introduce any instability in production at the moment.
2018-05-21 11:44:52 +02:00
Javier Goizueta 4e99ff1c39 Fix token substitution for stat queries 2018-05-18 22:25:32 +02:00
Javier Goizueta 391ac51f0f Implement metadata queries with plain Promises
Remove usage of PhasedExecution
This achives better query execution granularity and
removes questionable usage of shared results object.
It introduces a couple of behavior changes:
* estimatedFeatureCount desn't ignore errors now
* sample always uses estimatedFeatureCount,even if the actual count is also computed.
2018-05-18 15:33:07 +02:00
Javier Goizueta 4bc8fb207a Use sql_raw for query without aggregation 2018-05-18 15:29:46 +02:00
Javier Goizueta 012fa91e83 Typo 2018-05-16 14:45:34 +02:00
Javier Goizueta 3af1182206 Rename misleading function argument 2018-05-16 14:45:19 +02:00
Javier Goizueta b906f88a44 Slight refactor 2018-05-11 19:32:03 +02:00
Javier Goizueta 24b1b53ba0 Merge branch 'master' into metadata 2018-05-11 18:58:38 +02:00
Javier Goizueta 53fae9fbbd Comment 2018-05-11 18:57:14 +02:00
Javier Goizueta 34ad3fcfe8 Add aggregated stat for testing
Also change aggregated stats to not filter a single tile
2018-05-11 14:18:31 +02:00
Javier Goizueta 68b3cb8a34 Fix estimated row count with aggregations
All stats are computed now pre-aggregation
Code to help compute post-aggregation stats remains for testing
2018-05-11 13:44:43 +02:00
Javier Goizueta cae4dd81c9 WIP: fix problems for aggregations & metadata 2018-05-10 19:12:47 +02:00
Javier Goizueta 944ce80c1e Revert debugging change 2018-05-09 11:42:53 +02:00
Javier Goizueta d8ef8cb12f Debug travis test failures 2018-05-09 11:08:02 +02:00
Javier Goizueta eea7bed2f3 Slightly more elegant results of queries 2018-05-08 20:41:42 +02:00
Javier Goizueta 741bcd1a80 Metadata fixes 2018-05-08 20:07:20 +02:00
Javier Goizueta 7d68a2967f Fix: callback expected errors in first argument 2018-05-08 13:08:26 +02:00
Javier Goizueta c647f852d6 Refactor metadata queries execution
Also fixed bug where sampling query generation needed results of count queries
2018-05-08 11:09:09 +02:00
Javier Goizueta 7561635b24 WIP:add layer metadata 2018-05-07 19:03:19 +02:00
Daniel García Aubert ac615b4a25 Merge branch 'separate-routers' into improve-folder-structure 2018-04-10 16:15:49 +02:00
Daniel García Aubert d1a4057a8d Rename user limits api by user limits backend 2018-04-10 10:16:07 +02:00
Daniel García Aubert 8519d2724b Rename tables extent api by tables extent backend 2018-04-10 09:40:09 +02:00
Daniel García Aubert ba36a47228 Rename overviews metadata api by overviews metadata backend 2018-04-09 19:47:43 +02:00
Daniel García Aubert e0d8dc0334 Rename filter stats api by filter stats backend 2018-04-09 18:56:01 +02:00
Daniel García Aubert 8dec4814a9 Rename AuthAppi by AuthBackend 2018-04-09 18:08:56 +02:00
Daniel García Aubert 6167562758 Meet application logic and folder struture 2018-04-09 16:18:30 +02:00
Daniel García Aubert 1059066c05 Use module to get database parameters 2018-03-22 17:53:24 +01:00
Daniel García Aubert 8ce72ea842 Do not pass res.locals to collaborators 2018-03-22 12:30:51 +01:00
Eneko Lakasta 26df09b13f require debug at the top of file 2018-02-28 11:42:44 +01:00
Eneko Lakasta 521b441da5 default apikey is returned by metadata module if no apikey found, remove this code because is never going to be run 2018-02-20 12:53:33 +01:00
Daniel García Aubert 603ef4044c Reduce cyclomatic complexity 2018-02-19 18:48:02 +01:00
Daniel García Aubert 2e3abfb2cd Catch "name not found" errors from metadata backend and set http code status 404 2018-02-19 18:28:58 +01:00
Eneko Lakasta 7b21bd26d0 Merge branch 'project-auth-api' into project-auth-api-fallback 2018-02-16 11:29:36 +01:00
Eneko Lakasta 4ac224688c in fallback mode, use default api key if api key token doesnt exist 2018-02-16 11:20:04 +01:00
Eneko Lakasta fc420c2c0f use for compatibility res.locals.api_key instead of res.locals.apikeyToken 2018-02-15 15:19:09 +01:00
Eneko Lakasta 5db0e9c8d8 add middleware for apikeyToken 2018-02-15 12:50:42 +01:00
Eneko Lakasta 890f0d1ef6 add fallback for using metadata fallback 2018-02-14 17:31:05 +01:00
Eneko Lakasta b0e9df1400 add pgConnection.getDatabaseParams 2018-02-08 12:04:03 +01:00
Eneko Lakasta 6ebf51ce45 let select apikey type in setDBAuth: regular, default, master 2018-02-08 11:29:17 +01:00
Eneko Lakasta 95538707c9 add parameter asMaster to setDBAuth 2018-02-07 17:14:13 +01:00
Eneko Lakasta 85c1c987af refactor setDBConn to not use step 2018-02-07 15:49:32 +01:00
Eneko Lakasta bde86323fd use master api key in setDBAuth 2018-02-07 15:36:24 +01:00
Eneko Lakasta 880e3f388d remove use of _.extend calls 2018-02-07 12:46:10 +01:00
Eneko Lakasta c1535b1a12 refactor setDBAuth to not use step 2018-02-07 12:40:36 +01:00
Ivan Malagon 02ac25181e Return error if no_filters and own_filter are present 2017-12-13 09:45:35 +01:00
Ivan Malagon 245d24ea29 Merge branch 'master' into analyses-filters-params 2017-12-12 11:54:32 +01:00
Ivan Malagon 605be77a04 Add nofilters query param 2017-12-12 11:54:09 +01:00
Daniel García Aubert 743bb0723b Add query param to define the number of categories to be ranked 2017-11-07 16:14:47 +01:00