Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

backend: provide grid names #474

Open

Description

@n-riesco

cc/ @tarzzz @mfix22 @briandennis

Re/ this comment in #472.

At the moment, a request to Falcon's GET /queries returns an array of query objects {requestor, fid, uids, refreshInterval, query, connectionId} that doesn't include grid name.

The proposal here is that we ensure the returned query objects include the property filename. With this approach, #472 wouldn't need additional code to request the grid names.


@tarzzz I imagine that for a given fid, the grid name (filename?) can change (i.e. users are allowed to rename the grid without changing its fid). Is that so?

If this is the case, there is no point in saving the grid name in Falcon's queries.yml. Instead, requests to GET /queries and GET /queries/:fid should trigger requests to getGridMeta.


Note to myself. This proposal requires that we change the logic in https://github.com/plotly/falcon-sql-client/blob/52a78ed13b196024dc2e985ebbd1b1780e84677a/backend/routes.js#L658-L703

Activity

  1. self-assigned this
    on Jul 3, 2018
  2. nicolaskruchten commented on Jul 3, 2018

    @nicolaskruchten
    Contributor

    This could get expensive if there are 100 queries, that's 100 calls to the API right?

  3. tarzzz commented on Jul 3, 2018

    @tarzzz
    Contributor

    I imagine that for a given fid, the grid name (filename?) can change (i.e. users are allowed to rename the grid without changing its fid). Is that so?

    That's correct.

  4. n-riesco commented on Jul 3, 2018

    @n-riesco
    ContributorAuthor

    This could get expensive if there are 100 queries, that's 100 calls to the API right?

    https://api.plot.ly/v2/grids#lookup doesn't support listing all files :(

  5. tarzzz commented on Jul 3, 2018

    @tarzzz
    Contributor

    @n-riesco You should be able to use: https://api.plot.ly/v2/folders#all (with the query-parameter as grid ) to get all the grids for that user.. (which can then be filtered for the fid from falcon .. !!

  6. nicolaskruchten commented on Jul 3, 2018

    @nicolaskruchten
    Contributor

    That will also be very expensive if there are many grids... some users have 10k grids

  7. nicolaskruchten commented on Jul 3, 2018

    @nicolaskruchten
    Contributor

    What we would need is to ask the API "what are the names of these N fids?"

  8. tarzzz commented on Jul 3, 2018

    @tarzzz
    Contributor

    That will also be very expensive if there are many grids... some users have 10k grids

    True. Unfortunately, we don't have any endpoint at the moment which takes a list of fids and return only their metadata.. !! Either we can list them all, or we can get them iteratively using detail endpoint.. !!

  9. nicolaskruchten commented on Jul 3, 2018

    @nicolaskruchten
    Contributor

    Yep, and what I'm saying is that neither of these are going to be great from a performance POV.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions