SQL Vis, Autocomplete, URLs

Friday Demos · September 8, 2023 · 7:49

Transcript

This transcript is auto-generated. Names and product terms may be wrong.

  1. I've got a a bucket of a bunch of small things um this one there's an issue where when we so when we purse or when we don't parse SQL queries rather uh we don't really have a lot of metadata about the result set and so we currently default assume everything's a dimension um and so when you swap between different chart types you can get in the scenario where you get Dimension Dimension plots and in this case uh traffic source is being used twice so it's a pretty simple fix just basically now we investigate um the return data and see if something looks numeric then we flip that and uh favorite on the on the rotated y-axis here so that's one so now it just it's

  2. persisted like it should always it doesn't get double encoded the next one was this funny issue where for some reason some of the one of the libraries we use to encode URL params text on this trailing underscore and that underscore doesn't get picked up when you embed it in different contexts like GitHub issues and a couple of other places so now when we generate a link uh I put in a happy ASCII smiley face at the end instead so now those links work uh the net effect obviously is like people share these links all the time and then if uh if they accidentally get this unencoded link like this will just 404 so they were seeing this which is not desirable um the next thing

  3. I added basically for embed so now when you click this modal this this is behind a flag still um and we're just keeping it to ourselves until we plan an embed launch but uh basically I added the flag up here in the URL bar so um now you can quickly copy an iframe tag you can also optionally include filters on the links and that goes for the the share link here and the share link here there's that um this one was super fun for some reason in the uh the yaml autocomplete Library we're using um the library is this interesting mashup where it's it's it's basically trying to use a Json spec to do validation on the yaml and the two formats are logically interchangeable

  4. but syntactically are very different and for whatever reason um uh I still don't understand it but the library author whenever they see a Json spec uh declaration that says the falling value should be an array or should be uh like an integer um they insert these strange symbols and I've opened a ticket with them asking them why they're doing this because as far as I know it's not part of the yaml spec it's not part of the Json spec um I suspect they're assumption is that they provide this autocomplete as sort of a placeholder and then you can fill it in with something you want so that's basically exactly what I did I just scan for any of those tokens and like in the case

  5. of Alias the autocomplete now just provides uh an array literal literal syntax um see there's also like people which display order is an example of the integer so instead of inserting like some weird value like that just play a little now just inserts an integer um there's another really good one query query was like it actually does a complicated insert because it the Json spec knows that these two things were required and it was inserting something that looks like this um so now you know and so it's something that to me seems a little bit nicer um and we get all the nice rich warnings and stuff still and then the last one was uh in our SQL editor and Fields um custom fueled editor

  6. some of the autocomplete definitions had gotten uh off the rails a bit and so now if you I mean I guess I can just do it in the field editor but now if you do something like users um you get more of what you'd expect in my opinion um you can you know you can still say to like get like SQL autocomplete um none of the field values are coming back is undefined and I also cleaned up a little bit of like how we display the um the labels so if there are labels associated with the field they appear as plain text you can still I think I have a demo which is like oh wait sorry this is on playground on my local um

  7. we could just to make this super concrete we could go to the model users um so I guess we could just search for like root so you can type root and didn't do what I expected it to all good demos have bugs uh okay so I've found it here I had expected the search precedence to be higher for this but um but it's appearing correctly and highlighting now which in the past it wasn't uh or it would just show you something vague that said undefined so I think the next thing to try to fix here although it's lower priority is just getting the search rankings um a library like there's a way to manually override them and we we try to force it to set

  8. the field precedence as highest um but the library seems to be trampling that in certain cases like this root example which I would definitely expect a field to to override this um but generally better than what it was before