This tech-note describes how to speed up Redshift based Intelligent Cube publishing time. The main idea is to avoid using JDBC/ODBC and instead export the Redshift table to S3, then download the data files from S3 to Intelligence Server host local file system and finally publishing from the local file system data files.
(1) JDCB/ODBC: Publishing an Intelligent Cube from Redshift JDBC/ODBC connection does not take advantage of Redshift parallelism. The JDBC/ODBC connection to Redshift connects Intelligence Server process to a single node in Redshift cluster and all data must go through this single connection.
(2) Redshift → S3 → Local file system → Intelligence Server: When exporting a redshift table to S3, the exporting process is done in parallel. Therefore this export is faster. Also, when exporting data files S3 to local filesystem, the process is also parallel. Furthermore, when publishing the Intelligent Cube from local file system data files, we can parallelize the reading of the files into Intelligence Server memory.

Next, we describe the process of publishing the Intelligent Cube through exporting the data files from Redshift to S3, then to local file system and finally to Strategy Intelligence Server. Each step is described below.
The command to export a redshift table to S3 is as follows:
unload ('select * from fact_table')
to 's3://transfer_bucket/unload/'
credentials
'aws_access_key_id=AAAAA;aws_secret_access_key=BBBBB'
maxfilesize 6 GB
DELIMITER ',';Notes:
After the files are stored in S3, we can list them:
$aws s3 ls s3://transfer_bucket/unload/ 2017-08-18 16:57:28 0 2017-08-19 09:32:44 6442453435 0000_part_00 2017-08-19 09:40:19 6442454142 0000_part_01 2017-08-19 09:46:54 6442452707 0000_part_02 2017-08-19 09:55:52 6316871688 0000_part_03 2017-08-19 09:32:45 6442455018 0001_part_00 2017-08-19 09:39:21 6442451180 0001_part_01 2017-08-19 09:46:34 6442453662 0001_part_02 2017-08-19 09:54:19 6316613046 0001_part_03 2017-08-19 09:32:48 6442452194 0002_part_00 2017-08-19 09:39:33 6442453551 0002_part_01 2017-08-19 09:48:23 6442454438 0002_part_02 2017-08-19 09:55:44 6314228180 0002_part_03 2017-08-19 09:32:48 6442455049 0003_part_00 2017-08-19 09:40:21 6442455773 0003_part_01 2017-08-19 09:47:30 6442451353 0003_part_02 2017-08-19 09:55:02 6315592856 0003_part_03 2017-08-19 09:32:44 6442453070 0004_part_00
$aws s3 cp s3://transfer_bucket/unload/ output/ --recursive
ls | xargs sed -i '1 i\col1_id,col1_desc,col2_id,col2_desc'
cd output/ for f in * ; do mv "$f" "$f".csv ; done
Tune Strategy Intelligence Server:
Tune Strategy Web:





438832