Connecting to Data
Building data-driven apps in Kelp starts with connecting to your data sources. Whether you're working with APIs, databases, or real-time streams, this guide will help you set up and manage these connections effectively.
What Data Sources Does Kelp Support?
Kelp can connect to virtually any data source you need:
APIs and Web Services
- REST APIs for standard web services
- GraphQL for flexible data queries
- SOAP for legacy enterprise systems
- Streaming APIs for real-time data
Databases
- PostgreSQL, MySQL, SQL Server, Oracle
- MongoDB for document storage
- Apache Druid for analytics
Key-Value Stores
- Managed stores provisioned within Kelp
- Perfect for caching and session data
Static and Streaming Data
- Static values embedded directly in your app
- Real-time streams via Server-Sent Events (SSE) or Kafka
- Cloud storage like Amazon S3 and Amazon Athena
How Authentication Works
Kelp handles authentication securely through three main methods:
Basic Authentication Use when your data source requires a simple username and password.
API Keys For services that provide tokens you include in headers or URL parameters.
OAuth 2.0 / OpenID Connect The most secure option for accessing user data with proper permissions and scopes.
Understanding Credential Types
Kelp offers three ways to handle credentials, depending on who needs access:
Application Principal You provide the credentials once, and your entire app uses them. Best for shared resources or organization-wide access.
User Principal Each user authenticates with their own credentials. Essential when users need access to their personal data (like their Google Drive files).
Built-in Integrations Kelp manages everything for you. No setup required, though usage charges may apply. You can always replace these with your own credentials later.
Tip: Check your API provider's documentation to see which authentication method they support and recommend.
Setting Up Integration Profiles
An Integration Profile is like a reusable connection template that combines your API settings with credentials. Once created, you can use it across multiple components in your apps.
Creating Your First Integration
Option 1: From Your Workspace
- Navigate to Workspace → Integrations
- Browse preconfigured integrations or create a custom one
- Define your connection settings (base URLs, authentication type)
Option 2: From the App Editor
- Open your app in the editor
- Click App Integrations in the toolbar
- Add or configure integrations directly
Adding Secure Credentials
Your credentials are stored safely in Kelp's backend vault—they're never exposed in your app's frontend or saved in the visual graph.
- Select your authentication method (Basic Auth, API Key, or OAuth)
- Enter your credentials
- Kelp automatically substitutes them at runtime when making requests
Completing Your Integration Profile
- Choose your integration from the list
- Attach your credentials (existing or newly created)
- Configure any additional parameters your API needs (like OAuth scopes)
- Save your profile
Your Integration Profile is now ready to use with any connector in your apps.
Connecting to APIs
Once your Integration Profile is ready, connecting to APIs is straightforward:
-
Add a Connector: In your app editor, add a Universal HTTP Connector for standard APIs, or choose a specialized connector for services like S3 or Athena.
-
Select Your Profile: In the connector settings, choose the Integration Profile you created.
-
Configure the Details: Complete any API-specific settings like endpoints, parameters, or request methods.
Your connector is now ready to fetch data from your API.
Working with Databases
Kelp makes database connections simple and secure.
Supported Database Types
- PostgreSQL - Popular open-source database
- MySQL - Widely-used relational database
- Microsoft SQL Server - Enterprise database solution
- Oracle - Enterprise-grade database system
- MongoDB - Document-based NoSQL database
- Apache Druid - High-performance analytics database
Setting Up Database Connections
-
Add the Connector: Place a SQL DB connector on your app canvas.
-
Choose Your Profile: Select an Integration Profile configured for your database (most databases use Basic Auth with username and password).
-
Enter Connection Details: Provide your database connection string. Need help? Check our SQL DB Connection String guide for examples.
-
Test Your Connection: Send a simple query to the connector's
query
port to verify everything works.
Using Key-Value Stores
For fast data storage and retrieval, Kelp's managed key-value stores are perfect:
- Add a KV Store component to your app
- Create a new store or select an existing one from your workspace
- Start storing and retrieving data immediately
These stores are automatically provisioned and managed by Kelp, so there's no infrastructure to worry about.
Adding Static Data
Sometimes you need constant values in your app—reference data, configuration settings, or lookup tables. Use Const components like:
- String for text values
- Array for lists of data
- JSON for structured objects
Keep in Mind
- Static data can't be changed while your app is running
- Anyone with access to your app can see this data
- Large amounts of static data can slow down app loading
Best used for: API endpoints, default settings, small reference tables, and configuration values.
Real-Time Streaming Data
For apps that need to respond to data as it happens, Kelp supports real-time streaming:
Server-Sent Events (SSE) Set up just like HTTP connectors, but data flows continuously from the server to your app.
Kafka
Enterprise-grade message streaming for high-volume, real-time data processing. See our dedicated Kafka connection guide for detailed setup instructions.
Streaming connectors enable you to build responsive apps that react instantly to new data, perfect for dashboards, notifications, and live monitoring.
Next Steps
With your data sources connected, you're ready to build powerful, data-driven workflows in Kelp. Your apps can now pull from databases, consume APIs, process streams, and combine data from multiple sources to create rich, interactive experiences.
Ready to start building? Check out our guide on creating your first data workflow.