{"id":7914,"date":"2021-10-28t11:00:14","date_gmt":"2021-10-28t15:00:14","guid":{"rendered":"\/\/www.deco-dalles.com\/?p=1730"},"modified":"2021-11-09t10:26:18","modified_gmt":"2021-11-09t15:26:18","slug":"understanding-primavera-xer-files","status":"publish","type":"post","link":"\/\/www.deco-dalles.com\/understanding-primavera-xer-files\/","title":{"rendered":"understanding primavera xer files"},"content":{"rendered":"
in this second part of primavera p6 databases and data cleansing series<\/a>, we will discuss the data structure of an xer file, and how the xer file parser & builder works. as the xer file parser is a manual process (it does not honour p6 business rules), it is handy for the user to have a working knowledge of the p6 database. that\u2019s why in this p6 tutorial we will show a general overview of p6’s data structure, and basic concepts in p6’s database management ( tables, fields , primary key).<\/p>\n primavera p6 stores data in a more then 170 tables<\/a>, every tables contains fields<\/a>, and every field stores records<\/a>.<\/p>\n the tables are referenced to each other by relations between primary<\/a> key and foreign<\/a> key,<\/p>\n for a description of all the tables check this primavera documentation<\/a> , unzip the file, then read the file called pmschema.html.<\/p>\n fortunately, you don\u2019t need to understand the relations between all 170 tables (whew!). in reality there are only around 20 most used tables that you need really to be familiar with.<\/p>\n calculated fields are not stored in primavera’s database as they are calculated on the fly based on other stored fields. for example, resource spread data are not stored in the database at all.<\/p>\n for illustration only, here an example of a p6 database diagrams (showing only some tables) that illustrates the many interconnections.<\/p>\n <\/p>\n nb:\u00a0 g<\/em>enerated by pl\/sql developer<\/a> \u00a0 (using a demo version)<\/p>\n we will use a simple example to show how data you input into p6 client are stored in the database.<\/p>\n let\u2019s take project codes as an example.<\/p>\n let’s say you define a new project code in p6. \u00a0you then define values for your new project code.<\/p>\n <\/p>\n now let\u2019s see how p6 stores the data in the database with the help of excel.<\/p>\n the project code definitions are stored in a table called pcattype. here’s what that table looks like.<\/p>\n <\/p>\n the project code values are stored in a table called pcatval. here’s what the pcatval table looks like.<\/p>\n <\/p>\n the foreign key 93 references these values to the same primary key in the table\u00a0 pcattype, which essentially links the project code values to their project code across tables.<\/p>\n now if in the xer file parser you delete the primary key 93 and you leave it in the table pcatval, you will create an orphaned record, and your xer file will be corrupted and cannot be imported. but more on that later.<\/p>\n xer is the most used format to exchange data with other p6 databases, as xml had some limitations ( limited to one project, less data is exported comparing to xer). in version 8.3, those limitation are removed and there are option to change global data attributes including<\/p>\n the xer file<\/a> is one of the formats used by primavera to exchange schedule data. \u00a0it is a cvs<\/a> type file with tab as a delimiter. in simple english, it is just a text file with tabular data that you can open and modify in any text editor or program that read a cvs file.<\/p>\n you can view the content of an xer file using the notepad editor, or better using excel as it you give a better overview of the data structure.<\/p>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n the first row stores the revision of p6 in which the xer was created (7), the date of the export, and the name of the user.<\/p>\n you will notice that the column a has 4 different attributes:<\/p>\n now when you filter only %t you will have the list of tables:<\/p>\n <\/p>\n when you export a project in a xer file, the data is mapped up to 66 tables<\/a>, usually not all the features are used in a p6 a schedule – generally speaking an \u201caverage\u201d\u00a0 xer file has less than 20 tables. only the data present in the \u201cmodify import configuration\u201d can be exported.<\/p>\n the first part of this tutorial was to show that an xer file can be opened and modified by any editor, but it is not the best solution, as the data is combined in one sheet, and it is very easy to make a mistake thus corrupting your xer. instead primavera has created a versatile utility (though not well known).<\/p>\n the xer file parser can be used for many purposes<\/p>\n <\/p>\n the xer parser is a vba macro for excel that reads an xer file and, based on the values of the first column (%t,%r,%f,%e), will either;<\/p>\n the other functionally is diagnostic; it performs three tests and generates a report with the result<\/p>\n in this part we had a general view of how p6 data store data and how the xer parser & builder works, in the next series we will show you how to use the parser<\/a> to clean your xer files (global code to project codes, and how to map udf etc).<\/p>\n just read the primavera p6 database schema and you will see that the data in an xer file is not that complicated to comprehend – you don\u2019t need to be a database administrator! but you should at least understand the terminology<\/a>.<\/p>\n1) a quick understanding of primavera’s p6 data structure<\/strong><\/h2>\n
1.1) how is data stored in the p6 pmdb database?\u00a0<\/strong><\/h3>\n
1.2) an example – where data is written in the p6 db<\/strong><\/h3>\n
2) how primavera p6 \u00a0exchanges data<\/strong><\/h2>\n
\n
2.1) what is an xer file?<\/strong><\/h3>\n
2.2) how to view an xer file using excel<\/strong><\/h3>\n
\n
\n
2.3) what data is exported in an xer file?\u00a0<\/strong><\/h3>\n
3) the xer file parser utility<\/strong><\/h2>\n
3.1) what is the xer file parser<\/a>?\u00a0<\/strong><\/h3>\n
\n
3.2- how does it work? \u00a0<\/strong><\/h3>\n
\n
\n
wrap up<\/strong><\/h2>\n
thing for you to try<\/strong><\/h2>\n