# Extend Analytics Builder with custom blocks

**URL:** <https://community.cumulocity.com/t/extend-analytics-builder-with-custom-blocks/14108>\
**Category:** Knowledge Base\
**Tags:** analytics, Streaming-Analytics-Apama, analytics-builder, streaming-analytics\
**Created:** [January 13, 2026, 8:27am UTC](https://community.cumulocity.com/t/extend-analytics-builder-with-custom-blocks/14108 "2026-01-13T08:27:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vachaspati\_Diwevedi2](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/vachaspati_diwevedi2/32/1256_2.png) [@Vachaspati\_Diwevedi2](https://community.cumulocity.com/u/Vachaspati_Diwevedi2)\
**Post date:** [January 13, 2026, 8:27am UTC](https://community.cumulocity.com/t/extend-analytics-builder-with-custom-blocks/14108/1 "2026-01-13T08:27:32Z")

</div>

Cumulocity offers real-time analytics through its no-code **Analytics Builder**. It includes several prebuilt, out-of-the-box blocks that allow you to design analytics models using a simple drag-and-drop interface. However, in cases where your specific logic is not supported by the existing blocks, Cumulocity enables you to extend Analytics Builder by creating your own custom blocks.

This article explains the different ways of developing custom Analytics Builder blocks.

## Prerequisites

- ✅ A Cumulocity tenant with Streaming Analytics service subscribed

- ✅ A laptop with Docker installed (latest version)

- ✅ Visual Studio Code IDE

- ✅ Understanding of Apama EPL, Python, and JavaScript

- ✅ Clone your Streaming Analytics app and install this community plugin - [Analytics Builder Management](https://github.com/Cumulocity-IoT/cumulocity-analytics-management) that will help manage your custom blocks using a user-friendly interface

## Custom Block Development

1. Clone this Git repository into a folder - [Cumulocity Analytics Builder Block](https://github.com/mjj29/c8y-analytics-blocks)

2. Open VS Code and create a dev container using the folder where the above repository has been cloned  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/optimized/3X/4/b/4b08da2f59ee32972ef88d7c0973b53161a9df94_2_690x43.png)

3. Create a folder with any name (e.g., `custom_blocks`) and a subfolder within that folder with your block name (e.g., `NormBlock`)  

4. Add either an EPL monitor file (`NormBlock.mon`), a Python monitor file, or a Smart Function monitor file with your custom logic

## Build Your Custom Block

Run this command:

```bash
/apama-analytics-builder-block-sdk/analytics_builder build extension --input <directory of your custom block> --output <File Name of your custom block>

/apama-analytics-builder-block-sdk/analytics_builder build extension --input ./blocks/custom_block/NormBlock --output ./NormBlock.zip

/apama-analytics-builder-block-sdk/analytics_builder build extension --input ./blocks/custom_block/SmartFunction/ --output ./SmartFunction.zip

```

![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/d/9/d9f7a13765cfe7883eae611d988972f7a9cbf98b.png)

## Deploy Your Custom Block

### Option 1: Command Line Deployment

Run the below command to deploy your custom block:

```bash
analytics_builder upload extension --input NormBlock.zip --cumulocity_url https://lora-sandbox.eu-latest.cumulocity.com --username <Your tenant User Name> --password <password> --restart --ignoreVersion

```

### Option 2: UI-Based Deployment

1. Use the built **“NormBlock.zip”** file and follow these steps in your custom Streaming Analytics application where the **Analytics Builder Management** plugin is installed.

2. Download the ZIP file using the Docker command below:

3. Go to **Streaming Analytics → Ecosystem → Analytics Extension**.  

4. Click **Manage Extension → Add Extension**.  

5. Select and upload your ZIP file.  

6. Click **Restart to deploy extension**.  

7. After Apama restarts successfully, you can verify your extension under the **Installed Blocks** tab.  

## Conclusion & Next Steps

✨ By the end of this article, you should be able to create your own custom Analytics Builder block and deploy it in your tenant.

**Next Steps:**

- 🔍 Explore the Python or JavaScript logic used inside custom blocks
- 🚀 Set up CI/CD pipelines for deployment across multiple tenants

## References

- [Repo: c8y-analytics-blocks](https://github.com/mjj29/c8y-analytics-blocks)
- [Repo: c8y-analytics-management](https://github.com/Cumulocity-IoT/cumulocity-analytics-management)
- [CI-CD: c8y-cli-tools](https://community.cumulocity.com/t/manage-cumulocity-streaming-analytics-from-the-command-line/14188)
