GitHub user dosubot[bot] added a comment to the discussion: What happens if i 
enable FEATURE FLAG , DASHBOARD_RBAC  and VERSIONED_EXPORT =True

<!-- Answer -->
1. Dashboard role associations (RBAC) are **not preserved** during 
export/import—even with `DASHBOARD_RBAC` and `VERSIONED_EXPORT` enabled. The 
exported YAML does not include role assignments, so after importing a dashboard 
(to the same or another Superset instance), you must manually re-assign roles 
to the dashboard. This is a current limitation by design and confirmed in the 
code and documentation 
([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/commands/dashboard/export.py),
 
[source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/commands/dashboard/importers/v1/__init__.py)).

2. To view the `dashboard_roles` table (which links dashboards to roles), 
connect to your Superset metadata database using a SQL tool appropriate for 
your backend:

**Example SQL query (works for SQLite, Postgres, MySQL):**
```sql
SELECT d.dashboard_title, r.name AS role_name
FROM dashboard_roles dr
JOIN dashboards d ON dr.dashboard_id = d.id
JOIN ab_role r ON dr.role_id = r.id
ORDER BY d.dashboard_title, r.name;
```

**How to run this:**
- For **SQLite**:  
  Open a terminal and run:
  ```sh
  sqlite3 /path/to/superset.db
  ```
  Then paste the SQL above.

- For **Postgres**:  
  Open a terminal and run:
  ```sh
  psql -h <host> -U <user> -d <superset_db>
  ```
  Then paste the SQL above.

- For **MySQL**:  
  Open a terminal and run:
  ```sh
  mysql -h <host> -u <user> -p <superset_db>
  ```
  Then paste the SQL above.

If your Superset metadata DB is exposed as a dataset, you can also run this 
query in SQL Lab.

**Note:** If you use SQLite, be aware that role changes may not always be 
reflected correctly; for production, MySQL or Postgres is recommended 
([source](https://github.com/apache/superset/discussions/32299)).


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/cb084f72-e8a4-4c37-a0f9-37c5296f5ce4?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/cb084f72-e8a4-4c37-a0f9-37c5296f5ce4?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/cb084f72-e8a4-4c37-a0f9-37c5296f5ce4?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/cb084f72-e8a4-4c37-a0f9-37c5296f5ce4?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/cb084f72-e8a4-4c37-a0f9-37c5296f5ce4?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/cb084f72-e8a4-4c37-a0f9-37c5296f5ce4?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/cb084f72-e8a4-4c37-a0f9-37c5296f5ce4?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
 nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/34628)

GitHub link: 
https://github.com/apache/superset/discussions/34628#discussioncomment-14054885

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to