Managing Amazon Web Services Data Exchange datashares
With Amazon Redshift, you can securely share and receive live data from Amazon Web Services Data Exchange without having to create and manage data extracts or pipelines. Managing Amazon Web Services Data Exchange datashares allows you to subscribe to third-party data products and integrate live data streams directly into your Amazon Redshift data warehouse. The following sections demonstrate managing Amazon Web Services Data Exchange datashares within your Amazon Redshift clusters.
Creating data sets on Amazon Web Services Data Exchange
Create data sets on Amazon Web Services Data Exchange.
Sign in to the Amazon Web Services Management Console and open the Amazon Redshift console at https://console.amazonaws.cn/redshiftv2/
. -
On the navigation menu, choose Clusters, then choose your cluster. The cluster details page appears.
-
Choose Datashares.
-
In the Datashares created in my account section, choose an Amazon Web Services Data Exchange datashare.
-
Choose Create data set on Amazon Web Services Data Exchange. For more information, see Publishing a new product
.
Editing Amazon Web Services Data Exchange datashares
Edit Amazon Web Services Data Exchange datashares using the console. Connect to a database first to see the list of datashares created in your account.
For Amazon Web Services Data Exchange datashares, you can't make changes to data consumers.
To edit the publicly accessible setting for Amazon Web Services Data Exchange datashares, use the Query editor v2. Amazon Redshift generates a random one-time value to set the session variable to allow turning this setting off. For more information, see ALTER DATASHARE usage notes.
Sign in to the Amazon Web Services Management Console and open the Amazon Redshift console at https://console.amazonaws.cn/redshiftv2/
. -
On the navigation menu, choose Clusters, then choose your cluster. The cluster details page appears.
-
From the navigator menu, choose Editor, then Query editor v2.
-
If this is the first time you use the Query editor v2, configure your Amazon Web Services account. By default, an Amazon owned key is used to encrypt resources. For more information about configuring your Amazon Web Services account, see Configuring your Amazon Web Services account in the Amazon Redshift Management Guide.
-
To connect to the cluster that your Amazon Web Services Data Exchange datashare is in, choose Database and the cluster name in the tree-view panel. If prompted, enter the connection parameters.
-
Copy the following SQL statement. The following example changes the publicly accessible setting of the salesshare datashare.
ALTER DATASHARE salesshare SET PUBLICACCESSIBLE FALSE;
-
To run the copied SQL statement, choose Queries and paste the copied SQL statement in the query area. Then choose Run.
An error appears following:
ALTER DATASHARE salesshare SET PUBLICACCESSIBLE FALSE; ERROR: Alter of ADX-managed datashare salesshare requires session variable datashare_break_glass_session_var to be set to value 'c670ba4db22f4b'
The value 'c670ba4db22f4b' is a random one-time value that Amazon Redshift generates when an unrecommended operation occurs.
-
Copy and paste the following sample statement into the query area. Then run the command. The
SET datashare_break_glass_session_var
command applies a permission to allow an unrecommended operation for an Amazon Web Services Data Exchange datashare.SET datashare_break_glass_session_var to 'c670ba4db22f4b';
-
Run the ALTER DATASHARE statement again.
ALTER DATASHARE salesshare;
Amazon Redshift updates your datashare with the changes.
Deleting Amazon Web Services Data Exchange datashares created in your account
Delete Amazon Web Services Data Exchange datashares created in your account using the console. Connect to a database first to see the list of datashares created in your account.
Sign in to the Amazon Web Services Management Console and open the Amazon Redshift console at https://console.amazonaws.cn/redshiftv2/
. -
On the navigation menu, choose Clusters, then choose your cluster. The cluster details page appears.
-
From the navigator menu, choose Editor, then Query editor v2.
-
If this is the first time you use the Query editor v2, configure your Amazon Web Services account. By default, an Amazon owned key is used to encrypt resources. For more information about configuring your Amazon Web Services account, see Configuring your Amazon Web Services account in the Amazon Redshift Management Guide.
-
To connect to the cluster that your Amazon Web Services Data Exchange datashare is in, choose Database and the cluster name in the tree-view panel. If prompted, enter the connection parameters.
-
Copy the following SQL statement. The following example drops the salesshare datashare.
DROP DATASHARE salesshare
-
To run the copied SQL statement, choose Queries and paste the copied SQL statement in the query area. Then choose Run.
An error appears following:
ERROR: Drop of ADX-managed datashare salesshare requires session variable datashare_break_glass_session_var to be set to value '620c871f890c49'
The value '620c871f890c49' is a random one-time value that Amazon Redshift generates when an unrecommended operation occurs.
-
Copy and paste the following sample statement into the query area. Then run the command. The
SET datashare_break_glass_session_var
command applies a permission to allow an unrecommended operation for an Amazon Web Services Data Exchange datashare.SET datashare_break_glass_session_var to '620c871f890c49';
-
Run the DROP DATASHARE statement again.
DROP DATASHARE salesshare;
After the datashare is deleted, datashare consumers lose access to the datashare.
Deleting a shared Amazon Web Services Data Exchange datashare can breach data product terms in Amazon Web Services Data Exchange.