tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl

Example Airflow DAG that performs query in a Cloud SQL instance with SSL support.

Module Contents

Functions

run_in_composer()

ip_configuration()

Generates an ip configuration for a CloudSQL instance creation body

cloud_sql_instance_create_body(database_provider)

Generates a CloudSQL instance creation body

cloud_sql_database_create_body(instance)

Generates a CloudSQL database creation body

Attributes

ENV_ID

PROJECT_ID

DAG_ID

REGION

HOME_DIR

COMPOSER_ENVIRONMENT

GET_COMPOSER_NETWORK_COMMAND

CLOUD_SQL_INSTANCE_NAME_TEMPLATE

CLOUD_SQL_INSTANCE_CREATE_BODY_TEMPLATE

DB_PROVIDERS

CLOUD_SQL_DATABASE_NAME

CLOUD_SQL_USER

CLOUD_SQL_PASSWORD

CLOUD_SQL_IP_ADDRESS

CLOUD_SQL_PUBLIC_PORT

CLOUD_SQL_INSTANCE_NAME

DATABASE_TYPE

CONNECTION_PUBLIC_TCP_SSL_KWARGS

CONNECTION_PUBLIC_TCP_SSL_ID

SQL

DELETE_CONNECTION_COMMAND

SSL_PATH

SSL_LOCAL_PATH_PREFIX

SSL_COMPOSER_PATH_PREFIX

postgres_kwargs

mysql_kwargs

log

get_composer_network

test_run

tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.ENV_ID[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.PROJECT_ID[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.DAG_ID = 'cloudsql-query-ssl'[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.REGION = 'us-central1'[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.HOME_DIR[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.COMPOSER_ENVIRONMENT[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.GET_COMPOSER_NETWORK_COMMAND = Multiline-String[source]
Show Value
"""
    gcloud composer environments describe $COMPOSER_ENVIRONMENT     --location=$COMPOSER_LOCATION     --project=$GCP_PROJECT     --format="value(config.nodeConfig.network)"
    """
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.run_in_composer()[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.CLOUD_SQL_INSTANCE_NAME_TEMPLATE[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.CLOUD_SQL_INSTANCE_CREATE_BODY_TEMPLATE: dict[str, Any][source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.DB_PROVIDERS: Iterable[dict[str, str]] = ()[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.ip_configuration()[source]

Generates an ip configuration for a CloudSQL instance creation body

tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.cloud_sql_instance_create_body(database_provider)[source]

Generates a CloudSQL instance creation body

tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.CLOUD_SQL_DATABASE_NAME = 'test_db'[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.CLOUD_SQL_USER = 'test_user'[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.CLOUD_SQL_PASSWORD = 'JoxHlwrPzwch0gz9'[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.CLOUD_SQL_IP_ADDRESS = '127.0.0.1'[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.CLOUD_SQL_PUBLIC_PORT = 5432[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.cloud_sql_database_create_body(instance)[source]

Generates a CloudSQL database creation body

tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.CLOUD_SQL_INSTANCE_NAME = ''[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.DATABASE_TYPE = ''[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.CONNECTION_PUBLIC_TCP_SSL_KWARGS[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.CONNECTION_PUBLIC_TCP_SSL_ID[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.SQL = ['CREATE TABLE IF NOT EXISTS TABLE_TEST (I INTEGER)', 'CREATE TABLE IF NOT EXISTS TABLE_TEST (I...[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.DELETE_CONNECTION_COMMAND = 'airflow connections delete {}'[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.SSL_PATH[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.SSL_LOCAL_PATH_PREFIX = '/tmp'[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.SSL_COMPOSER_PATH_PREFIX = '/home/airflow/gcs/data'[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.postgres_kwargs[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.mysql_kwargs[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.log[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.get_composer_network[source]
tests.system.providers.google.cloud.cloud_sql.example_cloud_sql_query_ssl.test_run[source]

Was this entry helpful?