tenthe opened a new issue, #4289:
URL: https://github.com/apache/streampipes/issues/4289
### Body
## 🎯 Goal
Improve convenience by reducing the need to memorize common transformation
patterns, while still requiring basic programming knowledge.
## 🧩 Problem
Basic transformations (e.g., add timestamp, rename, delete fields) require
users to remember JavaScript patterns.
Example:
```js
event.timestamp = Date.now();
event.newName = event.oldName;
delete event.oldName;
delete event.propertyToDelete;
event.timestamp = new Date(event.dateField).getTime();
```
Especially for simple tasks users must recall the syntax.
## 🔄 Alternative 1: Utility Functions + Autocomplete
Provide built-in helper functions combined with editor assistance.
```js
utils.addTimestamp(event);
utils.rename(event, "oldName", "newName");
utils.remove(event, "propertyToDelete");
utils.parseTimestamp(event, "dateField");
```
### Enhancements
* Autocomplete for:
* `event.<fields>` (based on sample data)
* `utils.*` functions
* Inline descriptions / tooltips
### Benefits
* Less need to memorize patterns
* Faster and less error-prone
* Keeps full scripting flexibility
## 🔄 Alternative 2: Rule-Based Snippet Widget
Provide a small UI widget (e.g., **“Add Transformation”**) to generate
common scripts.
### 💡 Concept
* User clicks **“Add Transformation”**
* Selects a rule:
* Add Timestamp
* Rename Field
* Remove Field
* Parse Timestamp
### Interaction
Example: **Rename Field**
* Field: `oldName`
* New name: `newName`
Generated script:
```js
event.newName = event.oldName;
delete event.oldName;
```
The script is shown in a preview and can be **copied and pasted** into the
editor.
### Benefits
* No need to remember syntax
* Simple and non-intrusive
* Acts as lightweight guidance for users
### StreamPipes Committer
I acknowledge that I am a maintainer/committer of the Apache StreamPipes
project.
--
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]