0% found this document useful (0 votes)
39 views50 pages

Session3 Overheads

This document provides information on importing data into the PIRAMID pipeline risk modeling software. It describes the various data input options and formats that can be imported, including text files, spreadsheets, and database files. An import wizard is used to map data fields from the external source to PIRAMID's attribute types during import. Examples are given of importing single-attribute and multi-attribute data arranged in different layouts. The document also introduces some database concepts and SQL queries that can be used for post-processing imported data in Access or Excel.

Uploaded by

rodolfo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views50 pages

Session3 Overheads

This document provides information on importing data into the PIRAMID pipeline risk modeling software. It describes the various data input options and formats that can be imported, including text files, spreadsheets, and database files. An import wizard is used to map data fields from the external source to PIRAMID's attribute types during import. Examples are given of importing single-attribute and multi-attribute data arranged in different layouts. The document also introduces some database concepts and SQL queries that can be used for post-processing imported data in Access or Excel.

Uploaded by

rodolfo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Input Options

C-FER

Technologies

technology
creates
advantage

What do you have...

Paper
Text Files
Spreadsheets
Database Files
Pipeline Information System Database

C-FER

Technologies

technology
creates
advantage

Data Entry Choices

Direct entry
Cut and paste from spreadsheet
Import formatted text file (PIRAMID model file .mdl)
Import from external data source

C-FER

Technologies

technology
creates
advantage

What can PIRAMID import...

Open Database Connectivity (ODBC) data sources

C-FER

MS SQL Server, Oracle


MS Access, MS Fox Pro, dBase, Paradox
MS Excel, Lotus spreadsheets
Text files in tabular format
HTML data in tabular format

Technologies

technology
creates
advantage

Terminology

Tables

C-FER

Column / Field
Row / Record

Technologies

technology
creates
advantage

Import Wizard

C-FER

Technologies

technology
creates
advantage

Import Wizard -

C-FER

Technologies

Demo

technology
creates
advantage

Import Wizard -

C-FER

Technologies

Data Source

technology
creates
advantage

Import Wizard -

C-FER

Technologies

DSN Configuration

technology
creates
advantage

Import Wizard -

C-FER

Technologies

Import Profile

technology
creates
advantage

Import Wizard -

C-FER

Technologies

SQL Views

technology
creates
advantage

Attribute Types

Diameter

Import Wizard -

Station

C-FER

Technologies

technology
creates
advantage

Attribute Types

Elevation

Import Wizard -

Station

C-FER

Technologies

technology
creates
advantage

Import Wizard -

C-FER

Technologies

Pipeline Name

technology
creates
advantage

Example - Single Attribute Table

C-FER

Technologies

technology
creates
advantage

Example - Multiple Attributes In Separate Fields

C-FER

Technologies

technology
creates
advantage

Example - Multiple Attributes In One Field

C-FER

Technologies

technology
creates
advantage

Import Wizard -

C-FER

Technologies

Attribute Name Mapping

technology
creates
advantage

Import Wizard -

C-FER

Technologies

Save Profile

technology
creates
advantage

Import Wizard -

C-FER

Technologies

Session Definition

technology
creates
advantage

Import Wizard -

C-FER

Technologies

Pipeline Query

technology
creates
advantage

Import Wizard -

C-FER

Technologies

Import Attributes

technology
creates
advantage

Import Wizard -

C-FER

Technologies

Results

technology
creates
advantage

Hands-on Session 3a

C-FER

Technologies

technology
creates
advantage

Database Background

Flat File database

A single table containing multiple records and fields

Relational database

C-FER

Collection of related tables


Tables can be viewed as a set of rows and columns

Technologies

technology
creates
advantage

Database Terminology

Tables
Queries
Relationships
Stored Routines / Transactions

C-FER

Technologies

technology
creates
advantage

Structured Query Language

Types of Queries/Views

C-FER

INSERT
DELETE
UPDATE
SELECT

Technologies

technology
creates
advantage

SELECT Query

SELECT
FROM
WHERE
GROUP BY
HAVING
ORDER BY

C-FER

Technologies

technology
creates
advantage

SELECT Query -

SELECT

SELECT Pipeline, Begin, End, SMYS

C-FER

Technologies

technology
creates
advantage

SELECT Query -

SELECT

SELECT Pipeline, Begin, End, Wt AS [Wall Thickness]

C-FER

Technologies

technology
creates
advantage

SELECT Query -

FROM

SELECT Pipeline, Begin, End, SMYS


FROM Attributes

C-FER

Technologies

technology
creates
advantage

SELECT Query -

WHERE

SELECT * FROM Attributes


WHERE Pipeline = 'Main Line'

C-FER

Technologies

technology
creates
advantage

SELECT Query

SELECT
FROM
WHERE
GROUP BY
HAVING
ORDER BY

C-FER

Technologies

technology
creates
advantage

Hands-on Session 3b

C-FER

Technologies

technology
creates
advantage

Export & Post-processing Options

C-FER

Technologies

technology
creates
advantage

PIRAMID Model File (*.PIR)

MS Access Database
Tables

Attributes Data
Probabilities
Consequences

Stored Queries

C-FER

Risks
Average/Total Probability
Average/Total Consequence
Average/Total Risk

Technologies

technology
creates
advantage

SELECT Query

SELECT
FROM
WHERE
GROUP BY
HAVING
ORDER BY

C-FER

Technologies

technology
creates
advantage

