Skip to content

cmem_client.models.rule_block¤

Corporate Memory rule block models for data integration.

A rule block is a reusable transformation unit: a named operator tree with declared input ports, referenced from transform and linking rules instead of being copied into them. Rule blocks are project-scoped task items of type RuleBlock and are available from Corporate Memory 26.2 onwards.

The whole body of a rule block is a single opaque object parameter named ruleBlockModel. Only its ports are modelled explicitly here, because they are the part callers typically read and report; the operator tree, the input examples and the editor layout are passed through untouched.

Classes:

RuleBlock¤

Bases: ReadRepositoryItem

A rule block description (Build).

Functions:

  • get_id – Get the combined ID of the rule block.

Attributes:

data¤

data: RuleBlockData = Field(default_factory=RuleBlockData)

get_id¤

get_id()

Get the combined ID of the rule block.

id¤

id: str
item_links: list[ItemLink] = Field(default_factory=list, alias='itemLinks')

metadata¤

metadata: RuleBlockMetadata = Field(default_factory=RuleBlockMetadata)

model_config¤

model_config = ConfigDict(extra='allow', populate_by_name=True)

project_id¤

project_id: str = Field(alias='project', default='')

tags¤

tags: list[Tag] = Field(default_factory=list)

RuleBlockData¤

Bases: Model

The data section of a rule block task.

Attributes:

model_config¤

model_config = ConfigDict(extra='allow', populate_by_name=True)

rule_block_model¤

rule_block_model: RuleBlockModel = Field(alias='ruleBlockModel', default_factory=RuleBlockModel)

task_type¤

task_type: str = Field(alias='taskType', default='RuleBlock')

type¤

type: str = 'ruleBlock'

RuleBlockMetadata¤

Bases: TypedDict

Metadata of a rule block.

Attributes:

created¤

created: str

createdByUser¤

createdByUser: str

description¤

description: str

label¤

label: str

lastModifiedByUser¤

lastModifiedByUser: str

modified¤

modified: str

RuleBlockModel¤

Bases: Model

The complete rule block model: ports, operator tree, examples and layout.

The defaults are those of an empty rule block as DataIntegration creates it; it rejects a model whose layout lacks nodePositions.

Attributes:

input_examples¤

input_examples: list[Any] = Field(alias='inputExamples', default_factory=list)

layout¤

layout: dict[str, Any] = Field(default_factory=lambda: {'nodePositions': {}})

model_config¤

model_config = ConfigDict(extra='allow', populate_by_name=True)

operator_tree¤

operator_tree: Any = Field(alias='operatorTree', default=None)

ports¤

ports: list[RuleBlockPort] = Field(default_factory=list)

ui_annotations¤

ui_annotations: dict[str, Any] = Field(alias='uiAnnotations', default_factory=lambda: {'stickyNotes': []})

RuleBlockPort¤

Bases: Model

A declared input port of a rule block.

Attributes:

deprecated¤

deprecated: bool = False

description¤

description: str = ''

display_order¤

display_order: int = Field(alias='displayOrder', default=0)

id¤

id: str = ''

label¤

label: str = ''

model_config¤

model_config = ConfigDict(extra='allow', populate_by_name=True)

RuleBlockSearchResultSet¤

Bases: Model

A rule block search result set.

Attributes:

model_config¤

model_config = ConfigDict(extra='allow', populate_by_name=True)

results¤

results: list[RuleBlock]

Comments