Skip to main content

Namespace Properties

Namespace properties are key-value settings that apply to a whole namespace. The platform reads them to decide how long configurations are cached, which market adapter parses an incoming file, and which decision tree and processing infrastructure flows use. You can also create your own properties, which custom rules read at runtime.

Each property is a record with these fields:

FieldMeaning
keyThe property name. Keys are case-sensitive and must match the spelling in the tables below.
valueAlways stored as a string. Structured values are JSON, written as a string: {"some_label": 123}. Booleans are the strings true or false.
readOnlySet by the platform for properties it manages. Leave false for your own.
authorized, deletedPlatform bookkeeping. Leave false.

Changing namespace properties requires the update permission on the billingaccount resource (see IAM and Permissions). The platform ignores keys it does not know, so a typo in one of the keys below silently does nothing, while a key of your own is simply stored for your rules to read.

How to view and change properties​

In the console​

In the new console, open Settings and choose Namespace (shown only to users who may manage the namespace). The settings cards there write the well-known properties for you, for example Multi-queue data processing sets disable-labelled-messages and Default decision tree sets default_decision_tree. Every other property, including the ones you create yourself, appears under Advanced properties as a raw key, value and type, where you can add, change and delete them.

In the legacy console the same list is under Administrator → Namespaces → Details → Properties.

With the API​

Namespace properties are part of the namespace resource of API v1.5:

  1. Call GET /ewx/v1/billingaccount/billingaccount/namespace/{id} and copy the "properties": [...] array from the response.
  2. Call PUT /ewx/v1/billingaccount/billingaccount/namespace/properties with the namespace id and the full properties array, with your additions or changes applied.
  3. Review the list before submitting.
The PUT replaces the whole list

Any existing property you leave out of the properties array is deleted. Always start from the current list returned by the GET.

If you do not see these endpoints in the API documentation, your user lacks billingaccount rights.

With ewx-cli​

ewx-cli config download, upload and transfer treat namespace properties as a resource type (--namespace-property <key>), so they can be kept in git and released together with the flows and rules that depend on them. The market_adapters property is merged into the destination rather than overwritten. See ewx-cli.

Available properties​

Processing caches​

The processing pipeline caches the configurations it loads for a flow (rules, flows, transformation configurations and the rest). This property sets the cache lifetime in seconds. A shorter lifetime makes configuration changes visible sooner at the cost of more reads; 0 disables caching, which is useful while developing rules on a test namespace and unsuitable for production load.

KeyValueWhat it does
global_cache_ttlInteger seconds, e.g. 10Cache lifetime for every configuration type the pipeline loads. When unset, the platform default of 60 seconds applies. A value that is not an integer is logged as an error and the default is used.

Ingestion and flows​

KeyValueWhat it does
market_adaptersJSON mapping a file label to a market adapter id: {"meter_reads_csv": 5136851304185856}Automatic market adapter assignment: a file that arrives with a label listed here is parsed by the mapped market adapter without a manual choice. From 26.05 onwards also editable in the console under File Management → Payload Mapping. See Market Adapter and Data Ingestion.
default_decision_treeDecision tree idDecision tree applied to flows that are started without one of their own, unless the trigger bypasses decision trees. Also editable in the console as Default decision tree. See Decision Trees.
disable-labelled-messagestrueTurns off labelled message routing for the whole namespace: all flows run on the default processing infrastructure regardless of the labels on their transformation configurations. Also editable in the console as Multi-queue data processing. See Labelled Message Routing.

Task management​

KeyValueWhat it does
task_attachment_max_bytesMaximum file size in bytes, e.g. 26214400Largest file a task comment may carry. Defaults to 25 MB (26214400). See Task Management.
task_attachment_content_typesComma-separated MIME types, e.g. image/png,application/pdfFile types a task comment may carry. Defaults to PNG, JPEG, GIF, WebP, PDF, CSV, plain text, Excel (.xls, .xlsx) and Word (.docx).

Namespace lifecycle​

KeyValueWhat it does
allow_deleteAny value; presence enables itA namespace can only be deleted while this property is present. It acts as a safety latch: set it immediately before a planned deletion and never on a production namespace.

Custom properties​

Anyone with the billingaccount update permission can add any key they like. The platform stores it unchanged and never acts on it, but every rule that runs in the namespace can read it. This makes custom properties the place for settings that differ per namespace and should not be hard-coded in a rule or repeated in every flow design: an outbound Pub/Sub topic, an external endpoint, a threshold, a feature switch for a business process.

In a rule the namespace is available as self.namespace, and its properties as a list of Property objects with a key and a value:

from ewx_public.flow_rule import FlowRule
from ewx_public.rule_result import RuleResult


class PublishReadings(FlowRule):
def apply(self, **kwargs):
properties = {prop.key: prop.value for prop in self.namespace.properties}
topic = properties.get("readings_topic_name")
if topic is None:
raise ValueError("Namespace property 'readings_topic_name' is not set")
threshold = float(properties.get("spike_threshold", "1.5"))
...
return RuleResult(self.dataframe)

Values are always strings. Convert numbers and booleans yourself, and use json.loads for structured values. Read a property once per apply rather than per datapoint.

Unit tests seed properties through the testing factories:

from ewx_public.domain.models.property import Property
from ewx_public.testing import make_namespace, make_testable

rule = make_testable(
PublishReadings,
namespace=make_namespace(
id="enrx_org_001",
properties=[Property(key="readings_topic_name", value="readings-out")],
),
)

Choose keys that cannot collide with the platform's own: a short prefix for your organisation or process, such as acme_readings_topic_name, keeps them apart. See Rule framework functions and Unit Testing Rules.

Process Pool Assignment​

Each namespace is assigned to a process pool. Process pools separate data processing into different compute environments, allowing namespaces that share a process pool to share processing resources.

The process pool is an attribute of the namespace, not a property in the list above, and it determines which compute infrastructure processes the namespace's data. To change it, contact the service desk: a platform deployment is required for the change to take effect.