gbrian commented on issue #9506: import_dashboards Issues URL: https://github.com/apache/incubator-superset/pull/9506#issuecomment-615053251 👏 thanks @chesterxgchen. I'm my case fixed bit different as I have two environments DEV and PROD and ids can diffier as they have different databases. I use export/import features for deploying. I'm attaching my fix for discussion. **Match dashboards:** Dashboard title becomes the ID, on my project dashboard title are used as IDs and translated before rendering to browser. We use a pattern like `dashboard_title_name` so is easy to find on the translation tables. ``` # override the dashboard existing_dashboard = session.query(Dashboard) \ .filter(Dashboard.dashboard_title == dashboard_to_import.dashboard_title) \ .first() ``` **Match slices**: Same approach, I keep the id mapping to ensure all still working.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
