Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable the ability to switch from gui to sql after running a question #607

Closed
agilliland opened this issue Jul 12, 2015 · 16 comments
Closed
Milestone

Comments

@agilliland
Copy link
Contributor

agilliland commented Jul 12, 2015

once you start down building a card and run it, there's no way to change to sql without starting over. This is most problematic if you just need to do something more advanced on a card and it's already properly placed on a dash. Makes more sense to be able to write sql for the same card.

@snarfed
Copy link

snarfed commented Sep 28, 2015

+1!

@jgvandehey
Copy link

+1

1 similar comment
@AdamLandis
Copy link

+1

@tlrobinson
Copy link
Contributor

Bonus points: it would be pretty neat if when switching from GUI to SQL mode we could pre-populate the SQL editor with the SQL that would be generated by the GUI question. That said, I know the SQL queries we generate can be pretty verbose, so I'm not sure we want to show the user (even power users) "how the sausage is made", so to speak.

@salsakran
Copy link
Contributor

@tlrobinson +100

@camsaul
Copy link
Member

camsaul commented Mar 1, 2016

Most of the time the SQL we generate is parameterized, e.g. something like

SELECT *
FROM "my.table"
WHERE "my.table.field" = ?

So it's not like you can run the SQL we generate anyway 🙀

@salsakran
Copy link
Contributor

well, presumably, we could take the parameterized sql and insert the parameters in place of the ?. Maybe we could find a javascript model on npm that could deal with that sort of craziness

@tmyoon
Copy link

tmyoon commented Mar 1, 2016

+1

1 similar comment
@rossgeesman
Copy link

+1

@salsakran
Copy link
Contributor

This has no UX features, so aside from the difficulty of replacing parameterized SQL with the values (via string interpolation), this is ready to be worked on.

@agilliland
Copy link
Contributor Author

I think there are still some real UX implications with this one. The most obvious of which is where to put the toggle between SQL and GUI mode when it would need to be on the screen at all times. Currently it only needs to be there briefly on a new question and takes the place of several other buttons which aren't relevant on a new question. Or maybe there is a different UI mechanic for making this transition after a GUI card is formed?

We'll also want to be very clear about the UX around what happens after you do this and are looking at the SQL view, such as if there is any way to get back to GUI mode, etc.

@salsakran
Copy link
Contributor

This issue is limited to just the movement from GUI -> SQL and is a one-way transition.

In my mind, the toggle would remain on the GUI query builder. @kdoh + @mazameli, could we take a look at this?

@agilliland agilliland changed the title new card builder:way to switch from gui to sql after running gui Enable the ability to switch from gui to sql after running a question May 3, 2016
@that0n3guy
Copy link

+1

1 similar comment
@gincor
Copy link

gincor commented May 4, 2016

+1

@mazameli
Copy link
Contributor

mazameli commented May 5, 2016

Here's a prototype with a proposal for where to put the toggle and how this will all work. Once the prototype loads, click on the flashing blue dot to start the tour:

https://invis.io/WK77GMQM8#/156383432_New_Question

@kdoh @salsakran: let me know if you have any final thoughts.

@salsakran
Copy link
Contributor

I think it works. I would want to revisit the icon placement and reduce the number of different kinds of icons as we get into working on QB3 =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests