airflow.providers.google.cloud.example_dags.example_cloud_sql_query
¶
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¶
|
Returns absolute path. |
Attributes¶
- airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_POSTGRES_INSTANCE_NAME_QUERY[source]¶
- airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_POSTGRES_DATABASE_NAME[source]¶
- airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_POSTGRES_PASSWORD[source]¶
- airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_POSTGRES_PUBLIC_IP[source]¶
- airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_POSTGRES_PUBLIC_PORT[source]¶
- airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_POSTGRES_CLIENT_CERT_FILE[source]¶
- airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_POSTGRES_CLIENT_KEY_FILE[source]¶
- airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_POSTGRES_SERVER_CA_FILE[source]¶
- airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_MYSQL_INSTANCE_NAME_QUERY[source]¶
- airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_MYSQL_DATABASE_NAME[source]¶
- airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_MYSQL_PUBLIC_PORT[source]¶
- airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_MYSQL_CLIENT_CERT_FILE[source]¶
- airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_MYSQL_CLIENT_KEY_FILE[source]¶
- airflow.providers.google.cloud.example_dags.example_cloud_sql_query.GCSQL_MYSQL_SERVER_CA_FILE[source]¶
- airflow.providers.google.cloud.example_dags.example_cloud_sql_query.SQL = ['CREATE TABLE IF NOT EXISTS TABLE_TEST (I INTEGER)', 'CREATE TABLE IF NOT EXISTS TABLE_TEST (I...[source]¶
- airflow.providers.google.cloud.example_dags.example_cloud_sql_query.get_absolute_path(path)[source]¶
Returns absolute path.