| :py:mod:`airflow.providers.google.cloud.example_dags.example_cloud_sql_query` |
| ============================================================================= |
| |
| .. py:module:: airflow.providers.google.cloud.example_dags.example_cloud_sql_query |
| |
| .. autoapi-nested-parse:: |
| |
| Example Airflow DAG that performs query in a Cloud SQL instance. |
| |
| This DAG relies on the following OS environment variables |
| |
| * GCP_PROJECT_ID - Google Cloud project for the Cloud SQL instance |
| * GCP_REGION - Google Cloud region where the database is created |
| * |
| * GCSQL_POSTGRES_INSTANCE_NAME - Name of the postgres Cloud SQL instance |
| * GCSQL_POSTGRES_USER - Name of the postgres database user |
| * GCSQL_POSTGRES_PASSWORD - Password of the postgres database user |
| * GCSQL_POSTGRES_PUBLIC_IP - Public IP of the Postgres database |
| * GCSQL_POSTGRES_PUBLIC_PORT - Port of the postgres database |
| * |
| * GCSQL_MYSQL_INSTANCE_NAME - Name of the postgres Cloud SQL instance |
| * GCSQL_MYSQL_USER - Name of the mysql database user |
| * GCSQL_MYSQL_PASSWORD - Password of the mysql database user |
| * GCSQL_MYSQL_PUBLIC_IP - Public IP of the mysql database |
| * GCSQL_MYSQL_PUBLIC_PORT - Port of the mysql database |
| |
| |
| |
| Module Contents |
| --------------- |
| |
| |
| Functions |
| ~~~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.get_absolute_path |
| |
| |
| |
| Attributes |
| ~~~~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCP_PROJECT_ID |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCP_REGION |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_POSTGRES_INSTANCE_NAME_QUERY |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_POSTGRES_DATABASE_NAME |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_POSTGRES_USER |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_POSTGRES_PASSWORD |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_POSTGRES_PUBLIC_IP |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_POSTGRES_PUBLIC_PORT |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_POSTGRES_CLIENT_CERT_FILE |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_POSTGRES_CLIENT_KEY_FILE |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_POSTGRES_SERVER_CA_FILE |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_MYSQL_INSTANCE_NAME_QUERY |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_MYSQL_DATABASE_NAME |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_MYSQL_USER |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_MYSQL_PASSWORD |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_MYSQL_PUBLIC_IP |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_MYSQL_PUBLIC_PORT |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_MYSQL_CLIENT_CERT_FILE |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_MYSQL_CLIENT_KEY_FILE |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_MYSQL_SERVER_CA_FILE |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.SQL |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.HOME_DIR |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.postgres_kwargs |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.mysql_kwargs |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.sql_proxy_binary_path |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.connection_names |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.tasks |
| airflow.providers.google.cloud.example_dags.example_cloud_sql_query.prev_task |
| |
| |
| .. py:data:: GCP_PROJECT_ID |
| |
| |
| |
| |
| .. py:data:: GCP_REGION |
| |
| |
| |
| |
| .. py:data:: GCSQL_POSTGRES_INSTANCE_NAME_QUERY |
| |
| |
| |
| |
| .. py:data:: GCSQL_POSTGRES_DATABASE_NAME |
| |
| |
| |
| |
| .. py:data:: GCSQL_POSTGRES_USER |
| |
| |
| |
| |
| .. py:data:: GCSQL_POSTGRES_PASSWORD |
| |
| |
| |
| |
| .. py:data:: GCSQL_POSTGRES_PUBLIC_IP |
| |
| |
| |
| |
| .. py:data:: GCSQL_POSTGRES_PUBLIC_PORT |
| |
| |
| |
| |
| .. py:data:: GCSQL_POSTGRES_CLIENT_CERT_FILE |
| |
| |
| |
| |
| .. py:data:: GCSQL_POSTGRES_CLIENT_KEY_FILE |
| |
| |
| |
| |
| .. py:data:: GCSQL_POSTGRES_SERVER_CA_FILE |
| |
| |
| |
| |
| .. py:data:: GCSQL_MYSQL_INSTANCE_NAME_QUERY |
| |
| |
| |
| |
| .. py:data:: GCSQL_MYSQL_DATABASE_NAME |
| |
| |
| |
| |
| .. py:data:: GCSQL_MYSQL_USER |
| |
| |
| |
| |
| .. py:data:: GCSQL_MYSQL_PASSWORD |
| |
| |
| |
| |
| .. py:data:: GCSQL_MYSQL_PUBLIC_IP |
| |
| |
| |
| |
| .. py:data:: GCSQL_MYSQL_PUBLIC_PORT |
| |
| |
| |
| |
| .. py:data:: GCSQL_MYSQL_CLIENT_CERT_FILE |
| |
| |
| |
| |
| .. py:data:: GCSQL_MYSQL_CLIENT_KEY_FILE |
| |
| |
| |
| |
| .. py:data:: GCSQL_MYSQL_SERVER_CA_FILE |
| |
| |
| |
| |
| .. py:data:: SQL |
| :annotation: = ['CREATE TABLE IF NOT EXISTS TABLE_TEST (I INTEGER)', 'CREATE TABLE IF NOT EXISTS TABLE_TEST (I... |
| |
| |
| |
| .. py:data:: HOME_DIR |
| |
| |
| |
| |
| .. py:function:: get_absolute_path(path) |
| |
| Returns absolute path. |
| |
| |
| .. py:data:: postgres_kwargs |
| |
| |
| |
| |
| .. py:data:: mysql_kwargs |
| |
| |
| |
| |
| .. py:data:: sql_proxy_binary_path |
| |
| |
| |
| |
| .. py:data:: connection_names |
| :annotation: = ['proxy_postgres_tcp', 'proxy_postgres_socket', 'public_postgres_tcp',... |
| |
| |
| |
| .. py:data:: tasks |
| :annotation: = [] |
| |
| |
| |
| .. py:data:: prev_task |
| |
| |
| |
| |