This code is a bit of a work in progress, as I have it set to work with only a single look at the moment.
Having said that, the logic works, so we would just need to work with the syntaxing.
! pip install looker_sdk
from looker_sdk import models, error
os.environ['LOOKERSDK_CLIENT_ID'] = 'XXXXX'
sdk = looker_sdk.init31()
#Grab the query id of the Look/s in the original dashboard
dashboard = sdk.dashboard(
query_id = dashboard["dashboard_elements"]["look"]["query"]["id"]
#Create a new dashboard in the folder you want to
create_dashboard = sdk.create_dashboard(
#Grab the id of the newly created dashboard
new_dashboard = sdk.search_dashboards(
dashboard_id = new_dashboard["id"]
#Add the Look as a look-less tile to your new dashboard
update_dashboard = sdk.create_dashboard_element(
The coding itself is explained in the comments, however the idea behind this is that when we manually copy a dashboard with looks attached in the Looker UI, those looks also get moved into the new folder.
It is fairly common that we don’t actually want to copy those, and manually converting can get tiresome if this is a standard practice at your company.
Next steps would be adding some loops so that everything will work with multiple queries, and also fleshing out with dashboard text-tiles/look-less tiles also being transferred!