Skip to main content

PDM Reader

pdm-datareader logo

Runs on Windows Runs on MacOS Runs on RHEL7 SCM Compliance PyPI - Version

pdm-datareader is a python package for querying Production Data Mart tables using SQL. The package handles authentication for end users with user impersonation, but also allows for inserting your own token. It must be run from Equinor managed environments connected to Equinor network.

Pull requests, feature requests and issues are welcomed using the GitHub Project Repository or as a ServiceNow ticket directed to Production Data Mart.

Install

  1. Ensure that ODBC Driver for SQL Server is installed. Currently supports both v18 and v17.
    This driver is bundled with the Microsoft SQL Client package in AccessIT, and should be pre installed on linux environments. Instructions for installing on MacOS can be found here..
  2. MacOS users must install unixodbc. See https://pypi.org/project/pyodbc/ for current instructions.
  3. Linux users must apply for Linux compliant device exclusion to get multifactor authentication to work.
  4. Finally install the latest version of the python package using:
    pip install pdm-datareader

Usage

See examples/demo.py or try the code below that queries PDM and retrieves data:

import datetime as dt
from pdm_datareader import query

# Example with parameter bindings to avoid SQL injection issues (recommended)
sql = '''
SELECT top(100) * 
FROM PDMVW.WELL_PROD_DAY 
WHERE COUNTRY = :countrycode 
AND PROD_DAY = :startdate
'''
df = query(sql, params={'countrycode': 'NO',
                 'startdate': dt.datetime(2022, 1, 1)})
print(df)

# Example without parameters (not recommended)
sql = 'SELECT TOP(1) * FROM PDMVW.WELL_PROD_DAY'
df = query(sql)
print(df)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdm_datareader-2.5.5.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdm_datareader-2.5.5-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file pdm_datareader-2.5.5.tar.gz.

File metadata

  • Download URL: pdm_datareader-2.5.5.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pdm_datareader-2.5.5.tar.gz
Algorithm Hash digest
SHA256 435dc7d3b077de9f1c56f86f049d63cfeac2bd6afca31e47e9badb6c0f1557d2
MD5 32e8089055465489fa3295cfdfef8011
BLAKE2b-256 e569247b86d612799c46b043f297cc90c53c7025926a0aac090b6f10f47b3602

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdm_datareader-2.5.5.tar.gz:

Publisher: cd.yml on equinor/pdm-datareader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pdm_datareader-2.5.5-py3-none-any.whl.

File metadata

  • Download URL: pdm_datareader-2.5.5-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pdm_datareader-2.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0b094b8d234f856b508b5c2e5e3b16fec448f1f145b351338a370cbdb1b52161
MD5 1766d5eb930a1481fa5c6d2561388e4f
BLAKE2b-256 292fcb2bf363309dc553b07a3695721bdb54d815838e7cff86990546d696090f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdm_datareader-2.5.5-py3-none-any.whl:

Publisher: cd.yml on equinor/pdm-datareader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.5.5 This release

2 files

2.5.4

2 files

2.5.2

2 files

2.5.1

2 files

2.5.0

2 files

2.4.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page