Well Properties#
This section focuses on retrieving well property values from a Well Properties Container. To generate well properties, you can extract them from a document (see Results Extraction in Document Management), run an IPTA (see IPTA ), run an IRTA (see IRTA ), or add them manually using the Well Flat View (see KAPPA-Automate Modes) etc.
Read Well Properties Values#
To read well properties, first locate your well property container within your well:
import kappa_sdk as ka
import datetime as dt
connection = ka.Connection("https://your-ka-instance.com", verify_ssl=False)
field = next(x for x in connection.get_fields() if x.name == "Field")
well = next(x for x in field.wells if x.name == "Well")
well_property_container = next(x for x in well.well_property_containers if x.name == "Master")
Once you have retrieved the well property container, you have two options:
Retrieve all well properties values at a specific date:
well_properties_at_date = well_property_container.get_well_properties(dt.datetime.now())
Note
If you don’t specify a date, it returns the most recent value for each well property.
Retrieve all values for a specific well property:
well_properties = well_property_container.get_well_property_values("WellPropertyAlias")
dates = well_properties.dates
values = well_properties.values
Note
You can use the same parameters as the kappa_sdk.Data.read()
method, such as unit
, from_time
, etc.
Warning
For both methods, you must use the property’s alias rather than its name to retrieve values.
Well Properties Catalog#
To find a well property’s alias, you will need to access the well properties catalog.
The system maintains a global well properties catalog that serves as a template when creating new fields. Each field receives a copy of this catalog, which you can then customize by adding field-specific well properties.
While the UI provides the easiest way to find well property aliases, you can also access them through the SDK.
Use the kappa_sdk.Connection
object for the global catalog and the kappa_sdk.Field
object for a field’s catalog:
global_well_properties_catalog = connection.well_properties_catalog
field_well_properties_catalog = field.well_properties_catalog
The catalog is a list of kappa_sdk.WellProperty
that you can iterate through:
for well_property in field_well_properties_catalog:
print(f"Well Property Alias: {well_property.alias}")
print(f"Well Property Name: {well_property.name}")
Note
You can add new properties to either catalog by appending a new kappa_sdk.WellProperty
instance, just as you would append an element to a list.