Marketplace
Learn how to build a Marketplace integration using the Secoda SDK.
To create a Marketplace integration, you'll need to use the Secoda Software Development Kit (SDK). The SDK is a Python-based toolkit that allows for the creation of custom Marketplace integrations. These integrations can be used to add resources and lineage to Secoda.
Check out our webinar on the Secoda SDK here!
To start building with the Secoda SDK, there are a few steps to follow. First, you need to write your Python code. You can use the documentation below or scroll down for a step by step example!
Secoda SDKOnce the code is written, you can upload and connect your integration.
Upload and Connect your Marketplace IntegrationAnd share it!
Publish the IntegrationExample: Step-by-Step Integration Development
In this guide, we'll build an example integration with a data visualization service called Cluvio. By the end, you'll be able to write scripts that can be executed locally and ready to be submitted to Secoda.
Prerequisites
Before you begin, ensure you have:
Python (3.11 or later recommended) installed on your system.
Secoda SDK installed via
pip install --upgrade secodadk
.
Step 1: Set Up Your Development Environment
Create a new directory for your integration project. Inside this directory, create a virtual environment and activate it:
With your virtual environment activated, install the Secoda SDK (and if exists, upgrade to the latest version)
Step 2: Initialize Your Integration Script
Create a new Python file, fake_cluvio_integration.py
, which will contain your integration code.
Step 3: Import SDK Components and define your Integration Class
At the top of your script, import the necessary components from the Secoda SDK:
Extend the SecodaIntegration
class to create your own integration:
Step 4: Implement the Extraction Logic
The extract
method is where the integration interacts with Cluvio's API. We'll authenticate using credentials and then extract data:
Note that:
self.credentials
is a dictionary provided by theSecodaIntegration
base class, allowing you to access user inputs in the integration connect form.We use
self.http_post
for HTTP requests. You must use ourself.http_{method}
for HTTP requests. Other library likerequests
orhttpx
will not work.self.http_{method}
returns ahttpx.Response
instance.
With the data obtained from Cluvio, you can now declare resources (e.g., dashboards) via self.declare_resource
See Secoda Fields Explained for more information on the fields of Resource
.
Lineage between resources is also crucial for understanding the relationship and flow of data. This is declared via the self.declare_lineage
method. Lineage can be between resources from the same source.
Lineage can also flow from an existing resource in the workspace, to a resource brought in from the custom integration.
Step 5: Testing Locally
To ensure that your integration works as expected, test it on your local machine. Set the credentials in your environment for security:
Run your script with the environment variables set to your Cluvio credentials:
Step 6: Finalize Your Integration for Upload
Once you've tested your script and are happy with the results, it's time to Upload and Connect your Custom Integration.
For the full code of this integration, see here.
Last updated