You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "challenger009 (via GitHub)" <gi...@apache.org> on 2024/04/30 09:44:26 UTC

Re: [I] Unable to import a Dashboard from a dockerized Superset v 2.1.0 deployment to another (same version) [superset]

challenger009 commented on issue #26130:
URL: https://github.com/apache/superset/issues/26130#issuecomment-2084850786

   > Hi All, Finally I discovered the problem and how to fix it, getting help from a developer colleague (thanks mate!). Below I summarize the problem found and the solution in case others find it useful:
   > 
   > * Even though a dashboard is working correctly in your previous installation, when trying to import it from one installation to a new one, many times an error that prevents such importation appears. But that error doesn't provide much details of possible causes.
   > * To get more info about this problem:
   > * In the Internet browser, open the debugging console (in Firefox: press F12 key).
   > * In the 'Network' tab, search for and select the error in fuchsia (possibly a 422).
   > * In the right panel, select the 'Response' tab.
   > * Expand all the fields of the HTTP response JSON to see in which files and fields that build the dashboard structure the error is occurring.
   >   ![Sample JSON showing wrong parameters on each dataset file](https://private-user-images.githubusercontent.com/149241831/317191245-2d67d350-97e0-4f40-bd22-fe3fc94bfeec.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTQ0NzA0OTEsIm5iZiI6MTcxNDQ3MDE5MSwicGF0aCI6Ii8xNDkyNDE4MzEvMzE3MTkxMjQ1LTJkNjdkMzUwLTk3ZTAtNGY0MC1iZDIyLWZlM2ZjOTRiZmVlYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNDMwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDQzMFQwOTQzMTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01NTNlYWZmOWVmZTk2ZWU3NzVkY2YyYzQ1ZjI2ZThkMDY1MjU2YTU0Mzc3YTE1ZjA4MTRiNTA3Nzg4MjJiODU3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.TsbnO2Mo7CTRFtasY3Wlen186hguyVWhs1kDTg2h0vA)
   > * A common case is that the error is related to incorrect values that are assigned to the `template_params` parameter during the export. When exporting the dashboard, this field acquires the value `template_params: ''` . I think this parameter is related to _jinja SQL templating_ (https://superset.apache.org/docs/installation/sql-templating/).
   > * To fix it, unzip the exported zip file containing the dashboard structure.
   > * Search in the YAML files for the problematic field, based on the file paths and errors described in the JSON file obtained from the browser.
   >   ![Searching wrong parameters on YAML file](https://private-user-images.githubusercontent.com/149241831/317186785-b9d1a301-d9d9-411f-88a3-43df55fbb9e0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTQ0NzA0OTEsIm5iZiI6MTcxNDQ3MDE5MSwicGF0aCI6Ii8xNDkyNDE4MzEvMzE3MTg2Nzg1LWI5ZDFhMzAxLWQ5ZDktNDExZi04OGEzLTQzZGY1NWZiYjllMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNDMwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDQzMFQwOTQzMTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jZTc0YWZhZDIwYjI3MzkwOTE3OGE0NzdkZDNlN2EwZDZhNDYwOGM4MzAzMWFmZGM3NWVkNWU3MzEwYmE2ZWM0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.UL6e4daH4B-PnUYc-GVEhzK1F6z6wxSqA5cj1zbX1zU)
   > * In the case described, the value `''` should be replaced with `null`: `template_params: null`.
   >   ![Writing right value on parameter](https://private-user-images.githubusercontent.com/149241831/317187641-c2936944-94fc-49f8-a87f-30118c605569.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTQ0NzA0OTEsIm5iZiI6MTcxNDQ3MDE5MSwicGF0aCI6Ii8xNDkyNDE4MzEvMzE3MTg3NjQxLWMyOTM2OTQ0LTk0ZmMtNDlmOC1hODdmLTMwMTE4YzYwNTU2OS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNDMwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDQzMFQwOTQzMTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00MTBlMzg1MDFlZTIzY2RlZjVmOGI4MGIyZTMzYjg3Nzc3MWMxNmYwM2E3NjI3YWNiNDg5N2NiYjQ0YzdjZTgwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.FLN6jZyDRhWN6joKF0MID26z3M6gxd9CZyoT1xGa8rM)
   > * Compress the directory with the dashboard structure back into the zip file.
   > * Import again the zipped dashboard into your new Superset installation.
   > * Error should not appear.
   >   Maybe your error when importing a dashboard is not the same that the one described, but at least, you know how to start debugging it!
   >   Hope it helps.
   >   Thanks again for your support.
   
   Thanks for the trick!!!!  Expand all the fields of the HTTP response JSON is the key ;) 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org