question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Map instantiation fails when map is created from shared dataset

See original GitHub issue

Working 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.

screen shot 2016-08-24 at 11 50 16

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:closed
  • Created 7 years ago
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
javitoninocommented, Sep 14, 2016

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).

1reaction
javitoninocommented, Aug 30, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found