Skip to content

rbhughes/purr_petra_cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

purr_petra_cli

purrio logo purrio logo PETRA

Use purr_petra_cli to query Petra projects* from the command line and generate well-centric json. This is a stripped-down implementation of most export functionality of purr_petra.

- core
- dst
- formation
- ip
- perforation
- production
- raster_log
- survey
- vector_log
- well
- zone
  • Each Petra "project" is a semi-structured collection of E&P assets that interoperate with its own DBISAM database. From an IT perspective, Petra is a distributed collection of user-managed databases "on the network" containing millions of assets.

WHO IS THIS FOR?

This was developed as part of a Databricks geospatial catalog pipeline. It is useful for quickly exporting data from Petra, particularly if you don't have a license or want to avoid Petra's cumbersome ASCII export.

LIMITATIONS:

If you are trying to egress lots of data from a large Petra project, this is NOT the tool for you. It relies solely on ODBC via Python. You are better off exporting/parsing a .PPF file.

purr_petra_cli should be fine for smaller projects ~ roughly those with < 100000 wells. Use the --uwis filter to limit state/county.

QUICKSTART:

  1. Install from pypi:

pip install purr_petra_cli

  1. Register the DBISAM dll:

launch console "as Administrator"

purr-petra-cli setup

  1. Try it out:

Usage: purr-petra-cli [OPTIONS] COMMAND [ARGS]...

purr-petra-cli --help

purr-petra-cli collect --help

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ *  --proj              TEXT                                           Path to project directory, It's probably a UNC │
│                                                                       path                                           │
│                                                                       [default: None]                                │
│                                                                       [required]                                     │
│    --asset             [core|dst|formation|ip|perforation|production  The asset (choose from: core, dst, formation,  │
│                        |raster_log|survey|vector_log|well|zone]       ip, perforation, production, raster_log,       │
│                                                                       survey, vector_log, well, zone)                │
│                                                                       [default: well]                                │
│    --uwis              TEXT                                           Full or partial UWI list. Separate UWIs with   │
│                                                                       spaces or commas. Use * or % as wildcards.     │
│                                                                       This is a single arg, so wrap it in quotes.    │
│                                                                       Example: --uwis "05010001102000 350112*        │
│                                                                       350110*"  omitting the --uwis arg selects      │
│                                                                       everything--BEWARE!                            │
│                                                                       [default: None]                                │
│    --output-dir        TEXT                                           Define an output directory store exported json │
│                                                                       data. Enclose paths with spaces in             │
│                                                                       quotes.(Defaults to System TEMP).              │
│                                                                       [default: C:\Users\bryan\AppData\Local\Temp]   │
│    --help                                                             Show this message and exit.                    │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

purr-petra-cli collect --proj c:\projects\MYPROJ --output-dir c:\outdir --uwis "05003*" --asset well

purr-petra-cli collect --proj "c:\projects\SPACE PROJ" --output-dir "c:\path with spaces\out" --uwis "05003*" --asset raster_log

About

Query S&P Petra projects from the command line and export well-centric JSON for 11 data types

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages