Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Einer der Fehler, der beim Validieren Ihrer LookML auftreten kann, ist Model <model_name> is not allowed to use connection <connection_name>.
Bei diesem Fehler müssen Sie die LookML-Projekteinstellungen prüfen und dafür sorgen, dass das Modell die erforderlichen und richtigen Berechtigungen hat, um auf die erforderlichen Verbindungen zu verweisen.
Der folgende Fehler gibt beispielsweise an, dass das Modell lauren_ecommerce die Verbindung athena nicht verwenden darf:
Es gibt zwei Möglichkeiten, den Fehler zu beheben:
Verbindung ändern, auf die im Parameter connection der Modelldatei verwiesen wird
Konfigurationseinstellungen des Projekts bearbeiten, um Zugriff auf die Verbindung zu gewähren
Auf dieser Seite erfahren Sie, wie Sie die Konfigurationseinstellungen des Projekts bearbeiten.
Konfigurationseinstellungen des Modells bearbeiten
So bearbeiten Sie die Konfigurationseinstellungen des Modells:
Wählen Sie in der Fehlermeldung den Link Projects (Projekte) verwalten aus. Dadurch gelangen Sie zur Seite „LookML-Projekte“.
Sie können die Seite „LookML-Projekte“ auch über die URL https://<your_looker_domain.com>/projects aufrufen oder im linken Navigationsbereich im Menü Entwickeln die Option Projekte auswählen.
Suchen Sie auf der Seite „LookML-Projekte“ nach dem Modell, das den Fehler ausgelöst hat. In diesem Beispiel suchen Sie nach dem Modell lauren_ecommerce für das Projekt l_ecommerce. Das Modell wird durch einen kritischen Fehler in Rot hervorgehoben:
Klicken Sie auf die Schaltfläche Konfigurieren, um die Seite Modellkonfiguration bearbeiten zu öffnen.
Sehen Sie sich im Abschnitt Zulässige Verbindungen die derzeit für das Modell ausgewählten Verbindungen an. In diesem Beispiel wird der Fehler model 'lauren_ecommerce' is not allowed to use connection 'athena'. angezeigt. Die Verbindung athena ist nicht in den Zulässigen Verbindungen des Modells ausgewählt. In diesem Fall wurde die ecommerce_demo-Verbindung versehentlich ausgewählt:
Setzen Sie ein Häkchen neben der richtigen Verbindung, in diesem Fall athena. Alternativ können Sie die Option Alle auswählen, um dem Modell Zugriff auf alle Verbindungen zu gewähren, einschließlich neuer Verbindungen, die in Zukunft hinzugefügt werden.
Passen Sie bei Bedarf andere Verbindungsauswahlen an.
Klicken Sie auf Speichern.
Kehren Sie zu Ihrem LookML-Modell zurück und führen Sie eine erneute Validierung durch, um zu prüfen, ob der Fehler in der Modellkonfiguration nicht mehr vorhanden ist:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-07-31 (UTC)."],[],[],null,["# How to fix model configuration errors\n\nOne of the errors you may encounter when you [validate](/looker/docs/lookml-validation#validating_your_lookml) your LookML is `Model \u003cmodel_name\u003e is not allowed to use connection \u003cconnection_name\u003e`.\n\n\nThis error means that you need to look at the LookML [project settings](/looker/docs/manage-projects#projects_with_only_a_configuration) and verify that the model has the necessary and correct permissions to reference the connections it needs.\n\n\nFor example, the following error indicates that the model `lauren_ecommerce` is not allowed to use the **athena** connection:\n\n\nThere are two ways to fix the error:\n\n- Changing the connection referenced in the model file's [`connection` parameter](/looker/docs/reference/param-model-connection)\n- Editing the project's configuration settings to provide access to the connection\n\n\nThis page provides instructions for editing the project's configuration settings.\n\n\u003cbr /\u003e\n\nEditing the model's configuration settings\n------------------------------------------\n\n\nTo edit the model's configuration settings:\n\n1. Expand the [validation error](/looker/docs/lookml-validation#lookml_errors) in the IDE.\n2. Select the **Manage Projects** link in the error message. This will take you to the LookML Projects page.\n\n \u003cbr /\u003e\n\n You can also navigate to the LookML Projects page by using the URL `https://\u003cyour_looker_domain.com\u003e/projects`, or by selecting **Projects** from the **Develop** menu in the left navigation panel.\n3. On the LookML Projects page, find the model that triggered the error. In this example, look for the `lauren_ecommerce` model for the **l_ecommerce** project. The model will be made more visible by a critical error in red:\n4. Select the **Configure** button to open the **Edit Model Configuration** page.\n5. Review the connections currently selected for the model in the **Allowed Connections** section. In this example, the error states that `model 'lauren_ecommerce' is not allowed to use connection 'athena'.` The connection **athena** is not selected in the model's **Allowed Connections** . The `ecommerce_demo` connection was selected by mistake in this case:\n\n \u003cbr /\u003e\n\n6. Check the box next to the correct connection --- in this case, **athena** . Alternatively, you can select the **All** option to grant the model access to all connections, including new connections added in the future.\n7. Adjust other connection selections as needed.\n8. Select **Save**.\n9. Navigate back to your LookML model and re-validate to verify that the model configuration error is no longer there:"]]