Replies posted by Ryan_Tuck
Broadly speaking, we use the Looker API to run a specific look, then use the google sheets API to upload those look results to a target sheet. We use a single configuration spreadsheet where any user can add a new “pipe” that defines their Look URL and the target spreadsheet title / sheet title. We haven’t open-sourced the code so it’s not shareable unfortunately – sorry! Some gotchas to be aware of: The google API leverages a service account that is configured in GCP, and needs to be granted edit access to target spreadsheets I’d recommend using bulk actions wherever possible to load data to google sheets. Some python APIs, like gspread (at least, last time I checked), focus on individual cell updates, which IIRC was an inefficient approach for our use-case Delete cell contents, but don’t delete rows in the target sheet! Users will likely have formulae that are referencing cells in the data that gets loaded in. Ensure that monitoring is in-place, so that users can be aware of when th
We built an internal tool to pipe looks to google sheets on a daily / hourly cadence because our security team wasn’t fond of public look URLs. Users love it. I imagine a very similar thing could be done to write to Excel spreadsheets stored in Google Drive or something similar as long as they were accessible programmatically.
Yeah, generally agreed with the previous replies. I’d generally err on the side of a model containing a set of explorations related to some business domain. You can define the Model Set that any given Role can access, so if your Looker Roles map closely to actual business roles, that is a somewhat intuitive mapping. Keep in mind that finer-grain access control at the row/field level can/should be implemented (as far as I can tell) using access_grant and access_filter instead of model-based rules, but they’re a decent first pass at defining what data generally an individual should need to work with.
👋 Hey @Carl_Anderson! I haven’t necessarily seen anything like that outside of a handful of style guides I’ve seen. It seems like a linter could detect repetition, multiple views in one file, etc. Would also welcome any feature requests / PRs on our end via github issues on lookmlint.
Seems like a pretty good solution to the problem Greg - thanks for the thoughtful response. I guess I’d now consider this a feature request to create some sort of regex_match() function available to custom filters. Will post here if we figure out a separate solution.
this is awesome! i’ve been looking for more CLI stuff for editing lookml, as our main project has grown so large that editing lookml in-browser is an awful experience. specifically, i’m interested in using this to be able to parse our lookml dimensions for a known set of acronyms to ensure we’re including labels in those dimensions so they display properly.
Already have an account? Login
Login to the community
No account yet? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.