Comments (2)
(Followup)
Querying the first measurement:
http://<mymap>/api/v2/sql?q=SELECT%20OBS_GetMeta((SELECT%20ST_SetSRID(ST_Extent(the_geom)%2C%204326)%20FROM%20(SELECT%20*%20FROM%20untitled_table_4)%20q)%2C%20%27%5B%7B%22numer_id%22%3A%22es.ine.t1_1%22%2C%22numer_timespan%22%3A%222015%22%2C%22normalization%22%3A%22prenormalized%22%7D%5D%27)&api_key=<my_api_key>
returns
{"rows":[{"obs_getmeta":[{"id":1,"numer_id":"es.ine.t1_1","timespan_rank":1,"score_rank":1,"timespan_rownum":1,"score_rownum":1,"score":18.055877553474502,"suggested_name":"total_pop_2015","numer_aggregate":"sum","numer_colname":"total_pop","numer_geomref_colname":"cusec_id","numer_tablename":"obs_24b656e9e23d1dac2c8ab5786a388f9bf0f4e5ae","numer_type":"Numeric","numer_description":"","numer_t_description":null,"denom_aggregate":null,"denom_colname":null,"denom_geomref_colname":null,"denom_tablename":null,"denom_type":null,"denom_reltype":null,"denom_description":null,"denom_t_description":null,"geom_colname":"the_geom","geom_geomref_colname":"cusec_id","geom_tablename":"obs_01b060d28ba00522076d6f7d7e8939adc6069c28","geom_type":"Geometry","geom_timespan":"2011","geom_description":"The smallest division of the Spanish Census.","geom_t_description":null,"numer_timespan":"2015","numer_name":"Total population","denom_name":null,"geom_name":"Sección Censal","normalization":"prenormalized","max_timespan_rank":null,"max_score_rank":null,"target_geoms":null,"target_area":null,"num_geoms":0.0912014279825554,"denom_id":null,"geom_id":"es.ine.the_geom"}]}],"time":0.169,"fields":{"obs_getmeta":{"type":"JSON"}},"total_rows":1}
And executing the query:
SELECT * FROM cdb_observatory.OBS_GetData(ARRAY[(ST_Transform(ST_Buffer(ST_Transform(ST_SetSRID(ST_MakePoint(-4, 41), 4326), 3857), 250), 4326), 1)::geomval], '[{"id":1,"numer_id":"es.ine.t1_1","timespan_rank":1,"score_rank":1,"timespan_rownum":1,"score_rownum":1,"score":18.055877553474502,"suggested_name":"total_pop_2015","numer_aggregate":"sum","numer_colname":"total_pop","numer_geomref_colname":"cusec_id","numer_tablename":"obs_24b656e9e23d1dac2c8ab5786a388f9bf0f4e5ae","numer_type":"Numeric","numer_description":"","numer_t_description":null,"denom_aggregate":null,"denom_colname":null,"denom_geomref_colname":null,"denom_tablename":null,"denom_type":null,"denom_reltype":null,"denom_description":null,"denom_t_description":null,"geom_colname":"the_geom","geom_geomref_colname":"cusec_id","geom_tablename":"obs_01b060d28ba00522076d6f7d7e8939adc6069c28","geom_type":"Geometry","geom_timespan":"2011","geom_description":"The smallest division of the Spanish Census.","geom_t_description":null,"numer_timespan":"2015","numer_name":"Total population","denom_name":null,"geom_name":"Sección Censal","normalization":"prenormalized","max_timespan_rank":null,"max_score_rank":null,"target_geoms":null,"target_area":null,"num_geoms":0.0912014279825554,"denom_id":null,"geom_id":"es.ine.the_geom"}]');
returns the expected value:
'[{"value":3.38578494040731}]'
Querying the second measurement:
http://<mymap>/api/v2/sql?q=SELECT%20OBS_GetMeta((SELECT%20ST_SetSRID(ST_Extent(the_geom)%2C%204326)%20FROM%20(SELECT%20*%20FROM%20untitled_table_4)%20q)%2C%20%27%5B%7B%22numer_id%22%3A%22es.ine.t1_1%22%2C%22numer_timespan%22%3A%222015%22%2C%22normalization%22%3A%22area%22%7D%5D%27)&api_key=<my_api_key>
returns
{"rows":[{"obs_getmeta":[{"id":1,"numer_id":"es.ine.t1_1","timespan_rank":1,"score_rank":1,"timespan_rownum":1,"score_rownum":1,"score":18.055877553474502,"suggested_name":"total_pop_per_sq_km_2015","numer_aggregate":"sum","numer_colname":"total_pop","numer_geomref_colname":"cusec_id","numer_tablename":"obs_24b656e9e23d1dac2c8ab5786a388f9bf0f4e5ae","numer_type":"Numeric","numer_description":"","numer_t_description":null,"denom_aggregate":null,"denom_colname":null,"denom_geomref_colname":null,"denom_tablename":null,"denom_type":null,"denom_reltype":null,"denom_description":null,"denom_t_description":null,"geom_colname":"the_geom","geom_geomref_colname":"cusec_id","geom_tablename":"obs_01b060d28ba00522076d6f7d7e8939adc6069c28","geom_type":"Geometry","geom_timespan":"2011","geom_description":"The smallest division of the Spanish Census.","geom_t_description":null,"numer_timespan":"2015","numer_name":"Total population","denom_name":null,"geom_name":"Sección Censal","normalization":"area","max_timespan_rank":null,"max_score_rank":null,"target_geoms":null,"target_area":null,"num_geoms":0.0912014279825554,"denom_id":null,"geom_id":"es.ine.the_geom"}]}],"time":0.167,"fields":{"obs_getmeta":{"type":"JSON"}},"total_rows":1}
And executing the query:
SELECT * FROM cdb_observatory.OBS_GetData(ARRAY[(ST_Transform(ST_Buffer(ST_Transform(ST_SetSRID(ST_MakePoint(-4, 41), 4326), 3857), 250), 4326), 1)::geomval], '[{"id":1,"numer_id":"es.ine.t1_1","timespan_rank":1,"score_rank":1,"timespan_rownum":1,"score_rownum":1,"score":18.055877553474502,"suggested_name":"total_pop_per_sq_km_2015","numer_aggregate":"sum","numer_colname":"total_pop","numer_geomref_colname":"cusec_id","numer_tablename":"obs_24b656e9e23d1dac2c8ab5786a388f9bf0f4e5ae","numer_type":"Numeric","numer_description":"","numer_t_description":null,"denom_aggregate":null,"denom_colname":null,"denom_geomref_colname":null,"denom_tablename":null,"denom_type":null,"denom_reltype":null,"denom_description":null,"denom_t_description":null,"geom_colname":"the_geom","geom_geomref_colname":"cusec_id","geom_tablename":"obs_01b060d28ba00522076d6f7d7e8939adc6069c28","geom_type":"Geometry","geom_timespan":"2011","geom_description":"The smallest division of the Spanish Census.","geom_t_description":null,"numer_timespan":"2015","numer_name":"Total population","denom_name":null,"geom_name":"Sección Censal","normalization":"area","max_timespan_rank":null,"max_score_rank":null,"target_geoms":null,"target_area":null,"num_geoms":0.0912014279825554,"denom_id":null,"geom_id":"es.ine.the_geom"}]');
returns the expected value:
'[{"value":30.4982346984447}]'
Querying both measurements (OBS_GetData
)
SELECT * FROM cdb_observatory.OBS_GetData(ARRAY[(ST_Transform(ST_Buffer(ST_Transform(ST_SetSRID(ST_MakePoint(-4, 41), 4326), 3857), 250), 4326), 1)::geomval], '[{"id":1,"numer_id":"es.ine.t1_1","timespan_rank":1,"score_rank":1,"timespan_rownum":1,"score_rownum":1,"score":18.055877553474502,"suggested_name":"total_pop_per_sq_km_2015","numer_aggregate":"sum","numer_colname":"total_pop","numer_geomref_colname":"cusec_id","numer_tablename":"obs_24b656e9e23d1dac2c8ab5786a388f9bf0f4e5ae","numer_type":"Numeric","numer_description":"","numer_t_description":null,"denom_aggregate":null,"denom_colname":null,"denom_geomref_colname":null,"denom_tablename":null,"denom_type":null,"denom_reltype":null,"denom_description":null,"denom_t_description":null,"geom_colname":"the_geom","geom_geomref_colname":"cusec_id","geom_tablename":"obs_01b060d28ba00522076d6f7d7e8939adc6069c28","geom_type":"Geometry","geom_timespan":"2011","geom_description":"The smallest division of the Spanish Census.","geom_t_description":null,"numer_timespan":"2015","numer_name":"Total population","denom_name":null,"geom_name":"Sección Censal","normalization":"area","max_timespan_rank":null,"max_score_rank":null,"target_geoms":null,"target_area":null,"num_geoms":0.0912014279825554,"denom_id":null,"geom_id":"es.ine.the_geom"},{"id":2,"numer_id":"es.ine.t1_1","timespan_rank":1,"score_rank":1,"timespan_rownum":1,"score_rownum":1,"score":18.055877553474502,"suggested_name":"total_pop_2015","numer_aggregate":"sum","numer_colname":"total_pop","numer_geomref_colname":"cusec_id","numer_tablename":"obs_24b656e9e23d1dac2c8ab5786a388f9bf0f4e5ae","numer_type":"Numeric","numer_description":"","numer_t_description":null,"denom_aggregate":null,"denom_colname":null,"denom_geomref_colname":null,"denom_tablename":null,"denom_type":null,"denom_reltype":null,"denom_description":null,"denom_t_description":null,"geom_colname":"the_geom","geom_geomref_colname":"cusec_id","geom_tablename":"obs_01b060d28ba00522076d6f7d7e8939adc6069c28","geom_type":"Geometry","geom_timespan":"2011","geom_description":"The smallest division of the Spanish Census.","geom_t_description":null,"numer_timespan":"2015","numer_name":"Total population","denom_name":null,"geom_name":"Sección Censal","normalization":"prenormalized","max_timespan_rank":null,"max_score_rank":null,"target_geoms":null,"target_area":null,"num_geoms":0.0912014279825554,"denom_id":null,"geom_id":"es.ine.the_geom"}]');
Also returns the expected value:
'[{"value":30.4982346984447},{"value":3.38578494040731}]'
from camshaft.
Yes, IIRC the DO part works, this is a problem with the analysis in camshaft itself, and how it generates the column names.
from camshaft.
Related Issues (20)
- DO: Error augmenting with text columns HOT 1
- Allow executing arbitrary SQL for analysis preparation HOT 7
- Performance research: run independent analyses in parallel HOT 1
- Prevent column name collisions in node queries HOT 2
- Depricated SQL nodes not working HOT 18
- Review sql queries to improve planning with IMMUTABLE and PARALLEL functions HOT 6
- Invalid geometries generated with Area of Intereset HOT 1
- Poor SQL for nearest neighbor join
- Force "merge" analysis to be cached HOT 2
- Map instantiation: Get columns from cache table instead of using `LIMIT 0` when avaiblable HOT 9
- Add .npmignore HOT 1
- IMHO Misleading `limits_error` message
- Uncaught exception in some Batch API errors HOT 1
- Polygons from geometries analysis should be cached HOT 1
- Uncaught exception: Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed HOT 17
- Error with reserved words
- Replace CDB_QueryTables_Updated_At with cartodb-query-tables HOT 1
- Noise in the analysis logs HOT 4
- Uncaught exception: Range filter expect to have at least one value in greater_than, greater_than_or_equal, less_than, less_than_or_equal, min, or max numeric params
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camshaft.