3.8 PM Tables
Overview of PM Data Installation Process
The Pmdata tables are part of the Project Management (PM) Cell. The following outlines the steps that will be taken during the Pmdata installation.
Step 1: Change your working directory
Step 2: Configure the database properties for the Pmdata
Step 3: Create the Pmdata tables, indexes and sequences
Step 4: Create the triggers for the PM tables
Step 5: Load sample data into the tables
3.8.1 Working Directory
Step1: Change Working Directory for PM Data Installation
During the PM Data Installation we will be working with the Pmdata directory. Within this directory are the files we will be editing to define the database properties, create the PM tables and triggers as well as load the sample data provided with the data package.
To change your working directory to the Pmdata directory enter the following command:
Change Directory Command
cd YOUR_I2B2_DATA_DIR/edu.harvard.i2b2.data/Release_1-7/NewInstall/Pmdata
Important |
The change directory command shown above is written for Linux. The command itself is the same for both Linux and Windows with the only exceptions being the slashes in the path name and Linux does not include the "drive".
|
EXAMPLES:
Windows Command: cd C:\opt\data\edu.harvard.i2b2.data\Release_1-7\NewInstall\Pmdata
Linux Command: cd /opt/data/edu.harvard.i2b2.data/Release_1-7/NewInstall/Pmdata
3.8.2 Set Database Properties
Step 2: Set Database Properties for PM Tables
As stated earlier each i2b2 database schema has a corresponding directory that contains the data files for installing the data. Each of these directories has a file called db.properties and it needs to be updated with your environment variables.
Steps for setting database properties
Assumptions:
- You are logged into the command line application for your environment. (Linux: Terminal or Shell and Windows: Command Prompt)
- You have already changed your working directory to the one that is appropriate for this installation.
- At the command prompt type the following:
Linux Command
open db.properties
Windows Command
db.properties
- The db.properties file will open. Set the following properties for the DBMS at your site:
Important |
When setting the database properties make sure you set the user to i2b2pm. Projects are not assigned to Pmdata which is why the db.project property is not in the PM's db.properties file. |
Database Properties File
Oracle Database
db.type=oracle
db.username=i2b2pm
db.password=demouser
db.server=LocationOfYourDatabase:1521:xe
db.driver=oracle.jdbc.driver.OracleDriver
db.url=jdbc:oracle:thin:@LocationOfYourDatabase:1521:xe
PostgreSQL Database
db.type=postgresql
db.username=i2b2pm
db.password=demouser
db.driver=org.postgresql.Driver
db.url=jdbc:postgresql://LocationOfYourDatabase/i2b2?searchpath=i2b2pm
SQL Server Database
db.type=sqlserver
db.username=i2b2pm
db.password=demouser
db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
db.url=jdbc:sqlserver://LocationOfYourDatabase:1433;database=demo
- Save the changes and close the file.
Tip |
To save yourself steps, DO NOT close your Command Prompt window as you will be continuing to use it throughout the remainder of the installation. |
3.8.3 Create PM Tables
Step 3: Create Project Management (PM) Tables
The third step in the Pmdata installation process is to create the PM tables, indexes and sequences by running the following command:
Select the command line that is appropriate for your environment.
Linux Run Command
ant -f data_build.xml create_pmdata_tables_release_1-7
Windows Run Command
%ANT_HOME%\bin\ant.bat -f data_build.xml create_pmdata_tables_release_1-7
Note |
If the command %ANT_HOME% does not work it may be because you did not set your environment variables as suggested in the Requirements Chapter. If you do not wish to set this variable then you will need to replace %ANT_HOME% with the full path to your Ant directory. |
3.8.4 Create PM Triggers
Step 4: Create Project Management (PM) Stored Procedures
The fourth step in the Pmdata installation process is to create the triggers for the PM tables
Select the command line that is appropriate for your environment.
Linux Run Command
ant -f data_build.xml create_triggers_release_1-7
Windows Run Command
%ANT_HOME%\bin\ant.bat -f data_build.xml create_triggers_release_1-7
Note |
If the command %ANT_HOME% does not work it may be because you did not set your environment variables as suggested in the Requirements Chapter. If you do not wish to set this variable then you will need to replace %ANT_HOME% with the full path to your Ant directory. |
3.8.5 Load PM Tables
Step 5: Load Data Repository (CRC) Tables
The fifth and final step in the Pmdata installation process is to load the data into the PM tables by running the following command:
Important |
The PM scripts assume that the i2b2 cells are running on port 9090; if they are not you will need to modify the Cells URL in the admin tool or modify the PM_CELL_PARAMS records. |
Select the command line that is appropriate for your environment.
Linux Run Command
ant -f data_build.xml db_pmdata_load_data
Windows Run Command
%ANT_HOME%\bin\ant.bat -f data_build.xml db_pmdata_load_data
Comments
0 comments
Please sign in to leave a comment.