Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagetext
echo "create role alexandria with superuser login;" \
  | psql -Upostgres postgres
 
yum -y install alexandria-schema-tools
gunzip -c /usr/share/alexandria-schema-tools/alexandria-dbs-10.x.gz \
  | psql -Ualexandria -h <POSTGRESQL-HOST> postgres
 
# There's also support for 9.x,
# gunzip -c /usr/share/alexandria-schema-tools/alexandria-dbs-9.x.gz \
#  | psql -Ualexandria -h <POSTGRESQL-HOST> postgres

11. Change the directory to the mounted USB file system and create the database. If desired, you can redirect errors (if any) to LOG.2.

Code Block
languagetext
cat alexandria-dwh.sql | psql -U alexandria postgres 2>/tmp/LOG.2

12. To ensure  To ensure that the database has been created, run:

...

Code Block
languagetext
                 List of databases      
Name       |  Owner    | Encoding |   Collate  |    Ctype    |  Access privileges
-----------------+------------+----------+-------------+-------------+-----------------------
alexandria |alexandria | UTF8     | en_US.UTF-8| en_US.UTF-8 |                                		                                                                                                 
postgres   |postgres   | UTF8     | en_US.UTF-8| en_US.UTF-8 |  
template0  |postgres   | UTF8     | en_US.UTF-8| en_US.UTF-8 |=c/postgres          +      
 		   |           |          |            |             | postgres=CTc/postgres
template1  |postgres   | UTF8     | en_US.UTF-8| en_US.UTF-8 |=c/postgres          +       
           |           |          |            |             | postgres=CTc/postgres

1312. Run pgtuneNote that this requires Python. You can also use the online tool https://pgtune.leopard.in.ua/#/ and fill in the required values as well as those that correspond to your system. Add or change the appropriate settings and restart PostgreSQL.

Code Block
languagetext
yum -y install pgtune
  pgtune -i postgresql.conf  -T DW -c 500
  [ paste added configuration options at end of postgres.conf ]

1413. Run the pre-flight check script to confirm that your system is properly configured to load the data.

...

.

Code Block
cd-pre-flight-check.sh

...

Resolve any recognized errors. For unfamiliar errors, please contact support@ificlaims.com.

1514Use the load script to load the CLAIMS Direct data into PostgreSQL tables. Since the loading process will take 1-2 days, we recommend that you use the nohup command to detach the script from the terminal and allow it to run in the background.

Code Block
nohup bash cd-load.sh

1615. Use the ps command periodically to check whether the loading process has completed.

Note

Note: If you want to check on the process while it is running, use the following command to show the progress of the tables which are being copied:

Code Block
ps -eaf |grep COPY

1716. Once the loading process is complete, you can run the cd-count.sh script, a simple QA of table counts, to ensure that the tables have loaded correctly. Modify the IP address to reflect the PostgreSQL server. This may take an hour or more to run.

...

More information about the tables can be seen in Data Warehouse Design.

1817. Optional: you may want to run a simple SQL query as an additional test to confirm that the data is present.

...