Mixpanel Community Icon

Troubleshooting Mixpanel Schema Permission Error for New Warehouse Source

·
·

When adding a new warehouse source I get the error "Mixpanel does not have permission to see this schema.". But the user has permissions, as there are existing syncs with this schema.

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Hi Max P., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> đź‘‹

    Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Based on the information provided in the knowledge sources, it seems that this issue could be related to insufficient permissions for the Mixpanel service account in your data warehouse. Let's go through some possible solutions:1. For Snowflake: Make sure you've granted the necessary permissions to the Mixpanel role. Double-check that you've executed the following SQL commands:

    GRANT USAGE ON ALL SCHEMAS IN DATABASE <database> TO ROLE MIXPANEL_ROLE; GRANT USAGE ON FUTURE SCHEMAS IN DATABASE <database> TO ROLE MIXPANEL_ROLE; GRANT SELECT ON ALL TABLES IN DATABASE <database> TO ROLE MIXPANEL_ROLE; GRANT SELECT ON FUTURE TABLES IN DATABASE <database> TO ROLE MIXPANEL_ROLE; GRANT SELECT ON ALL VIEWS IN DATABASE <database> TO ROLE MIXPANEL_ROLE; GRANT SELECT ON FUTURE VIEWS IN DATABASE <database> TO ROLE MIXPANEL_ROLE; GRANT SELECT ON ALL MATERIALIZED VIEWS IN DATABASE <database> TO ROLE MIXPANEL_ROLE; GRANT SELECT ON FUTURE MATERIALIZED VIEWS IN DATABASE <database> TO ROLE MIXPANEL_ROLE; ```LBKSLBKS Replace `<database> ` with your actual database name. These permissions are crucial for Mixpanel to access and read your data [Warehouse Connectors: Step 1](https://docs.mixpanel.com/docs/tracking-methods/data-warehouse#step-1-connect-a-warehouse).LBKS2. For BigQuery: Ensure that you've granted the necessary permissions to the Mixpanel service account. Verify that you've executed these steps:LBKS - Grant the `roles/bigquery.jobUser` role to the Mixpanel service account. - Grant the `roles/bigquery.dataViewer` role on the datasets and/or tables you want to sync.LBKS You can do this using the following commands:LBKS ```LBKS gcloud projects add-iam-policy-binding --member serviceAccount:<mixpanel-service-account> --role roles/bigquery.jobUserLBKS GRANT `roles/bigquery.dataViewer` ON SCHEMA `<gcp-project> `.`<dataset-to-be-synced> ` TO "<mixpanel-service-account> " ```LBKSLBKS Replace `<mixpanel-service-account> `, `<gcp-project> `, and `<dataset-to-be-synced> ` with your actual values [Warehouse Connectors: Step 1](https://docs.mixpanel.com/docs/tracking-methods/data-warehouse#getting-started).LBKS3. For Redshift: Make sure you've granted the necessary permissions to the Mixpanel role. Verify that you've run the command to grant access to the schema:LBKS ```LBKS GRANT USAGE ON SCHEMA <schema_name> TO ROLE MIXPANEL_EXPORT_ROLE; ```LBKSLBKS Replace `<schema_name> ` with the name of the schema you want to grant Mixpanel access to [Warehouse Connectors: Step 1](https://docs.mixpanel.com/docs/tracking-methods/data-warehouse#step-1-connect-a-warehouse).LBKSIf you've already performed these steps and are still encountering the error, it's possible that there might be a caching issue or a delay in permission propagation. In this case, you may want to wait a short while and try again, or contact Mixpanel support for further assistance.

    kapa.ai is still learning and improving, please let me know how I did by reacting below.

    ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.