Data Connectors
Connect to external data sources using data integration features
What is Data Integration?
Data Integration is a feature that enables you to connect external databases and SaaS services to your Squadbase project, allowing Squadbase AI to access and utilize your data.
Key Features
- Rich Data Sources: Support for Databases, SaaS, AI, Object Storage, and Vector Databases
- Easy Connection Setup: Simple GUI-based data source configuration
- AI Integration: Squadbase AI automatically accesses and analyzes data
- Secure Authentication: Safe management of credentials via environment variables
What You Can Do
- Data Retrieval: Fetch data from databases using SQL queries
- Data Analysis: AI analyzes data and provides insights
- Application Development: Build applications using retrieved data
- External API Integration: Connect with SaaS service APIs
How to Access
- Open Editor: Project details screen > "Open Editor" button
- Click Data Tab: The third tab in the center of the top navigation
- Select Connections Tab: Displayed by default
Setting Up Data Connections
Basic Steps
Step 1: Open the Data Tab
- Open the Editor
- Click the "Data" tab in the center of the top navigation
Step 2: Select a Data Source
The Connections tab displays data sources organized by category:
- Database: Database connections
- SaaS: SaaS service integrations
- AI: AI service integrations
- Object Storage: Object storage services
- Vector Database: Vector database services
Click the button for the data source you want to connect.
Step 3: Connection Setup Dialog
Clicking a data source button opens the connection setup dialog.
Dialog Contents:
- Data Source Name: e.g., "BigQuery"
- Description: "Configure BigQuery connection by setting the required environment variables."
- Required Environment Variables: e.g.,
GOOGLE_SERVICE_ACCOUNT_JSON(Required) - Input Fields: Enter environment variable values
- Outbound IPs: List of IP addresses for connections from Squadbase
- Setup Connection Button: Configure the connection
Step 4: Enter Environment Variables
Enter the required environment variables.
Example (BigQuery):
GOOGLE_SERVICE_ACCOUNT_JSON: Google Cloud service account authentication JSON
Input Method:
- Paste credentials into the text box
- Toggle visibility with the "Show password" button
Step 5: Confirm Outbound IPs
Review the "Outbound IPs" displayed at the bottom of the dialog.
Important: Add these IP addresses to the allowlist (IP whitelist) of your target database or API.
Step 6: Establish Connection
Click the "Setup Connection" button.
Processing:
- Environment variables are saved to the project
- Data connector is configured
- Squadbase AI gains access to the data source
Available Data Sources
Database
Snowflake
- Cloud data warehouse
- Ideal for large-scale data analysis
BigQuery
- Google Cloud's data warehouse BigQuery
- Connect via service account authentication
- Required environment variable:
GOOGLE_SERVICE_ACCOUNT_JSON
MySQL
- Open-source relational database
- Widely used in web applications
PostgreSQL
- Advanced open-source database
- Supports complex queries
SaaS
Hubspot
- Marketing automation and CRM
- Access customer data and contact information
Attio
- Next-generation CRM platform
- Leverage customer relationship management data
Stripe
- Payment platform
- Access payment data and customer information
Slack
- Team communication tool
- Access messages and channel information
AI
OpenAI
- AI models including ChatGPT and GPT-4
- Use for text generation and analysis
Anthropic
- Claude AI model
- Advanced conversation and analysis capabilities
Google AI (Gemini)
- Google's Gemini AI model
- Multimodal AI functionality
Object Storage
AWS S3
- Amazon Web Services S3 storage
- Use for file storage and retrieval
Vector Database
Pinecone
- Vector search database
- Leverage for machine learning and semantic search
Managing Environment Variables
Environment Variables Tab
You can manage environment variables in the Data tab > Environment Variables tab.
Screen Layout
Display Contents:
- Environment Description: "This sandbox uses environment variables configured for the Production environment."
- Outbound IPs: IP addresses for connections from Squadbase
- Environment Variable List: Currently configured environment variables
- Add Button: Add new environment variables
- Save Changes Button: Save modifications
Adding Environment Variables
- Click the "Add" button
- VARIABLE_NAME: Enter variable name (e.g.,
DATABASE_URL) - Value: Enter variable value
- Click "Save Changes"
Editing Environment Variables
- Click the Value field of an existing environment variable
- Edit the value
- Click "Save Changes"
Deleting Environment Variables
- Click the delete button on the right side of the environment variable
- Click "Save Changes"
Security
Masked Display: Environment variable values are masked as ••••••••. They are hidden by default for security.
Toggle Visibility: Use the "Show password" button next to each environment variable to toggle visibility.
IP Allowlist Configuration
Location
Settings > Database > IP Allowlist
Function
Manage IP addresses that are allowed to connect to your database instances.
Scope: Applied to all database instances across your organization.
Screen Layout
Display Contents:
- Description: "Manage IP addresses that are allowed to connect to your Squadbase database instances."
- IP Address List:
- Squadbase outbound IPs (automatically added, non-editable)
- Custom IP addresses (user-added)
- Add Button: Add new IP addresses
- Save Button: Save changes
Adding IP Addresses
- Enter the new IP address in the text box
- Click the "Add" button
- Click the "Save" button
Deleting IP Addresses
- Click the delete button on the right side of the IP address
- Click the "Save" button
Automatically Added IP Addresses
Squadbase outbound IP addresses are automatically added.
Utilizing Data with AI
Once you connect a data source, Squadbase AI can automatically access your data.
How to Use
Step 1: Connect Data Source in Editor
Configure the connection in Data tab > Connections.
Step 2: Request to Squadbase AI
Enter your request in the "Ask Squadbase AI" text box at the bottom of the Editor.
Examples (BigQuery):
- "Retrieve user count from BigQuery"
- "Analyze sales data and show me the trends"
- "Display table list"
Step 3: AI Retrieves and Analyzes Data
Squadbase AI performs the following:
- Connects to the data source
- Generates appropriate queries
- Retrieves data
- Displays analysis results
Use Cases
1. Data Retrieval
Request: "Retrieve order data from the past 30 days from BigQuery"
AI Actions:
- Generates SQL query
- Connects to BigQuery and executes query
- Displays results in table format
2. Data Analysis
Request: "Analyze sales data trends and visualize with a graph"
AI Actions:
- Retrieves data
- Analyzes trends
- Generates graph creation code
- Implements in application
3. Application Development
Request: "Create a dashboard using BigQuery data"
AI Actions:
- Identifies necessary data from data source
- Designs UI/UX
- Generates code
- Preview for review
Tips & Frequently Asked Questions
Q: Data connection is failing
A: Please check the following:
- Are environment variables configured correctly?
- Are Outbound IPs added to the database's allowlist?
- Are credentials (API keys, service accounts, etc.) correct?
- Is the database running?
Q: Where can I set environment variables?
A: There are two methods:
- Editor > Data > Environment Variables tab (Recommended)
- Settings > Environments > [Environment Name] > Environment Variables
Q: I want to connect to different databases for different environments (Production and Preview)
A: You can configure environment variables per environment in Settings > Environments. The Editor > Data tab uses the environment variables for the current environment (typically Production).
Q: Which environment does the data connection use?
A: As shown in the Editor > Data > Environment Variables tab, the Production environment's environment variables are typically used. Configure other environments via Settings > Environments.
Q: Do I need to add Outbound IPs to my database?
A: Yes, to connect from Squadbase to your database, you need to add the Outbound IPs to your database's firewall or allowlist.
Q: Can I connect to databases other than BigQuery?
A: Yes, the following databases are supported:
- Snowflake
- MySQL
- PostgreSQL
- Check the Data > Connections tab for other available data sources
Q: How do I connect to SaaS services (Stripe, Slack, etc.)?
A: The process is the same as for databases:
- Select the service in Data > Connections tab
- Enter required credentials (API keys, etc.)
- Click Setup Connection
Q: Are there concerns about environment variable leaks?
A: Environment variables are protected as follows:
- Masked by default (
•••••••) - Accessible only to project members
- Encrypted via HTTPS communication
- However, proper permission management is important
Q: How should I request AI after connecting data?
A: You can make requests in natural language:
- "Retrieve data from ○○"
- "Tell me the structure of the ○○ table"
- "Analyze ○○ data"
- Squadbase AI generates and executes appropriate queries
Recommended Practices
- Test connection first: Test the connection with simple queries (e.g., "Show table list")
- Separate by environment: Use production data for Production environment, test data for Preview environment
- Set only necessary environment variables: For security, don't configure unused credentials
- Add Outbound IPs in advance: Add to your database's allowlist before connecting
- Let AI handle it: You can request even complex SQL queries in natural language to Squadbase AI
Summary
Using the Data Integration feature, Squadbase AI can leverage data from external databases and SaaS services. Build powerful data-driven applications with simple configuration.
Easily set up connections from the Editor's Data tab, and manage environment variables entirely through the GUI. Securely utilize data with secure authentication and IP restrictions.
If you have any questions, refer to the "Help" or "Documentation" link in the bottom right of the screen for more detailed information.