SELECT Query -

GROUP BY

SELECT [Failure Cause Name], Start, End, Length,


([Small Leak]+[Large Leak]+Rupture)*Length/5280. AS [Total Prob]
FROM Probability

C-FER

Technologies

technology
creates
advantage

SELECT Query -

GROUP BY

SELECT [Failure Cause Name],


Min(Start) AS [Line Start],
Max(End) AS [Line End],
Sum(Length) AS [Line Length],
Sum(([Small Leak]+[Large Leak]+Rupture)*Length/5280.) AS [Prob Failure]
FROM Probability
GROUP BY [Failure Cause Name]

C-FER

Technologies

technology
creates
advantage

SELECT Query -

HAVING

SELECT [Failure Cause Name],


Min(Start) AS [Line Start],
Max(End) AS [Line End],
Sum(Length) AS [Line Length],
Sum(([Small Leak]+[Large Leak]+Rupture)*Length/5280.) AS [Prob Failure]
FROM Probability
GROUP BY [Failure Cause Name]
HAVING Sum(([Small Leak]+[Large Leak]+Rupture)*Length/5280.) > 0.0001

C-FER

Technologies

technology
creates
advantage

SELECT Query -

ORDER BY

SELECT * FROM Attributes


ORDER BY Pipeline, Begin

C-FER

Technologies

technology
creates
advantage

Stored Queries
Complex ???
SELECT Scenarios.[Scenario Name], Pipelines.[Pipeline Name], Pipelines.[Series Name], Segments.[Segment Name], [Failure
Causes].[Failure Cause Name], P1.Year, S1.Start, S1.End, (S1.End-S1.Start) AS Length, P1.[Small Leak], P1.[Large Leak],
P1.Rupture, [Fatalities SL]*[Small Leak] AS [Exp Fatalities SL], Consequence.[Fatalities LL]*[Large Leak] AS [Exp Fatalities
LL], Consequence.[Fatalities Rupt]*[Rupture] AS [Exp Fatalities Rupt], [Cost SL]*[Small Leak] AS [Exp Cost SL], [Cost
LL]*[Large Leak] AS [Exp Cost LL], [Cost Rupt]*[Rupture] AS [Exp Cost Rupt], [Spill Volume SL]*[Small Leak] AS [Exp Volume
SL], [Spill Volume LL]*[Large Leak] AS [Exp Volume LL], [Spill Volume Rupt]*[Rupture] AS [Exp Volume Rupt], [Combined
Impact SL]*[Small Leak] AS [Exp Impact SL], [Combined Impact LL]*[Large Leak] AS [Exp Impact LL], [Combined Impact
Rupt]*[Rupture] AS [Exp Impact Rupt], [Interaction Length SL]*[Small Leak] AS [Individual Risk SL], [Interaction Length
LL]*[Large Leak] AS [Individual Risk LL], [Interaction Length Rupt]*[Rupture] AS [Individual Risk Rupt],
Consequence.[Tolerable Individual Risk]
FROM (((((xPostSections AS S1 INNER JOIN xProbability AS P1 ON (S1.SegmentID = P1.SegmentID) AND (S1.PipelineID =
P1.PipelineID)) INNER JOIN Consequence ON (P1.ScenarioID = Consequence.ScenarioID) AND (S1.SegmentID =
Consequence.SegmentID) AND (S1.PipelineID = Consequence.PipelineID)) INNER JOIN Scenarios ON P1.ScenarioID =
Scenarios.ScenarioID) INNER JOIN Pipelines ON (P1.PipelineID = Pipelines.PipelineID) AND (Consequence.PipelineID =
Pipelines.PipelineID) AND (S1.PipelineID = Pipelines.PipelineID)) INNER JOIN Segments ON (P1.SegmentID =
Segments.SegmentID) AND (P1.PipelineID = Segments.PipelineID) AND (Consequence.SegmentID = Segments.SegmentID)
AND (Consequence.PipelineID = Segments.PipelineID) AND (Pipelines.PipelineID = Segments.PipelineID)) INNER JOIN
[Failure Causes] ON P1.[Failure Cause ID] = [Failure Causes].[Failure Cause ID]
WHERE (((S1.Mid)>[P1].[Start] And (S1.Mid)<[P1].[End] And (S1.Mid)>[Consequence].[Start] And (S1.Mid)<[Consequence].[End]))
ORDER BY P1.Year, P1.Year, P1.[Failure Cause ID], P1.ScenarioID, S1.PipelineID, S1.SegmentID, S1.Start

C-FER

Technologies

technology
creates
advantage

Model File Tables and Queries

C-FER

Technologies

technology
creates
advantage

MS Access Post-processing
SELECT PipelineID, [Failure Cause ID], [End]-[Start] AS Length,
[Small Leak], [Large Leak], Rupture
FROM xProbability
WHERE ScenarioID=0 AND PipelineID=1 AND Year=0

C-FER

Technologies

technology
creates
advantage

MS Excel Post-Processing

C-FER

Technologies

technology
creates
advantage

Excel -

C-FER

Technologies

Data Source

technology
creates
advantage

Excel -

C-FER

Technologies

Query Wizard

technology
creates
advantage

Excel -

C-FER

Technologies

Query Wizard

technology
creates
advantage

Excel -

C-FER

Technologies

Imported Data

technology
creates
advantage

Hands-on Session 3c

C-FER

Technologies

technology
creates
advantage

You might also like