QuintenBauwens opened a new issue, #4246:
URL: https://github.com/apache/streampipes/issues/4246
### Apache StreamPipes version
0.98.0
### Affected StreamPipes components
Processing Elements
### What happened?
When trying to deploy a adapter with python through the endpoint API the
schema field 'PropertyScope' isnt getting recognized which causes data not
being saved into the data lake.
### How to reproduce?
Send yaml config to API-endpoint ("v2/connect/compact-adapters"):
name: Test Python Deploy
description: Testing compact adapter creation via API
appId: org.apache.streampipes.connect.iiot.adapters.opcua
configuration:
- ADAPTER_TYPE: PULL_MODE
PULLING_INTERVAL: "1000"
incomplete-event-handling: Ignore (only complete messages are sent)
- securityMode: None
- securityPolicy: None
- userAuthentication: anonymous
- OPC_HOST_OR_URL: OPC_URL
OPC_SERVER_URL: SERVER-URL
- AVAILABLE_NODES:
- ns=2;i=2
- ns=2;i=3
- NAMING_STRATEGY: Display Name
schema:
RandomValue:
label: RandomValue
propertyScope: MEASUREMENT_PROPERTY
ValuesPerSecond:
label: ValuesPerSecond
propertyScope: HEADER_PROPERTY
timestamp:
label: Timestamp
description: The current timestamp value
propertyScope: HEADER_PROPERTY
semanticType: http://schema.org/DateTime
enrich:
timestamp: timestamp
transform:
rename: {}
measurementUnit: {}
createOptions:
persist: true
start: true
The adapter will be deployed and will work:
<img width="1433" height="41" alt="Image"
src="https://github.com/user-attachments/assets/5c97fb96-aab0-40ff-873c-730cc8fd88bf"
/>
But as you can see the parameter 'PropertyScope MEASUREMENT_PROPERTY' is
getting ignored:
<img width="1838" height="639" alt="Image"
src="https://github.com/user-attachments/assets/d5203d43-df80-435e-a77a-44c360ed440f"
/>
*Except for the schema field timestamp, this is because of enrich i think*
When i manually change the field to measurement the data is getting saved in
the data lake.
### Expected behavior
When retrieving the DataStream config with the StreamPipes module for python:
{'class_name': 'org.apache.streampipes.model.SpDataStream',
'element_id': 'sp:spdatastream:YoctVO',
'name': 'Provisioner OPCUA Test Adapter',
'description': 'OPC UA test-adapter created by StreamPipes Provisioner',
'icon_url': None,
'app_id': 'sp:spdatastream:YoctVO',
'includes_assets': False,
'includes_locales': False,
'included_assets': [],
'included_locales': [],
'application_links': [],
'internally_managed': True,
'connected_to': None,
'event_grounding': {'transport_protocols': [{'class_name':
'org.apache.streampipes.model.grounding.NatsTransportProtocol',
'element_id': 'sp:transportprotocol:mXmSNo',
'broker_hostname': 'nats',
'topic_definition': {'class_name':
'org.apache.streampipes.model.grounding.SimpleTopicDefinition',
'actual_topic_name':
'org.apache.streampipes.connect.f578631d-ff09-4b7f-992a-2f0c3f97a87e'},
'port': 4222}],
'transport_formats': [{'rdf_type':
['http://sepa.event-processing.org/sepa#json']}]},
'event_schema': {'event_properties': [{'class_name':
'org.apache.streampipes.model.schema.EventPropertyPrimitive',
'element_id': 'sp:eventproperty:bhzPKP',
'label': 'RandomValue',
'description': None,
'runtime_name': 'RandomValue',
'semantic_type': None,
'property_scope': 'NONE',
'runtime_id': None,
'runtime_type': 'http://www.w3.org/2001/XMLSchema#double',
'measurement_unit': None,
'value_specification': None},
{'class_name':
'org.apache.streampipes.model.schema.EventPropertyPrimitive',
'element_id': 'sp:eventproperty:xpSyVv',
'label': 'ValuesPerSecond',
'description': None,
'runtime_name': 'ValuesPerSecond',
'semantic_type': None,
'property_scope': 'NONE',
'runtime_id': None,
'runtime_type': 'http://www.w3.org/2001/XMLSchema#integer',
'measurement_unit': None,
'value_specification': None},
{'class_name':
'org.apache.streampipes.model.schema.EventPropertyPrimitive',
'element_id': 'sp:eventproperty:UEAfNe',
'label': 'Timestamp',
'description': 'The current timestamp value',
'runtime_name': 'timestamp',
'semantic_type': 'http://schema.org/DateTime',
'property_scope': 'HEADER_PROPERTY',
'runtime_id': None,
'runtime_type': 'http://www.w3.org/2001/XMLSchema#long',
'measurement_unit': None,
'value_specification': None}]},
'measurement_capability': None,
'measurement_object': None,
'corresponding_adapter_id': 'sp:adapterdescription:BUAuXY',
'category': None,
'uri': 'sp:spdatastream:YoctVO',
'dom': None,
'rev': '1-4dee27eb80c724b3bca42fcfb67fd6d3'}
As you can see after the creation of the adapter succeeded through the
API-endpoint and you retrieve the config the schema-field 'PropertyScope' is
being set on 'NONE' eventhough MEASUREMENT_PROPERTY was being send
### Additional technical information
_No response_
### Are you willing to submit a PR?
None
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]