Using Looker SDK to create reports

I'd like to use Looker SDK to create reports, however do not find much reference on how to do that.

Any pointers are appreciated.

Solved Solved
1 5 604
3 ACCEPTED SOLUTIONS

I think a good place to start would be the SDK overview documentation: https://cloud.google.com/looker/docs/api-sdk 

If you want to run queries, the query APIs are probably what you want: https://developers.looker.com/api/explorer/4.0/methods/Query 

if you're wanting to actually create content in Looker, maybe check out the dashboard APIs: https://developers.looker.com/api/explorer/4.0/methods/Dashboard

View solution in original post

What exactly are you looking to do with the SDK? There are a bunch of python examples in this SDK repo here: https://github.com/looker-open-source/sdk-codegen/tree/main/examples/python

I'm not aware of any videos walking through the SDK usage. 

View solution in original post

Gotcha, in that case the easiest thing to do would probably be to create something similar to what you want to create via the API in the UI. Save it as a look, then using the SDK, use the get_look function to retrieve the contents of that look. you can then examine the payload and get an idea of what the request needs to look like to run the look or edit it via the SDK. 

View solution in original post

5 REPLIES 5

I think a good place to start would be the SDK overview documentation: https://cloud.google.com/looker/docs/api-sdk 

If you want to run queries, the query APIs are probably what you want: https://developers.looker.com/api/explorer/4.0/methods/Query 

if you're wanting to actually create content in Looker, maybe check out the dashboard APIs: https://developers.looker.com/api/explorer/4.0/methods/Dashboard

I am aware about the documentation, however not very clear on how to use it for my purpose through a python code. Any video/notebook would help

What exactly are you looking to do with the SDK? There are a bunch of python examples in this SDK repo here: https://github.com/looker-open-source/sdk-codegen/tree/main/examples/python

I'm not aware of any videos walking through the SDK usage. 

I want to create and update reports in Looker for various graph types, multiple measures etc.

Gotcha, in that case the easiest thing to do would probably be to create something similar to what you want to create via the API in the UI. Save it as a look, then using the SDK, use the get_look function to retrieve the contents of that look. you can then examine the payload and get an idea of what the request needs to look like to run the look or edit it via the SDK.