-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dashboard validation failure on import #189
Comments
Can you provide more info? |
so when i do I get a dashboard validation error as above with no specific error. Is there other information you are looking for? |
What version of gazer are you using? Version 0.3.0 and later may have much
better error information.
…On Thu, May 4, 2023 at 4:50 PM Alice Jinglu Lu ***@***.***> wrote:
so when i do
step 1) use gzr dashboard cat measurement::measurement --host=xxx
--port=443 —dir ./
step 2) rename the json from step 1 to new.json
step 3) gzr dashboard import new.json '333' --host=xxxx --port=443
I get a dashboard validation error as above with no specific error. Is
there other information you are looking for?
—
Reply to this email directly, view it on GitHub
<#189 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSDEEPI25OLMN7XNANYNM3XEQJA3ANCNFSM6AAAAAAXWG3NMY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I am using v0.3.2 actually. i don't see the error summary as some of the other posts. |
Darn. Try adding `--trim` to the dashboard cat command. It will result in a
smaller json file that may make it easier to troubleshoot.
…On Thu, May 4, 2023 at 5:16 PM Alice Jinglu Lu ***@***.***> wrote:
I am using v0.3.2 actually. i don't see the error summary as some of the
other posts.
—
Reply to this email directly, view it on GitHub
<#189 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSDEELCCOJPOOUIRFBB6CLXEQMC7ANCNFSM6AAAAAAXWG3NMY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
thanks for the suggestion! I tried to do gzr dashboard cat measurement::measurement --host=xxx.looker.com --trim > test.json I still don't get the error summary.. any other suggestions i could try? |
Are you trying to export a lookml dashboard? That isn't supported.
|
Yes it's a lookml dashboard. was it always not supported? we been using gzer to export the lookml dashboard into json (saved to git) then export to UDD in an automated process for a year now. it only started breaking since gzr upgraded to 0.2.9 |
That was never a tested scenario. It might have worked with api 3.1 but
isn't working now since we moved to api 4.0.
There is an API to create a UDD from a LookML Dashboard.
https://developers.looker.com/api/explorer/4.0/methods/Dashboard/import_lookml_dashboard
I can add that to the next release of gazer.
Regards,
Mike
…On Fri, May 5, 2023 at 12:16 PM Alice Jinglu Lu ***@***.***> wrote:
Yes it's a lookml dashboard. was it always not supported? we been using
gzer to export the lookml dashboard into json (saved to git) then export to
UDD in an automated process for a year now. it only started breaking since
gzr upgraded to 0.2.9
—
Reply to this email directly, view it on GitHub
<#189 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSDEEI7GNTH22S2GFRSORTXEURWZANCNFSM6AAAAAAXWG3NMY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Version 0.3.5 has a command |
Great thank you!! |
This is great - thank you Mike! I was able to use the new command and import the dashboard to a folder successfully. |
I'm not following. Can you explain exactly what you are doing and what you
expect to happen?
Thanks
Mike
…On Mon, May 8, 2023 at 3:16 PM Pratheeban Premathas < ***@***.***> wrote:
This is great - thank you Mike! I was able to use the new command and
import the dashboard to a folder successfully.
However, I have this dashboard added to a couple of boards, so when I try
to import the dashboard a second time after I made some lookml updates, the
dashboard is overwritten in the folder like I expected but they have been
removed from the boards since it is being treated as a new dashboard.
Is there a way to ensure the boards don't lose the linked dashboards?
—
Reply to this email directly, view it on GitHub
<#189 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSDEEMU4MWEUYJTYJ3N6Q3XFFBCFANCNFSM6AAAAAAXWG3NMY>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Sure. I was able to successfully deploy a dashboard 'abc' under a specific target folder after I ran the command I expected the target folder to now have the updated abc dashboard (to overwrite the old version) and it did. I also expected Board A which had the abc dashboard to be updated automatically as well but instead Board A was now empty. Is there a way to preserve the same URL for when re-deploying a dashboard using this gazer command, so that any board(s) referencing the dashboard doesn't break? |
Thanks for the explanation. I understand now. I need to do some research to
figure out how to handle this.
Mike
…On Tue, May 9, 2023 at 2:10 AM Pratheeban Premathas < ***@***.***> wrote:
Sure. I was able to successfully deploy a dashboard 'abc' under a specific
target folder after I ran the command gzr dashboard import_lookml
abc::abc '334' --force.
Next I then added this abc dashboard to a *Board A*.
I then made and saved some updates to the lookml dashboard abc::abc, so I
wanted to re-deploy this dashboard again to the same target folder so I
re-ran the same command: gzr dashboard import_lookml abc::abc '334'
--force
I expected the target folder to now have the updated abc dashboard (to
overwrite the old version) and it did.
I also expected *Board A* which had the abc dashboard to be updated
automatically as well but instead *Board A* was now empty.
When now looking at the updated abc dashboard, I noticed the URL link
changed from "...dashboards/*935*" to "...dashboards/*936*"
Is there a way to preserve the same URL for when re-deploying a dashboard
using this gazer command, so that any board(s) referencing the dashboard
doesn't break?
—
Reply to this email directly, view it on GitHub
<#189 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSDEENRWW2KE3347YZFQXDXFHNUTANCNFSM6AAAAAAXWG3NMY>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
I figured this out. There is a separate API call to sync the state of a UDD linked to a lookml dashboad. So I'm in the process of creating a new command to use that API call.
|
Thanks Mike for the quick solution! Just curious, so once you have pushed this code later, how can one execute the process of re-deploying a lookml dashboard to a target folder (overwrite) and preserve the same dashboard URL? Will the sync_lookml be called within the import_lookml? |
You only do the deploy once. Looker remembers the linkage. When you change the lookml dash, run |
You should be all set to go. 0.3.6 has been released. Just edit: sorry update rather than upgrade. |
Thanks Mike - this is great! Just wondering if we can introduce a new command that would have the capability to check if a lookml dashboard is deploying for the first time to a target folder as UDD, then use import_lookml otherwise (if already exists) use sync_lookml. If I am trying to do that manually, I have to somehow retrieve the lookml's title and compare that to the existing UDD's title. The problem is how to retrieve the a lookml dashboard's title? |
OK, I just released a new version. If you add the |
Hi,
when I try to import a dashboard from json. I don't get an error summary on what exactly causes the dashboard validation failure. this is what i get.. any reason why or how can i find out the exact reason for validation failure? I am already using --debug to run the import.
The json file is the json file that i use gzr cat to generate the json.
"preferred_viewer": "dashboards-next",
"alert_sync_with_dashboard_filter_enabled": false,
"crossfilter_enabled": false,
"enable_viz_full_screen": true,
"filters_bar_collapsed": false,
"filters_location_top": true,
"load_configuration": "cache_run",
"lookml_link_id": "xxxxx",
"deleted": false,
"slug": "",
"folder_id": "333",
"user_id": "45"
})
POST https:/xxxxx/api/4.0/dashboards: 422 - Validation Failed
// See: https://cloud.google.com/looker/docs/r/err/4.0/422/post/dashboards
// And: https://marketplace-api.looker.com/errorcodes/422.md
/usr/local/lib/ruby/gems/3.2.0/gems/looker-sdk-0.1.4/lib/looker-sdk/response/raise_error.rb:37:in
on_complete' /usr/local/lib/ruby/gems/3.2.0/gems/faraday-1.10.3/lib/faraday/middleware.rb:19:in
block in call'/usr/local/lib/ruby/gems/3.2.0/gems/faraday-1.10.3/lib/faraday/response.rb:61:in
on_complete' /usr/local/lib/ruby/gems/3.2.0/gems/faraday-1.10.3/lib/faraday/middleware.rb:18:in
call'/usr/local/lib/ruby/gems/3.2.0/gems/faraday-1.10.3/lib/faraday/rack_builder.rb:154:in
build_response' /usr/local/lib/ruby/gems/3.2.0/gems/faraday-1.10.3/lib/faraday/connection.rb:516:in
run_request'The text was updated successfully, but these errors were encountered: