tests.system.google.cloud.transfers.example_postgres_to_gcs
Example DAG using PostgresSQLToGCSOperator.
This DAG relies on the following OS environment variables
Module Contents
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.DAG_ID = 'postgres_to_gcs'[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.ENV_ID[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.PROJECT_ID[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.IS_COMPOSER[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.REGION = 'europe-west2'[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.ZONE = 'europe-west2-a'[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.NETWORK = 'default'[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.CONNECTION_ID[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.CONNECTION_TYPE = 'postgres'[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.BUCKET_NAME[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.FILE_NAME = 'result.json'[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.DB_NAME = 'testdb'[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.DB_PORT = 5432[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.DB_USER_NAME = 'root'[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.DB_USER_PASSWORD = 'demo_password'[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.SETUP_POSTGRES_COMMAND = Multiline-String[source]
Show Value
"""
sudo apt update &&
sudo apt install -y docker.io &&
sudo docker run -d -p 5432:5432 --name testdb -e PGUSER=root -e POSTGRES_USER=root -e POSTGRES_PASSWORD=demo_password -e POSTGRES_DB=testdb postgres
"""
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.SQL_TABLE = 'test_table'[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.SQL_CREATE = 'CREATE TABLE IF NOT EXISTS test_table (col_1 INT, col_2 VARCHAR(8))'[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.SQL_INSERT = "INSERT INTO test_table (col_1, col_2) VALUES (1, 'one'), (2, 'two')"[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.SQL_SELECT = 'SELECT * FROM test_table'[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.GCE_MACHINE_TYPE = 'n1-standard-1'[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.GCE_INSTANCE_NAME[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.GCE_INSTANCE_BODY[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.FIREWALL_RULE_NAME[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.CREATE_FIREWALL_RULE_COMMAND[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.DELETE_FIREWALL_RULE_COMMAND[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.log[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.create_gce_instance[source]
-
tests.system.google.cloud.transfers.example_postgres_to_gcs.test_run[source]