Creating a connection to Cloudera Data Warehouse or Data Hub instance for SQL Operator
Learn how to create an Airflow connection to an existing Cloudera Data Warehouse or a Data Hub instance before running the workloads using the supported Airflow SQL Operators.
The following steps are for using the Airflow service provided with each Cloudera Data Engineering Virtual Cluster. For information about using your own Airflow deployment, see Using Cloudera Data Engineering with an external Apache Airflow deployment.
To determine the Cloudera Data Warehouse hostname to use for the connection, perform the following steps:
- In the Cloudera Data Platform (CDP) management console, click the Data Warehouse tile and click Overview.
- In the Virtual Warehouses column, locate the Hive or Impala warehouse you want to connect to.
- Click next to the selected Warehouse, and then click Copy JDBC URL.
- Paste the URL into a text editor, and make note of the hostname and the
httpPath.For example,
In this JDBC URL, the hostname is hs2-aws-2-hive.env-k5ip0r.dw.ylcu-atmi.cloudera.site and the httpPath is cliservice.jdbc:hive2://hs2-aws-2-hive.env-k5ip0r.dw.ylcu-atmi.cloudera.site/default;transportMode=http;httpPath=cliservice;ssl=true;retries=3;
To determine the Cloudera Data Hub hostname to use for the connection, perform the following steps:
- In the Cloudera Management Console, navigate to a suitable Cloudera Data Hub instance.
- Click the Endpoints tab.
- Select and copy the JDBC URL for the Warehouse.
- Paste the URL into a text editor, and make note of the hostname and the httpPath
parameters. The httpPath parameter is different for each Data Hub.For example,
In this JDBC URL, the hostname is man-az-1-master0.man-azur.xcu2-8y8x.dev.cldr.work and the httpPath is man-az-1/cdp-proxy-api/hive.jdbc:hive2://man-az-1-master0.man-azur.xcu2-8y8x.dev.cldr.work/;ssl=true;transportMode=http;httpPath=man-az-1/cdp-proxy-api/hive
To create a connection to an existing CDW virtual warehouse using the embedded Airflow UI, perform the following steps: