### Initial StreamPipes Setup Example Source: https://github.com/apache/streampipes/blob/dev/installer/cli/README.md A quick start example showing how to list available environments, set the 'pipeline-element' environment, and bring up the environment in detached mode. ```bash streampipes env --list streampipes env --set pipeline-element streampipes up -d ``` -------------------------------- ### Start Minimal StreamPipes Installation Source: https://github.com/apache/streampipes/blob/dev/installer/compose/README.md Starts a minimal StreamPipes setup containing only essential adapters, processors, and sinks for IIoT use cases. ```bash docker-compose -f docker-compose.minimal.yml up -d ``` -------------------------------- ### Complete StreamPipes Go Quickstart Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-go/docs/content/en/docs/getting-started/quickstart.md This is the complete Go program combining configuration, client initialization, and data retrieval for the StreamPipes quickstart. ```go package main import ( "log" "github.com/apache/streampipes/streampipes-client-go/streampipes" "github.com/apache/streampipes/streampipes-client-go/streampipes/config" ) func main() { clientConfig := config.StreamPipesClientConfig{ Url: "http://localhost:8030", Credential: config.StreamPipesApiKeyCredentials{ UserName: "", ApiKey: "", }, } streamPipesClient, err := streampipes.NewStreamPipesClient(clientConfig) if err != nil { log.Fatal(err) } dataSeries, err := streamPipesClient.DataLakeMeasures().GetSingleDataSeries("measureName") if err != nil { log.Fatal(err) } dataSeries.Print() } ``` -------------------------------- ### Install Dependencies and Start Development Server Source: https://github.com/apache/streampipes/blob/dev/ui/README.md Install project dependencies and start a local development server for testing. Requires a StreamPipes instance running without the UI. ```bash npm install npm start ``` -------------------------------- ### Conditional Rendering for Setup Button/Link Source: https://github.com/apache/streampipes/blob/dev/ui/src/app/login/components/setup/setup.component.html Renders either an 'Install' button or a 'Go to login page' link based on whether the installation is finished. ```html @if (!installationFinished) { {{ !installationRunning ? 'Install' : 'Installing...' }} } @if (installationFinished) { arrow_forward Go to login page } ``` -------------------------------- ### Quick Start: Default StreamPipes Installation Source: https://github.com/apache/streampipes/blob/dev/installer/compose/README.md Starts the default StreamPipes installation using NATS as the message broker. This is the recommended option for new installations. Ensure Docker and Docker-Compose are installed and running. ```bash docker-compose up -d ``` -------------------------------- ### Conditional Rendering for Initial User Setup Source: https://github.com/apache/streampipes/blob/dev/ui/src/app/login/components/setup/setup.component.html Displays the email and password fields for initial user creation only when the installation is not running. ```html @if (!installationRunning) { ### Initial User Email Password Also install available data streams, processors and sinks. } ``` -------------------------------- ### Start StreamPipes with Kafka Source: https://github.com/apache/streampipes/blob/dev/installer/compose/README.md Starts the StreamPipes installation using Kafka as the message broker. This option is available if you previously relied on Kafka. ```bash docker-compose -f docker-compose.kafka.yml up -d ``` -------------------------------- ### Install StreamPipes Go Client (Development State) Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-go/docs/content/en/docs/getting-started/first-steps.md Install the current development state of the StreamPipes Go client library from GitHub. This is an alternative to the general repository installation. ```shell go get https://github.com/apache/streampipes/streampipes-client-go ``` -------------------------------- ### Start Services Source: https://github.com/apache/streampipes/blob/dev/installer/cli/README.md Start existing StreamPipes containers, such as all JVM extensions. ```bash streampipes start extensions-all-jvm ``` -------------------------------- ### Start StreamPipes with Docker Compose Source: https://github.com/apache/streampipes/blob/dev/README.md Command to start StreamPipes using Docker Compose, rebuilding images if necessary. This is the recommended method for quick setup. ```bash docker-compose up --build -d ``` -------------------------------- ### Install All Dependencies with Poetry Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-python/DEVELOPMENT.md Installs development dependencies along with documentation, stubs, and deployment dependencies. ```bash poetry install --with dev,docs,stubs,deployment ``` -------------------------------- ### Install Tutorial Dependencies Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-python/docs/tutorials/4-using-online-machine-learning-on-a-streampipes-data-stream.ipynb Install the River library for online machine learning and other required StreamPipes dependencies using pip. ```python # you can install all required dependencies for this tutorial by executing the following command %pip install river streampipes graphviz ``` -------------------------------- ### Start StreamPipes Environment Source: https://github.com/apache/streampipes/blob/dev/installer/cli/README.md Creates and starts the StreamPipes container environment based on the selected template. Use '-d' to run in detached mode. The '--no-ports' flag can be used to avoid mapping ports, except for the UI port, for production-like setups. ```bash streampipes up -d ``` ```bash # start in production mode with unmapped ports streampipes up -d --no-ports ``` -------------------------------- ### Verify Go Installation Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-go/docs/content/en/docs/getting-started/first-steps.md Check if the Go programming language environment is installed on your system. ```shell go version ``` -------------------------------- ### Start a StreamPipes Adapter Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-go/docs/content/en/docs/tutorials/ManageAdapter.md Starts a specific StreamPipes adapter by its ID. ```go err := streamPipesClient.Adapter().StartSingleAdapter("adapterId") ``` -------------------------------- ### Conditional Rendering for Installation Progress Source: https://github.com/apache/streampipes/blob/dev/ui/src/app/login/components/setup/setup.component.html Displays installation progress messages, including task titles and success/error status, when the installation is running. ```html @if (installationRunning) { @for (msg of installationResults; track msg) { #### {{ msg.notifications[0].title }} @if (msg.success) { done } @if (!msg.success) { error } } @if (nextTaskTitle !== '') { #### {{ nextTaskTitle }} @if (loading) { } } } ``` -------------------------------- ### Start Minimal StreamPipes with NATS Authentication Source: https://github.com/apache/streampipes/blob/dev/installer/compose/README.md Enables token-based NATS authentication for the minimal StreamPipes installation. Configure the NATS token in the .env file before running this command. ```bash docker-compose -f docker-compose.minimal.yml -f docker-compose.minimal.nats-auth.yml up -d ``` -------------------------------- ### Install StreamPipes Python Client Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-python/docs/tutorials/2-extracting-data-from-the-streampipes-data-lake.ipynb Install the necessary libraries for the StreamPipes Python client. This command should be executed in your environment. ```bash %pip install matplotlib streampipes ``` -------------------------------- ### Start a StreamPipes Adapter Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-go/docs/content/en/docs/tutorials/ManageAdapter.md Starts a specific StreamPipes adapter identified by its ID. ```APIDOC ## POST /adapters/{adapterId}/start ### Description Starts a specific StreamPipes adapter identified by its ID. ### Method POST ### Endpoint /adapters/{adapterId}/start ### Parameters #### Path Parameters - **adapterId** (string) - Required - The ID of the adapter to start. ### Response #### Success Response (200) - **Success** (boolean) - Indicates if the adapter was started successfully. #### Response Example ```json { "example": "{\"success\": true}" } ``` ``` -------------------------------- ### Install Required Libraries Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-python/docs/tutorials/3-getting-live-data-from-the-streampipes-data-stream.ipynb Install the streampipes client library along with matplotlib and ipython for data visualization and interactive use within the tutorial. ```python # You can install all required libraries for this tutorial with the following command %pip install matplotlib ipython streampipes ``` -------------------------------- ### Input Event Stream 1 Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-filters-jvm/src/main/resources/org.apache.streampipes.processors.filters.jvm.enrich/documentation.md Example of an input event for the first stream. ```json { "deviceId": "sensor01", "temperature": 25.5, "timestamp": 1586380104915 } ``` -------------------------------- ### Input Event Stream 2 Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-filters-jvm/src/main/resources/org.apache.streampipes.processors.filters.jvm.enrich/documentation.md Example of an input event for the second stream. ```json { "location": "room1", "humidity": 45.2, "timestamp": 1586380104915 } ``` -------------------------------- ### Output Event Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-filters-jvm/src/main/resources/org.apache.streampipes.processors.filters.jvm.enrich/documentation.md Example of the output event after merging and enriching with selected fields. ```json { "deviceId": "sensor01", "temperature": 25.5, "location": "room1", "humidity": 45.2 } ``` -------------------------------- ### Install Development Dependencies with Poetry Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-python/DEVELOPMENT.md Installs all required dependencies for development, including optional groups like docs, stubs, and deployment. ```bash poetry install --with dev ``` -------------------------------- ### Input Event Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-enricher-jvm/src/main/resources/org.apache.streampipes.processors.enricher.jvm.processor.limitsalert/documentation.md An example of an input event that includes sensor values and their corresponding limits. ```json { "timestamp": 1627891234000, "sensorValue": 105.0, "upperControlLimit": 100.0, "upperWarningLimit": 90.0, "lowerWarningLimit": 10.0, "lowerControlLimit": 0.0 } ``` -------------------------------- ### Output Event Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-enricher-jvm/src/main/resources/org.apache.streampipes.processors.enricher.jvm.processor.math.staticmathop/documentation.md An example of an output event after the Static Math Operation has been applied. ```json { "temperature": 51.0, "timestamp": 1586380105115 } ``` -------------------------------- ### Input Event Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/resources/org.apache.streampipes.processors.transformation.jvm.duration-value/documentation.md An example of an input event with two timestamp fields ('startTime' and 'endTime') and other relevant data. ```json { "deviceId": "machine01", "startTime": 1586380104915, "endTime": 1586380105915, "operation": "process1" } ``` -------------------------------- ### Input Event Example 2 Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-filters-jvm/src/main/resources/org.apache.streampipes.processors.filters.jvm.merge/documentation.md Example of an input event from the second stream, including location, humidity, and timestamp. ```json { "location": "room1", "humidity": 45, "timestamp": 1586380105015 } ``` -------------------------------- ### Output Events Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-filters-jvm/src/main/resources/org.apache.streampipes.processors.filters.jvm.schema/documentation.md Example output events after processing. Both events are forwarded as they share the same schema. ```json { "temperature": 25.5, "humidity": 60, "timestamp": 1586380104915 } ``` ```json { "temperature": 26.0, "humidity": 65, "timestamp": 1586380105015 } ``` -------------------------------- ### Output Event Example (MD5) Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/resources/org.apache.streampipes.processors.transformation.jvm.fieldhasher/documentation.md An example of an output event after applying the MD5 hash function to the 'user' field. ```json { "timestamp": 1617183834000, "sensorId": "sensor123", "value": 42.5, "user": "e87f955d3b3499b8b13e901fd61b6b64" } ``` -------------------------------- ### Example Input Event Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-filters-siddhi/src/main/resources/org.apache.streampipes.processors.siddhi.topk/documentation.md An example of an input event structure for the Top K Analysis processor. ```json { "device_id": "device1", "measurement": "temperature", "value": 25.5, "occurrences": 15, "timestamp": 1586380105115 } ``` -------------------------------- ### Output Event Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/resources/org.apache.streampipes.processors.transformation.jvm.processor.staticmetadata/documentation.md An example of an output event after being processed by the Static Metadata Enricher with the specified configuration. ```json { "deviceId": "sensor01", "temperature": 23.5, "humidity": 45.2, "location": "Building A" } ``` -------------------------------- ### Install Pre-commit Hook Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-python/DEVELOPMENT.md Installs the pre-commit hook to ensure code style, linting, and type hints are applied before each commit. ```bash poetry run pre-commit install ``` -------------------------------- ### Input Event Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/resources/org.apache.streampipes.processors.transformation.jvm.taskduration/documentation.md An example of an input event for the Task Duration processor, containing device ID, timestamp, and task state. ```json { "deviceId": "machine01", "timestamp": 1586380104915, "taskState": "running" } ``` -------------------------------- ### Start Individual Services Source: https://github.com/apache/streampipes/blob/dev/installer/cli/README.md Start specific services from a template, like Kafka and CouchDB, by listing their names. Ensure service names match your current `.spenv` environment. ```bash streampipes up -d kafka couchdb ``` -------------------------------- ### Input Event Stream Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/resources/org.apache.streampipes.processors.transformation.jvm.booloperator.timekeeping/documentation.md An example of the JSON structure for input events, including device ID, timestamp, and boolean signals for start and end. ```json [ { "deviceId": "machine01", "timestamp": 1586380104915, "startSignal": false, "endSignal": false }, { "deviceId": "machine01", "timestamp": 1586380105015, "startSignal": true, "endSignal": false }, { "deviceId": "machine01", "timestamp": 1586380105115, "startSignal": true, "endSignal": true } ] ``` -------------------------------- ### Start Minikube with Host Volume Mount Source: https://github.com/apache/streampipes/blob/dev/installer/k8s/README.md Starts a Minikube instance with a specified memory and CPU allocation, and mounts a host directory for persistent storage. This is recommended for local testing. ```bash minikube start --mount-string ${HOME}/streampipes-k8s:/streampipes-k8s --mount --memory=4g --cpus=4 ``` -------------------------------- ### Stop Minimal StreamPipes Installation Source: https://github.com/apache/streampipes/blob/dev/installer/compose/README.md Stops all running StreamPipes containers for the minimal setup. ```bash docker-compose -f docker-compose.minimal.yml down ``` -------------------------------- ### Stop Kafka-based StreamPipes Installation Source: https://github.com/apache/streampipes/blob/dev/installer/compose/README.md Stops all running StreamPipes containers for the Kafka-based setup. ```bash docker-compose -f docker-compose.kafka.yml down ``` -------------------------------- ### Run Hugo Server Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-go/docs/README.md Starts the local Hugo server for building the documentation site. Access the site at http://localhost:1313. ```bash hugo server ``` -------------------------------- ### Start StreamPipes with NATS Authentication Source: https://github.com/apache/streampipes/blob/dev/installer/compose/README.md Enables token-based NATS authentication for the default StreamPipes installation. Configure the NATS token in the .env file before running this command. ```bash docker-compose -f docker-compose.yml -f docker-compose.nats-auth.yml up -d ``` -------------------------------- ### Install Development Dependencies with Poetry Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-python/docs/getting-started/developing.md Installs all dependencies required for development, including stubs and documentation tools. Use this command to set up your environment for contributing to the project. ```bash poetry install --with dev,stubs ``` ```bash poetry install --with docs ``` ```bash poetry install --with dev,stubs,docs ``` -------------------------------- ### Stop Default StreamPipes Installation Source: https://github.com/apache/streampipes/blob/dev/installer/compose/README.md Stops all running StreamPipes containers for the default NATS-based setup. Use the -v flag to remove associated data volumes. ```bash docker-compose down ``` ```bash docker-compose down -v ``` -------------------------------- ### Install StreamPipes Go Library (Latest Development) Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-go/docs/content/en/docs/getting-started/first-steps.md Install the latest development version of the StreamPipes Go library from GitHub. Ensure you have Go 1.21 or above. ```shell go get https://github.com/apache/streampipes ``` -------------------------------- ### PLC Address Pattern Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-connectors-plc/src/main/resources/org.apache.streampipes.connect.iiot.adapters.plc4x.generic/documentation.md Defines the syntax for specifying PLC tags, including memory area, start address, data type, and optional array size. This pattern is crucial for reading specific data points from a PLC. ```plaintext propertyName=%{Memory-Area}{start-address}:{Data-Type}[{array-size}] temperature=%I0.0:INT ``` -------------------------------- ### Configure and Connect StreamPipes Client Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-python/docs/tutorials/5-applying-interoperable-machine-learning-in-streampipes.ipynb Sets up environment variables for broker host and port, then configures and initializes the StreamPipes client with API key credentials and connection details. ```python import os from streampipes.client import StreamPipesClient from streampipes.client.config import StreamPipesClientConfig from streampipes.client.credential_provider import StreamPipesApiKeyCredentials os.environ["BROKER-HOST"] = "localhost" os.environ["KAFKA-PORT"] = "9094" # When using Kafka as message broker config = StreamPipesClientConfig( credential_provider=StreamPipesApiKeyCredentials( username="admin@streampipes.apache.org", api_key="TOKEN", ), host_address="localhost", https_disabled=True, port=80 ) client = StreamPipesClient(client_config=config) ``` -------------------------------- ### Instantiate and Register ExampleFunction Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-python/docs/tutorials/3-getting-live-data-from-the-streampipes-data-stream.ipynb Create an instance of a custom function, defining its ID and the streams it consumes. Register the function with a Registration object and initialize the FunctionHandler to start processing. ```python example_function = ExampleFunction( FunctionDefinition( function_id=FunctionId(id="example-function"), consumed_streams=["urn:streampipes.apache.org:eventstream:uPDKLI"] ) ) registration = Registration() registration.register(example_function) function_handler = FunctionHandler(registration, client) function_handler.initializeFunctions() ``` -------------------------------- ### Install StreamPipes Python Library Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-python/docs/getting-started/first-steps.md Install the StreamPipes Python library using pip. This command installs the latest stable version. ```bash pip install streampipes ``` -------------------------------- ### Output Event Example (Both Edges, Last Event) Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/resources/org.apache.streampipes.processors.transformation.jvm.processor.booloperator.edge/documentation.md Example output event when configured for detecting both edges (rising and falling) and forwarding only the last event after a delay of 1 event. ```json { "deviceId": "sensor01", "isActive": true, "timestamp": 1586380105115 } ``` -------------------------------- ### Build Platform Services Library Source: https://github.com/apache/streampipes/blob/dev/ui/projects/streampipes/platform-services/README.md Build the platform-services library. The output will be stored in the dist/ directory. ```bash ng build platform-services ``` -------------------------------- ### Initialize StreamPipes Go Client Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-go/docs/content/en/docs/getting-started/quickstart.md Initializes the StreamPipes client with the provided configuration. Ensure logging is set up to capture any initialization errors. ```go streamPipesClient, err := streampipes.NewStreamPipesClient(clientConfig) if err != nil { log.Fatal(err) // Ensure that logging is correctly set up to capture errors } ``` -------------------------------- ### Input Event Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/resources/org.apache.streampipes.processors.transformation.jvm.fieldhasher/documentation.md An example of an input event processed by the Field Hasher. ```json { "timestamp": 1617183834000, "sensorId": "sensor123", "value": 42.5, "user": "john.doe@example.com" } ``` -------------------------------- ### Rate Limit Processor Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-filters-jvm/src/main/resources/org.apache.streampipes.processors.filters.jvm.limit/documentation.md Demonstrates input, configuration, and output for the Rate Limit processor using a time window and 'last' event selection. This configuration samples the last event within each 1000ms window. ```json { "deviceId": "sensor01", "temperature": 25.5, "timestamp": 1586380104915 } { "deviceId": "sensor01", "temperature": 26.0, "timestamp": 1586380105015 } { "deviceId": "sensor01", "temperature": 25.8, "timestamp": 1586380105115 } ``` ```json { "deviceId": "sensor01", "temperature": 25.8, "timestamp": 1586380105115 } ``` -------------------------------- ### Input Event Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/resources/org.apache.streampipes.processors.transformation.jvm.count-array/documentation.md An example of an input event with an array field 'measurements'. ```json { "deviceId": "sensor01", "measurements": [23.5, 24.1, 25.3, 24.8], "timestamp": 1586380104915 } ``` -------------------------------- ### Initialize StreamPipes client instance Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-python/docs/tutorials/1-introduction-to-streampipes-python-client.ipynb Create an instance of the StreamPipes client using the previously configured client configuration. ```python client = StreamPipesClient(client_config=config) ``` -------------------------------- ### NATS Example Subject Source: https://github.com/apache/streampipes/blob/dev/streampipes-nats-extensions/README.md An example of a base NATS subject used in StreamPipes extensions. ```text sp.extensions.request.a1B2c3 ``` -------------------------------- ### Configure and Initialize StreamPipes Client Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-python/README.md Configure the StreamPipes client with API key credentials, host address, and port. Then, initialize the client to connect to the StreamPipes instance. ```python from streampipes.client import StreamPipesClient from streampipes.client.config import StreamPipesClientConfig from streampipes.client.credential_provider import StreamPipesApiKeyCredentials config = StreamPipesClientConfig( credential_provider = StreamPipesApiKeyCredentials( username = "test@streampipes.apache.org", api_key = "DEMO-KEY", ), host_address = "localhost", https_disabled = True, port = 80 ) client = StreamPipesClient(client_config=config) client.describe() ``` -------------------------------- ### Input Event Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/resources/org.apache.streampipes.processors.transformation.jvm.processor.staticmetadata/documentation.md An example of an input event that can be processed by the Static Metadata Enricher. ```json { "deviceId": "sensor01", "temperature": 23.5, "humidity": 45.2 } ``` -------------------------------- ### Utility Helper Example Source: https://github.com/apache/streampipes/blob/dev/ui/src/app/connect/dialog/transformation-script-documentation/transformation-script-documentation-dialog.component.html Demonstrates the usage of globally available utility functions through the `utils` object. ```javascript utils.isNumber(event.value) ``` -------------------------------- ### List Available StreamPipes Environment Templates Source: https://github.com/apache/streampipes/blob/dev/installer/cli/README.md Lists all available environment templates for StreamPipes. Use this to see which pre-configured setups you can choose from. ```bash streampipes env --list ``` -------------------------------- ### Start Added Pipeline Element Source: https://github.com/apache/streampipes/blob/dev/installer/cli/README.md Start a newly added pipeline element using the `streampipes up` command. The service name must match the directory name under `deploy/standalone/`. ```bash streampipes up -d my-processor ``` -------------------------------- ### Output Event Example (Rising Edge, First Event) Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/resources/org.apache.streampipes.processors.transformation.jvm.processor.booloperator.edge/documentation.md Example output event when configured for rising edge detection (FALSE -> TRUE) and forwarding only the first event after the edge. ```json { "deviceId": "sensor01", "isActive": true, "timestamp": 1586380105015 } ``` -------------------------------- ### Input Event Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-enricher-jvm/src/main/resources/org.apache.streampipes.processors.enricher.jvm.processor.math.staticmathop/documentation.md An example of an input event processed by the Static Math Operation. ```json { "temperature": 25.5, "timestamp": 1586380105115 } ``` -------------------------------- ### Build and Preview Local Documentation Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-python/docs/getting-started/developing.md Builds the local version of the documentation using MkDocs Material. This command allows you to preview changes before committing them. ```bash make livedoc ``` -------------------------------- ### Input Event Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-enricher-jvm/src/main/resources/org.apache.streampipes.processors.enricher.jvm.processor.math.mathop/documentation.md An example of an input event processed by the Math Operation processor. ```json { "temperature": 25.5, "humidity": 60, "timestamp": 1586380105115 } ``` -------------------------------- ### StreamPipes CLI Commands Overview Source: https://github.com/apache/streampipes/blob/dev/installer/cli/README.md Provides a summary of all available StreamPipes CLI commands and their options. Run 'streampipes COMMAND --help' for detailed information on a specific command. ```bash StreamPipes CLI - Manage your StreamPipes environment with ease Usage: streampipes COMMAND [OPTIONS] Options: --help, -h show help --version, -v show version Commands: add Add new StreamPipes service (e.g., adapter, processor, sink) clean Remove StreamPipes data volumes, dangling images and network down Stop and remove StreamPipes containers env Inspect and select StreamPipes environments info Get information logs Get container logs for specific container ps List all StreamPipes container for running environment pull Download latest images from Dockerhub restart Restart StreamPipes container start Start StreamPipes container stop Stop StreamPipes container up Create and start StreamPipes container environment Run 'streampipes COMMAND --help' for more info on a command. ``` -------------------------------- ### Input Event Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/resources/org.apache.streampipes.processors.transformation.jvm.transform-to-boolean/documentation.md An example of an input event with string and number fields that can be transformed into booleans. ```json { "deviceId": "sensor01", "status": "true", "value": 1, "timestamp": 1586380104915 } ``` -------------------------------- ### Configure StreamPipes Client Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-python/docs/tutorials/3-getting-live-data-from-the-streampipes-data-stream.ipynb Sets up the StreamPipes client configuration, including credentials and connection details. Ensure environment variables for broker host and port are set if working locally. ```python import os os.environ["BROKER-HOST"] = "localhost" os.environ["KAFKA-PORT"] = "9094" ``` ```python from streampipes.client import StreamPipesClient from streampipes.client.config import StreamPipesClientConfig from streampipes.client.credentials import StreamPipesApiKeyCredentials client_config = StreamPipesClientConfig( credential_provider=StreamPipesApiKeyCredentials(), host_address="localhost", port=80, https_disabled=True, ) client = StreamPipesClient(client_config=client_config) ``` -------------------------------- ### Input Event Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/resources/org.apache.streampipes.processors.transformation.jvm.processor.stringoperator.state/documentation.md An example of an input event structure processed by the String To State processor. ```json { "deviceId": "sensor01", "status": "running", "mode": "normal" } ``` -------------------------------- ### Compose Processor Input and Output Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-filters-jvm/src/main/resources/org.apache.streampipes.processors.filters.jvm.compose/documentation.md Demonstrates the input events from two streams, the configuration for output fields, and the resulting merged output event. This is useful for understanding how the Compose processor combines data from different sources. ```json { "deviceId": "sensor01", "temperature": 25.5, "timestamp": 1586380104915 } ``` ```json { "location": "room1", "humidity": 45.2, "timestamp": 1586380104915 } ``` ```json { "deviceId": "sensor01", "temperature": 25.5, "location": "room1", "humidity": 45.2 } ``` -------------------------------- ### Input Event Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/resources/org.apache.streampipes.processors.transformation.jvm.changed-value/documentation.md Example of an input event stream processed by the Value Changed processor. ```json { "deviceId": "sensor01", "location": "l1", "value": 12, "timestamp": 1586380104915 } ``` ```json { "deviceId": "sensor01", "location": "l1", "value": 15, "timestamp": 1586380105015 } ``` -------------------------------- ### Input Event Example Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/resources/org.apache.streampipes.processors.transformation.jvm.csvmetadata/documentation.md An example of an input event structure processed by the CSV Metadata Enricher. ```json { "deviceId": "sensor01", "temperature": 23.5, "timestamp": 1586380104915 } ``` -------------------------------- ### Start StreamPipes with Kafka Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-python/docs/getting-started/first-steps.md Start a StreamPipes instance using Docker Compose with Kafka as the message broker. Ensure the Kafka environment and port configurations are correctly set in your docker-compose.yml file. ```bash docker-compose -f docker-compose.yml up -d ``` -------------------------------- ### Initialize StreamPipes Client Config Directly Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-go/docs/content/en/docs/reference/parameter-reference.md Use direct struct initialization to set up the StreamPipes client configuration, including URL and API key credentials. ```go clientConfig := config.StreamPipesClientConfig{ Url: "http://localhost:8030", Credential: config.StreamPipesApiKeyCredentials{ UserName: "", ApiKey: "", }, } ``` -------------------------------- ### Example Output Event Source: https://github.com/apache/streampipes/blob/dev/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.latlong.processor.revgeocoder.geocityname/documentation.md An example of the output event structure containing the determined city name. ```json { 'geoname': 'Colombo' } ``` -------------------------------- ### Publish Platform Services Library Source: https://github.com/apache/streampipes/blob/dev/ui/projects/streampipes/platform-services/README.md After building, navigate to the dist/platform-services directory and publish the library using npm. ```bash cd dist/platform-services npm publish ``` -------------------------------- ### Initialize StreamPipes Client with Environment Variables Source: https://github.com/apache/streampipes/blob/dev/streampipes-client-python/docs/getting-started/quickstart.md Demonstrates how to initialize the StreamPipes client using API key credentials provided via environment variables. This method requires setting SP_API_KEY and SP_USERNAME. ```python from streampipes.client.credential_provider import StreamPipesApiKeyCredentials StreamPipesApiKeyCredentials() ```