Commit Graph

79 Commits

Author SHA1 Message Date
Jesús Arroyo Torrens
925328c43b Fix bug in date-wrapper regarding to columns with spaces 2018-08-16 13:38:26 +02:00
Simon Martín
37f6ac0c87 Merge branch 'master' into tilejson-url-apikey 2018-06-26 10:23:09 +02:00
Simon Martín
79fdd07d8f adding api key to tiles base urls with querystring 2018-06-25 16:23:23 +02:00
Simon Martín
762dce7853 adding api key to tiles base urls 2018-06-22 17:31:45 +02:00
Javier Goizueta
e0cd1aba29 Refactor: move common token substitutions to query-utils 2018-06-18 13:15:45 +02:00
IagoLast
649297df83 Use early return 2018-06-13 09:42:53 +02:00
IagoLast
ae7e7578db Use early return 2018-06-13 09:38:24 +02:00
Javier Goizueta
0cf6605b8d Use more precise function name 2018-06-12 12:59:10 +02:00
Javier Goizueta
4a52620d83 Various fixes
This avoids errors when trying to wrap dates or detect wrapped dates in non-mapnik layers
2018-06-12 12:05:31 +02:00
Javier Goizueta
55f6241769 Add date wrapping metadata 2018-06-05 15:39:01 +02:00
IagoLast
2ee6c8487d PR style fixes 2018-06-05 08:44:20 +02:00
elenatorro
d4c6282455 Refactor date wrapper 2018-05-31 18:53:01 +02:00
elenatorro
db3370cd21 Use wrapDates function from vector adapter 2018-05-31 18:46:23 +02:00
elenatorro
4213e3163a Move queryPromise function 2018-05-31 18:37:43 +02:00
IagoLast
3850bbb68e Send dates as unix epoch instead strings in .mvt files
This commit creates a new ConfigAdapter used in vector maps instantiations.
This adapter generates a new sql query for ONE SINGLE LAYER (carto-vl currently only supports one layer per mvt)
where the date columns are wrapped into a epoch using the `date_part` function.

Due this mvt files are smaller since we use numbers instead strings to represent dates, this is also faster in carto-gl
where we interpolate linearly between 0 and 1 to create animations.

Notice we should add a parameter to make this transformation optional.
We also should take into account the epoch precission.
2018-05-31 17:49:40 +02:00
Javier Goizueta
8a1d5d3a48 Be careful and detect type invalid types 2018-05-28 17:36:58 +02:00
Javier Goizueta
4bb8914d9a Add parameters to select metadata sample columns 2018-05-28 16:08:31 +02:00
Javier Goizueta
32092d212e Fix bug 2018-05-21 14:05:27 +02:00
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
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
24b1b53ba0 Merge branch 'master' into metadata 2018-05-11 18:58:38 +02:00
Javier Goizueta
3b4668cc19 Fix simple tabley sampling 2018-05-11 14:45:12 +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
b96be69a5c Clarify example 2018-05-08 13:08:01 +02:00
Javier Goizueta
636cd8cd50 Fix:phase execution
phase (not only its tasks) must be executed after the tasks of previous phases
2018-05-08 12:56:06 +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
ebab879aca Fix bugs & typos 2018-05-08 11:07:47 +02:00
Javier Goizueta
7561635b24 WIP:add layer metadata 2018-05-07 19:03:19 +02:00
Daniel García Aubert
a21d7db390 Extract json-replacer 2018-04-03 13:21:41 +02:00
Daniel García Aubert
8ce72ea842 Do not pass res.locals to collaborators 2018-03-22 12:30:51 +01:00
Daniel García Aubert
02f93f3a14 Extract layergroup-metadata class 2018-03-09 12:58:05 +01:00
Javier Goizueta
7641542e67 Check the type of the_geom_webmercator for aggregation
Fixes #841
2018-01-29 15:48:35 +01:00
Eneko Lakasta
0236935212 please jshint 2018-01-11 12:22:51 +01:00
Eneko Lakasta
ae48a01e26 extract setICUEnvVariable() to it's own module 2018-01-11 11:57:11 +01:00
Daniel García Aubert
a987f6ac05 Fix issue when the sql has single quotes defined and the aggregation metadata query was not able to estimate row count 2017-12-14 14:14:55 +01:00
Daniel García Aubert
006dd86614 Merge branch 'master' into mapconfig-aggregation 2017-12-11 17:36:58 +01:00
Daniel García Aubert
dab204ea71 Do not aggregate if rows cout is lower than threshold or the layer's sql has geometries distinct of points 2017-12-11 17:32:06 +01:00
Raul Marin
dfe01c836c Escape getQueryRowCount with $$ 2017-12-11 11:27:13 +01:00
Raul Marin
fcbf5ffcc5 Move sql helper functions to query-utils.js 2017-12-11 11:27:13 +01:00
Mario de Frutos
ed56094be2 PR changes 2017-05-18 11:51:12 +02:00
Raul Ochoa
c539d4fbbd Change camshaft naming from filters 2016-07-06 21:11:39 +02:00
Raul Ochoa
863128013d Use psql client instead of pg query runner to use proper params 2016-06-21 12:08:40 +02:00
Raul Ochoa
403dcbebcd Use an empty array as default value for falsy ramps
Fixes #507
2016-06-20 13:27:39 +02:00
Raul Ochoa
01a69ef15c Merge remote-tracking branch 'origin/master' into mapconfig-reorg 2016-05-23 15:14:25 +02:00
Raul Ochoa
fb045f1836 Merge branch 'master' into turbo-carto-tokens 2016-05-23 15:06:55 +02:00
Raul Ochoa
ee49b8b2a2 Turbo-carto adapter into adapters package 2016-05-23 14:18:58 +02:00
Raul Ochoa
b308259e6f Merge branch 'master' into turbo-carto-category
Conflicts:
	lib/cartodb/utils/style/postgres-datasource.js
2016-05-19 16:58:31 +02:00
Raul Ochoa
14a0afc7c0 Merge branch 'master' into turbo-carto-tokens 2016-05-19 16:56:00 +02:00
Raul Ochoa
424cc6d93b Fail on turbo-carto invalid quantification methods 2016-05-19 15:54:58 +02:00