Le 15 septembre 2026, tous les environnements Cloud Composer 1 et Cloud Composer 2 version 2.0.x atteindront leur fin de vie prévue et vous ne pourrez plus les utiliser. Nous vous recommandons de planifier la migration vers Cloud Composer 3.
Cette page explique comment obtenir des informations sur les DAG dans votre environnement.
Afficher des informations sur les DAG
Cloud Composer propose plusieurs façons d'obtenir des informations détaillées sur les DAG de votre environnement:
L'UI DAG est une section de l' Google Cloud interface de console de Cloud Composer dédiée à l'affichage et à la surveillance des DAG, des exécutions de DAG et des tâches individuelles.
La CLI Airflow est l'interface de ligne de commande d'Airflow. Vous pouvez obtenir des informations sur les DAG en exécutant des commandes de CLI Airflow avec gcloud.
À propos de l'interface utilisateur du DAG Cloud Composer
L'UI DAG est une section de l' Google Cloud interface de console de Cloud Composer dédiée à l'affichage et à la surveillance des DAG, des exécutions de DAG et des tâches individuelles.
Dans l'interface utilisateur du DAG, vous pouvez:
Afficher la liste des DAG de votre environnement, y compris les intervalles de planification, les états des DAG et les descriptions
Afficher les détails des exécutions de DAG, y compris les exécutions réussies, actives et échouées, ainsi que le temps écoulé depuis la dernière exécution terminée. Pour chaque DAG, vous pouvez consulter l'historique des exécutions de DAG et des instances de tâche associées à ce DAG particulier, y compris les journaux des tâches exécutées.
Filtrez les détails de l'exécution du DAG. Par exemple, vous pouvez choisir un intervalle de temps et créer des requêtes pour sélectionner les informations dont vous avez besoin.
Afficher des informations détaillées sur les DAG et les tâches individuels Cela inclut des diagrammes DAG visualisés, des informations sur les tâches d'un DAG, le code source du DAG et des informations supplémentaires sur les DAG.
Avant de commencer
Assurez-vous que votre compte dispose d'un rôle lui permettant d'accéder à l'interface utilisateur du DAG et d'afficher les détails du DAG. Pour plus d'informations, consultez la section Contrôle des accès.
L'interface utilisateur DAG est compatible avec Cloud Composer 2.0.1 et les versions ultérieures.
Afficher la liste des DAG de votre environnement
Console
L'onglet DAG de votre environnement affiche la liste des DAG, ainsi que les détails des exécutions de DAG pour chaque DAG.
Pour afficher la liste des DAG:
Dans la console Google Cloud , accédez à la page Environnements.
Dans la colonne Liste des DAG, suivez le lien DAG correspondant à votre environnement.
Vous pouvez utiliser des filtres pour n'afficher les détails que pour certains DAG ou pour certaines conditions. Exemple :
Sélectionnez le champ Filtres.
Dans la liste déroulante, sélectionnez la propriété ID de DAG.
Spécifiez l'identifiant du DAG. Les résultats n'affichent des informations que pour le DAG sélectionné.
(Facultatif) Pour inclure d'autres DAG, ajoutez des opérateurs OR suivis d'ID de DAG.
(Facultatif) Pour filtrer sur d'autres conditions, ajoutez d'autres propriétés dans le champ Filtres. Par exemple, vous pouvez filtrer les DAG avec des exécutions échouées en spécifiant Failed runs:>0.
Interface utilisateur d'Airflow
Pour afficher la liste des DAG dans l'interface Web Airflow:
Dans la console Google Cloud , accédez à la page Environnements.
Dans la colonne Liste des DAG, suivez le lien DAG correspondant à votre environnement.
Sélectionnez un DAG.
Sur la page Détails du DAG, accédez à l'onglet Exécutions.
Sélectionnez une exécution de DAG dans la liste pour afficher les détails de l'exécution, tels que l'état des instances de tâche pour cette exécution de DAG, le nombre d'essais et la durée d'exécution. Vous pouvez sélectionner des tâches individuelles pour afficher les journaux des instances de tâche.
Interface utilisateur d'Airflow
Pour afficher la liste des DAG dans l'interface Web Airflow:
Dans la console Google Cloud , accédez à la page Environnements.
Dans la colonne Serveur Web Airflow, cliquez sur le lien Airflow correspondant à votre environnement.
Connectez-vous avec le compte Google disposant des autorisations appropriées.
Dans l'interface Web Airflow, dans le menu, sélectionnez Browse (Parcourir) >DAG Runs (Exécutions de DAG). La page Exécutions DAG affiche les exécutions de DAG pour votre environnement. Vous pouvez suivre le lien dans la colonne ID d'exécution pour obtenir des informations supplémentaires sur les tâches.
gcloud
Exécutez la commande de CLI Airflow dags list-runs:
LOCATION par la région où se trouve l'environnement.
DAG_ID par le nom du DAG.
Vous pouvez obtenir des informations supplémentaires sur les instances de tâche en exécutant les commandes de CLI Airflow tasks state et tasks states-for-dag-run.
Dans la colonne Serveur Web Airflow, cliquez sur le lien Airflow correspondant à votre environnement.
Connectez-vous avec le compte Google disposant des autorisations appropriées.
Dans l'interface Web Airflow, sur la page DAG, une liste des DAG de votre environnement s'affiche.
Pour votre DAG, dans la colonne Liens, cliquez sur le lien Vue graphique.
Afficher le code source des DAG et des informations supplémentaires à leur sujet
Console
Vous pouvez afficher le code source de vos DAG et des informations supplémentaires telles que les identifiants de DAG et les liens vers les fichiers de définition de DAG dans le bucket de l'environnement.
Dans la console Google Cloud , accédez à la page Environnements.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/08/29 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/08/29 (UTC)."],[[["\u003cp\u003eThis page provides information on how to view and manage DAGs (Directed Acyclic Graphs) within Cloud Composer 2 environments.\u003c/p\u003e\n"],["\u003cp\u003eYou can access detailed information about DAGs, DAG runs, and individual tasks using the DAG UI in the Google Cloud console, the Airflow UI, or the Airflow CLI.\u003c/p\u003e\n"],["\u003cp\u003eThe DAG UI allows for viewing lists of DAGs, their states, descriptions, and schedules, as well as the ability to pause, unpause, and trigger DAGs.\u003c/p\u003e\n"],["\u003cp\u003eThe page explains how to view the history of DAG runs, task instance details, and DAG diagrams, using both the console and Airflow UI.\u003c/p\u003e\n"],["\u003cp\u003eUsers can view DAG source code and other relevant information, but it's important to note that editing the source code is not possible directly from the console.\u003c/p\u003e\n"]]],[],null,["\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\n[Cloud Composer 3](/composer/docs/composer-3/view-dags \"View this page for Cloud Composer 3\") \\| **Cloud Composer 2** \\| [Cloud Composer 1](/composer/docs/composer-1/view-dags \"View this page for Cloud Composer 1\")\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nThis page explains how to get information about DAGs in your environment.\n\nWays to view information about DAGs\n\nCloud Composer provides several ways to get detailed information about DAGs in your environment:\n\n- DAG UI is a section of Google Cloud console interface for Cloud Composer dedicated to viewing and monitoring DAGs, DAG runs, and individual tasks.\n- [Airflow UI](/composer/docs/composer-2/access-airflow-web-interface) is the built-in web interface of Airflow.\n- [Airflow CLI](/composer/docs/composer-2/access-airflow-cli) is the command-line interface of Airflow. You can get information about DAGs by running Airflow CLI commands with `gcloud`.\n\nAbout Cloud Composer DAG UI\n\nDAG UI is a section of Google Cloud console interface for\nCloud Composer dedicated to viewing and monitoring DAGs, DAG runs,\nand individual tasks.\n\nIn DAG UI, you can:\n\n- View a list of DAGs in your environment, including schedule intervals, DAG\n states, and descriptions.\n\n- Pause, unpause, and [trigger DAGs](/composer/docs/composer-2/schedule-and-trigger-dags#manual).\n\n- View DAG run details, including successful, active, and failed runs, time\n since the last completed run. For each DAG, you can see the history of DAG\n runs and task instances associated with this particular DAG, including logs\n for executed tasks.\n\n- Filter DAG run details. For example, you can pick a time interval and\n create queries to select the information that you need.\n\n- View detailed information about individual DAGs and tasks. This includes\n visualized DAG diagrams, information about the tasks within a DAG, DAG\n source code, and extra information about DAGs.\n\nBefore you begin\n\n- Make sure that your account has a role that can access DAG UI and view DAG\n details. For more information, see [Access control](/composer/docs/composer-2/access-control).\n\n- DAG UI is supported in Cloud Composer 2.0.1 and later\n versions.\n\n\n View the list of DAGs for your environment \n\n Console\n\n The **DAGs** tab of your environment shows the list of DAGs along with DAG\n run details for each DAG.\n\n To view the list of DAGs:\n 1. In the Google Cloud console, go to the **Environments** page.\n\n [Go to Environments](https://console.cloud.google.com/composer/environments)\n 2. In the **DAG list** column, follow the **DAGs** link for your environment.\n\n You can use filters to view the details only for certain DAGs or for\n certain conditions. For example:\n 1. Select the **Filters** field.\n 2. From the drop-down list, select the **DAG id** property.\n 3. Specify the identifier of the DAG. The results show details only for the selected DAG.\n 4. (Optional) To include more DAGs, add `OR` operators followed by DAG ids.\n 5. (Optional) To filter on other conditions, add other properties in the **Filters** field. For example, you can filter for DAGs with failed runs by specifying `Failed runs:\u003e0`.\n\n Airflow UI\n\n To view the list of DAGs in the Airflow web interface:\n 1. In the Google Cloud console, go to the **Environments** page.\n\n [Go to Environments](https://console.cloud.google.com/composer/environments)\n 2. In the **Airflow webserver** column, follow the **Airflow** link for your\n environment.\n\n 3. Log in with the Google account that has the appropriate permissions.\n\n 4. In the Airflow web interface, on the **DAGs** page, a list of DAGs for\n your environment is displayed.\n\n gcloud\n\n Run the `dags list` Airflow CLI command:\n\n\n gcloud composer environments run \u003cvar translate=\"no\"\u003eENVIRONMENT_NAME\u003c/var\u003e \\\n --location \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e \\\n dags list -- -o plain\n\n Replace:\n - `ENVIRONMENT_NAME` with the name of the environment.\n - `LOCATION` with the region where the environment is located.\n\n View the history of DAG runs and tasks \n\n Console\n\n The **Runs** tab on the **DAG details** page shows the history of DAG runs\n for an individual DAG.\n\n To view the history of DAG runs:\n 1. In the Google Cloud console, go to the **Environments** page.\n\n [Go to Environments](https://console.cloud.google.com/composer/environments)\n 2. In the **DAG list** column, follow the **DAGs** link for your environment.\n\n 3. Select a DAG.\n\n 4. On the **DAG details** page, go to the **Runs** tab.\n\n 5. Select a DAG run from the list to view the DAG run details, such as the\n state of task instances for this DAG run, the number of tries and the\n execution duration. You can select individual tasks to view\n task instance logs.\n\n Airflow UI\n\n To view the list of DAGs in the Airflow web interface:\n 1. In the Google Cloud console, go to the **Environments** page.\n\n [Go to Environments](https://console.cloud.google.com/composer/environments)\n 2. In the **Airflow webserver** column, follow the **Airflow** link for your\n environment.\n\n 3. Log in with the Google account that has the appropriate permissions.\n\n 4. In the Airflow web interface, in the menu, select\n **Browse** \\\u003e **DAG Runs** . The **DAG Runs** page displays\n DAG runs for your environment. You can follow the link in the **Run ID**\n column to get additional information about tasks.\n\n gcloud\n\n Run the `dags list-runs` Airflow CLI command:\n\n\n gcloud composer environments run \u003cvar translate=\"no\"\u003eENVIRONMENT_NAME\u003c/var\u003e \\\n --location \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e \\\n dags list-runs -- -d \u003cvar translate=\"no\"\u003eDAG_ID\u003c/var\u003e\n\n Replace:\n - `ENVIRONMENT_NAME` with the name of the environment.\n - `LOCATION` with the region where the environment is located.\n - `DAG_ID` with the name of the DAG.\n\n You can get additional information about task instances by running `tasks state` and `tasks states-for-dag-run` Airflow CLI commands.\n\n For more information, see [Access Airflow CLI](/composer/docs/composer-2/access-airflow-cli) and the\n [Airflow CLI reference](https://airflow.apache.org/docs/apache-airflow/stable/cli-and-env-variables-ref.html).\n\n \u003cbr /\u003e\n\n View DAG diagrams \n\n Console\n\n The **Diagram** tab on the **DAG details** page show the visualisation of a\n DAG with task dependencies.\n\n To view the diagram of a DAG:\n 1. In the Google Cloud console, go to the **Environments** page.\n\n [Go to Environments](https://console.cloud.google.com/composer/environments)\n 2. In the **DAG list** column, follow the **DAGs** link for your environment.\n\n 3. Select a DAG.\n\n 4. On the **DAG details** page, go to the **Diagram** tab.\n\n 5. (Optional) To see additional information about tasks, select individual tasks on the diagram.\n\n Airflow UI\n\n To view the diagram of a DAGs in the Airflow web interface:\n 1. In the Google Cloud console, go to the **Environments** page.\n\n [Go to Environments](https://console.cloud.google.com/composer/environments)\n 2. In the **Airflow webserver** column, follow the **Airflow** link for your\n environment.\n\n 3. Log in with the Google account that has the appropriate permissions.\n\n 4. In the Airflow web interface, on the **DAGs** page, a list of DAGs for\n your environment is displayed.\n\n 5. For your DAG, in the **Links** column, follow the **Graph View** link.\n\n View DAG source code and additional information about DAGs \n\n Console\n\n You can view the source code of your DAGs and additional information such as\n DAG identifiers and links to DAG definition files in the environment's\n bucket.\n | **Note:** It is not possible to edit the source code of your DAGs on this tab.\n 1. In the Google Cloud console, go to the **Environments** page.\n\n [Go to Environments](https://console.cloud.google.com/composer/environments)\n 2. In the **DAG list** column, follow the **DAGs** link for your environment.\n\n 3. Select a DAG.\n\n 4. To view the DAG source code, go to the **Diagram** tab.\n\n 5. To view additional information about the DAG, go to the **Source** tab.\n\n Airflow UI\n\n To view the diagram of a DAGs in the Airflow web interface:\n 1. In the Google Cloud console, go to the **Environments** page.\n\n [Go to Environments](https://console.cloud.google.com/composer/environments)\n 2. In the **Airflow webserver** column, follow the **Airflow** link for your\n environment.\n\n 3. Log in with the Google account that has the appropriate permissions.\n\n 4. In the Airflow web interface, on the **DAGs** page, click on the name of\n your DAG.\n\n 5. In the page with DAG details, navigate to available tabs to view\n additional information about the DAG.\n\n What's next\n - [Add and update DAGs](/composer/docs/composer-2/manage-dags)\n - [Schedule and trigger DAGs](/composer/docs/composer-2/schedule-and-trigger-dags)"]]