Map instantiation fails when map is created from shared dataset
See original GitHub issueWorking on #9516 I faced a trouble related to the query and the map instantiation. Follow theses steps to reproduce it:
- Share a dataset with write permission. Don’t qualified the sql query (aka, include the username as part of the table name in the query).
- Using the user that it’s shared with, create a map from this dataset.
- 💥
Dashboard has some errors: Error: Map instantiation failed
.
This is happening because the queries present in the vizJSON are not qualified with the owner’s username.
This is hard to fix in the frontend (in the right way) because the map is initially instantiated in the deep-insight (and cartodb.js) side, from the data coming from the vizJSON. I tried to patch the vizJSON to fix the queries, and it solves the issue, but the solution smells. I feel the queries should come qualified in the vizJSON, in the same manner as table_name
properties.
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (11 by maintainers)
Top Results From Across the Web
Map execution error and warning messages - IBM
This occurs when mapping data of a component that has a RESTART assigned to it, and at least one instance of the component...
Read more >Map initialization fails on mobile devices · Issue #480 - GitHub
Using Unity 2017.3.0p1 and Mapbox 1.3.0 (from master), my maps will not initialize on mobile devices. They have been thoroughly tested in ...
Read more >Failure on initialization of unordered map - Stack Overflow
I have a large dataset I am trying to manipulate. I am holding active elements in a list, and removing them when they...
Read more >Frequently asked questions about distributed collaboration
This topic lists questions or issues that you may encounter when working with distributed collaboration and suggests possible solutions.
Read more >Scale out databases with the shard map manager
For a single-tenant model, create a list-mapping shard map. The single-tenant model assigns one database per tenant.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Final decision after some offline discussion. On map creation we will reset the styles from the dataset, but keep the query that’s been applied (in order to avoid surprises when going from the dataset preview to create a new map). So basically, we are just keeping the query, rewritten. Of course, this is toggled by builder activation.
This is being done in #9749 (queries) and #9726 (styles).
Agreed. I dislike having add layer creating the layer options in frontend and map creation doing it in backend, but I think the best solution for doing thing at creation time is in the backend.
Note that for this issue we will have to check if the builder is enabled or not to toggle the behaviour, as we want to keep the old behaviour (copy map with TableBlender) for the editor.