To connect to an Amazon Redshift cloud data warehouse, install and configure client files to implement communication between ArcGIS and Redshift and create database connection files from ArcGIS Pro. To publish web layers, the database connection files must be registered with the ArcGIS Enterprise portal's hosting server site. For best performance, deploy ArcGIS clients in the Amazon cloud in the same region as the data warehouse.
Typically, IT professionals install the ArcGIS software and the drivers required to connect to the data warehouse. They also configure network, firewall, and other communication channels necessary to allow communication between ArcGIS and the cloud data warehouse.
Next, the administrator of the cloud data warehouse creates accounts and grants the accounts privileges to access specific tables in the cloud data warehouse. The administrator can create a connection from ArcGIS Pro to the cloud data warehouse and share the connection file with publishers, or the administrator can provide publishers with the credentials necessary to allow them to create their own connection files.
To publish ArcGIS Server web services that reference data in the cloud data warehouse, publishers must register the database connection file with the ArcGIS GIS Server site that acts as the ArcGIS Enterprise portal's hosting server.
Install and configure drivers
To connect to Redshift from ArcGIS Pro, you must install the latest Amazon Redshift 64-bit ODBC driver on each ArcGIS Pro machine. To publish a map image layer that contains data from Redshift, you must install the Amazon Redshift 64-bit ODBC driver on each machine in the ArcGIS Enterprise portal's hosting server site.
Download the Amazon Redshift ODBC driver from the Amazon Web Services (AWS) website, and install it on all ArcGIS client machines that will connect to Redshift. Follow instructions provided by AWS to install and configure the driver.
- Download the ODBC driver for Linux.
- Download the ODBC driver for Microsoft Windows.
Alter the init_user_param.sh script (Linux only)
If the portal's hosting server runs on Linux machines, you must install the drivers on each machine in the GIS Server site and configure the init_user_param.sh script on each machine to access the drivers.
Alter the init_user_param.sh script installed with ArcGIS Server to reference the drivers. You can access this script by browsing to the <ArcGIS Server installation directory>/arcgis/server/usr directory.
- Ensure that the ArcGIS Server installation owner on each machine has at least read and execute permissions on the data warehouse client libraries.
- Open the init_user_param.sh script in a text editor.
- Remove the comment marks (#) from the line beginning with export, replace <Location_to_ODBC_driver_manager_libraries> with the location of the ODBC driver on the ArcGIS Server machine, and replace <Location_to_amazon.redshiftodbc.ini> with the location of the amazon.redshiftodbc.ini file on the machine.
# ----------------------------------------------------------------------- # Modify this section to configure Amazon Redshift ODBC connector # # ----------------------------------------------------------------------- export LIB_ODBC_DRIVER_MANAGER=<Location_to_ODBC_driver_manager_libraries>/libodbc.so.2 export AMAZONREDSHIFTODBCINI=<Location_to_amazon.redshiftodbc.ini>/amazon.redshiftodbc.ini
- Save and close the script.
- For the changes you made in the init_user_param.sh file to take effect, you must restart ArcGIS Server. To do this, run the stopserver.sh script and then run the startserver.sh script on each machine in the ArcGIS Server site.
./stopserver.sh
./startserver.sh
Create database connection files
In ArcGIS Pro, use the New Database Connection dialog box to create a connection to Redshift.
- Open the Catalog pane in ArcGIS Pro.
- Right-click Databases and click New Database Connection.
- Choose Redshift from the Database Platform drop-down list.
- Type the fully qualified name of the server hosting the Redshift database in the Server text box.
The name is in the format <cluster>.<server>.<region>.redshift.amazon.com. For example, if the database cluster is named mycluster, the server is named myserver, and it is deployed in Amazon region us-east-2, the server name is mycluster.myserver.us-east-2.redshift.amazon.com.
If the Redshift instance communicates using a port other than the default port (5439), add the port number after the fully qualified server name. For example, if you use port 5440 to communicate with the instance above, type mycluster.myserver.us-east-2.redshift.amazon.com,5440 in the Server text box.
- Type the user name and password for the credentials to use for authentication.
- If you will use the database connection file to publish web layers or use in geoprocessing models, check the Save User/Password check box.
- Choose the database to connect to from the Database drop-down list.
- Click OK to create the connection file.
The connection is listed under Databases in the Catalog pane.
You can rename the file by typing a new name and pressing Enter.
Register with the hosting server
To allow the ArcGIS Server site to access the data, add a registered data store in ArcGIS Pro or add a data store item in the portal.
Next steps
After you configure the ArcGIS clients to connect and create a database connection file, you and other organization members can do the following:
- Analysts and publishers create a query layer in a map in ArcGIS Pro.