Considerations - 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).


The following are considerations for using HyperLogLog in Amazon Redshift:

  • The following non-HyperLogLog functions can accept an input of type HLLSKETCH or columns of type HLLSKETCH:

    • The aggregate function COUNT

    • The conditional expressions COALESCE and NVL

    • CASE expressions

  • The supported encoding is RAW.

  • You can perform an UNLOAD operation on table with HLLSKETCH columns into text or CSV. You can use the UNLOAD HLLSKETCH columns to write HLLSKETCH data. Amazon Redshift shows the data in a JSON format for a sparse representation or a Base64 format for a dense representation. For more information about UNLOAD, see Unloading the HLLSKETCH data type.

    The following shows the format used for a sparse HyperLogLog sketch represented in a JSON format.

  • You can import text or CSV data into Amazon Redshift using the COPY command. For more information, see Loading the HLLSKETCH data type.

  • The default encoding for HLLSKETCH is RAW. For more information, see Compression encodings.