How to get the query Id from looker?
You can use system activity or /admin/queries when the query is run and look at the details section. It will also appear to the right of the source column on the main page of /admin/queries when run. Or you can get the slug in the url of the query and use the query_for_slug endpoint.
q = sdk.query(query_id=ID)print(q.fields)
q2 = sdk.query_for_slug(slug="SLUG")print(q2.fields)
An example system activity query would look like this:HOSTNAME/explore/system__activity/history?fields=query.id,query.link,query.model,query.slug,user.email,user.id,query.formatted_fields&sorts=query.id&limit=500&query_timezone=UTC&vis=%7B%7D&filter_config=%7B%7D&origin=share-expanded
Please let me know if you have any questions.
Already have an account? Login
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.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.