How to get the query Id from looker?
Hi @Rit2804,
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.ema...
Please let me know if you have any questions.
Thanks,
Eric