Documentation / Product / Integrations / Amazon Web Services / Amazon Redshift

Amazon Web Services (AWS): Amazon Redshift: Export Audience

The Redshift Export lets you create and keep updated an AWS Redshift table based on a Lytics audience. With your audience in Redshift you can use your already existing analytics tools to gain new insight into your users.

Integration Details

Steps/Pattern:

  1. Scan the selected audience.
  2. Write a file up to 1 GB of users to S3. Repeat until all users have been written to a file.
  3. Copy the files into a temporary table.
  4. Rename the temporary table to the main table.

The Redshift Export is a two step export, it first exports users to Amazon S3, then executes a COPY operation to load those files to a table in Redshift. The table's name is based on the Lytic's audience's slug name. The files are setup to expire after 72 hours, so no manual cleanup is needed. Executing the COPY command to a temporary table allows the main table to continue to be used while data is loading; Only the brief time when the main table is removed and the temporary table is renamed will the data be unavailable. The temporary table is a full table and not an actual temporary table in Redshift.

Fields

By default, Lytics exports all user fields to Redshift. You may configure the fields to export by selecting them in the Fields to Export input. Fields in Redshift will match their Lytics field names. The type depends on the field type in Lytics:

Lytics typeRedshift column type
IntINT8
FloatFLOAT
DateTIMESTAMPZ
BoolBOOLEAN
StringVARCHAR(max)
OtherSUPER

Configuration

Follow these steps to set up and configure an export job for Amazon Web Services (AWS) Redshift in the Lytics platform. If you are new to creating jobs in Lytics, see the Jobs Dashboard documentation for more information.

  1. Select Amazon Web Services (AWS) from the list of providers.
  2. Select the export job type from the list.
  3. Select the Authorization you would like to use or create a new one.
  4. Enter a Label to identify this job you are creating in Lytics.
  5. (Optional) Enter a Description for further context on your job.
  6. Select the audience to export.
  7. Complete the configuration steps for your job.
  8. (optional) From the Region input, select aWS region that S3 resides in (us-east-2, etc.).
  9. (optional) In the S3 Bucket Name text box, enter select or enter the bucket that you would like to save your files in.
  10. In the Directory text box, select or enter the directory that you would like to save your files in. The directory suggestions can be slow on large S3 buckets. These files will expire after 72 hours.
  11. (optional) From the Fields to Export input, select a list of user fields to export.
  12. (optional) In the User Limit numeric field, enter the maximum number of users to export. Leave blank to export all users.
  13. (optional) Select the Keep Updated checkbox, to select to run this export continuously.
  14. (optional) From the File Export Frequency input, select how often a continuous export should update the table. Default is daily.
  15. (optional) From the Time of Day input, select the time of day to start the update. This only affects daily and slower frequency exports. Exact time of the update will vary based on load and audience size.
  16. (optional) From the Timezone input, select the timezone to use for the time of day.

  17. Click the Start job button to start the job