Managing Amazon Web Services Data Exchange datashares - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Managing Amazon Web Services Data Exchange datashares

Creating data sets on Amazon Web Services Data Exchange

Create data sets on Amazon Web Services Data Exchange.

  1. Sign in to the Amazon Web Services Management Console and open the Amazon Redshift console at https://console.amazonaws.cn/redshift/.

  2. On the navigation menu, choose Clusters, then choose your cluster. The cluster details page appears.

  3. Choose Datashares.

  4. In the Datashares created in my account section, choose an Amazon Web Services Data Exchange datashare.

  5. 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.

  1. Sign in to the Amazon Web Services Management Console and open the Amazon Redshift console at https://console.amazonaws.cn/redshift/.

  2. On the navigation menu, choose Clusters, then choose your cluster. The cluster details page appears.

  3. From the navigator menu, choose Editor, then Query editor v2.

  4. 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.

  5. 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.

  6. Copy the following SQL statement. The following example changes the publicly accessible setting of the salesshare datashare.

    ALTER DATASHARE salesshare SET PUBLICACCESSIBLE FALSE;
  7. 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.

  8. 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';
  9. 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.

  1. Sign in to the Amazon Web Services Management Console and open the Amazon Redshift console at https://console.amazonaws.cn/redshift/.

  2. On the navigation menu, choose Clusters, then choose your cluster. The cluster details page appears.

  3. From the navigator menu, choose Editor, then Query editor v2.

  4. 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.

  5. 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.

  6. Copy the following SQL statement. The following example drops the salesshare datashare.

    DROP DATASHARE salesshare
  7. 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.

  8. 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';
  9. 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.