API Reference

Creating Data Connections

Creating Data Connections

A connection in Spartera is a secure bridge between your data infrastructure
and our intelligent APIs. This guide walks you through the process of
establishing secure, reliable connections to your data sources.

Connection Overview

Connections enable Spartera to:

  • Access your data securely without data movement
  • Execute analytics in your environment
  • Deliver results through our API infrastructure
  • Maintain complete data sovereignty

Step-by-Step Connection Setup

Step 1: Choose Your Storage Engine

Select the data platform where your data is stored:

Amazon Web Services (AWS)

  • Amazon Redshift - Large-scale data warehousing
  • Amazon Redshift Serverless - Serverless data warehousing with
    automatic scaling
  • Amazon Aurora Provisioned (MySQL) - High-performance MySQL-compatible
    database
  • Amazon Aurora Provisioned (PostgreSQL) - High-performance
    PostgreSQL-compatible database
  • Amazon Aurora Serverless - On-demand, auto-scaling relational database
  • Amazon RDS MySQL - Managed MySQL database service

Google Cloud Platform (GCP)

  • Google BigQuery - Serverless analytics and data warehouse
  • Cloud SQL MySQL - Fully managed MySQL database
  • Cloud SQL PostgreSQL - Fully managed PostgreSQL database

Multi-Cloud Platforms

  • Snowflake - Cloud-native data platform
  • Teradata Vantage - Enterprise analytics platform

Database Platforms

  • Microsoft SQL Server - Enterprise database systems
  • Supabase PostgreSQL - Modern application databases
  • Supabase Analytics - Application analytics and event tracking

Step 2: Specify Data Location

Classify your data source location:

Internal Data

  • Data hosted within your organization's infrastructure
  • Direct database connections
  • On-premises or private cloud environments

Third-Party Data

  • External data sources or vendor-provided datasets
  • SaaS platform data
  • Partner or supplier data feeds

Domain Configuration: Provide the domain or endpoint where your data
source is accessible.

Step 3: Name Your Connection

Create a descriptive, unique name for your connection:

Best Practices

  • Use clear, descriptive names (e.g., Sales_Analytics_Warehouse)
  • Include environment indicators (e.g., Production_BigQuery)
  • Follow your organization's naming conventions
  • Avoid special characters and spaces

Step 4: Add Description

Provide a comprehensive description that includes:

  • Data Contents: What type of data is available
  • Update Frequency: How often data is refreshed
  • Business Context: What business processes the data supports
  • Access Notes: Any special considerations for using this connection

Example Description

Production sales data warehouse containing customer transactions,
product information, and sales performance metrics. Updated daily
at 2 AM UTC. Contains 2 years of historical data with real-time
current-day transactions.

Step 5: Upload Credentials

Provide the necessary authentication credentials based on your platform:

Amazon Web Services

Redshift & Redshift Serverless
  • Access Key ID: Your AWS access key identifier
  • Secret Access Key: Corresponding secret key
  • Region: AWS region where resources are located
  • Cluster Identifier: Redshift cluster name (Provisioned) or workgroup
    name (Serverless)
  • Database: Database name
  • IAM Role: Optional - for role-based access
Aurora (MySQL & PostgreSQL) and RDS MySQL
  • Endpoint: Database endpoint hostname
  • Port: Database port (MySQL: 3306, PostgreSQL: 5432)
  • Database: Database name
  • Username: Database username
  • Password: Corresponding password
  • Region: AWS region where database is located
  • Authentication Method:
    • Standard database authentication
    • IAM database authentication (optional)

Google Cloud Platform

BigQuery
  • Service Account Key: JSON key file for service account
  • Project ID: Google Cloud project identifier
  • Dataset: Specific dataset name (if applicable)
Cloud SQL (MySQL & PostgreSQL)
  • Connection Name: Cloud SQL instance connection name (format:
    project:region:instance)
  • Database: Database name
  • Username: Database username
  • Password: Corresponding password
  • Connection Method:
    • Public IP with SSL
    • Cloud SQL Proxy
    • Private IP (if configured)
  • SSL Certificate: Required for secure public IP connections

Snowflake

  • Account: Snowflake account identifier
  • Username: Database username
  • Password: Corresponding password
  • Warehouse: Default warehouse name
  • Database: Default database name
  • Schema: Default schema name
  • Role: Optional - specific role to use
  • Authentication Method:
    • Username/password
    • Key pair authentication

Microsoft SQL Server

  • Server: Server address or hostname
  • Port: Database port (default: 1433)
  • Database: Database name
  • Username: SQL Server username
  • Password: Corresponding password
  • Authentication Method:
    • SQL Server authentication
    • Windows authentication
  • Encryption: Enable/disable TLS encryption

Supabase

Supabase PostgreSQL
  • Project URL: Your Supabase project URL
  • Database Host: PostgreSQL database hostname
  • Database Name: Database name (typically postgres)
  • Port: Database port (default: 5432)
  • Username: Database username
  • Password: PostgreSQL database password
Supabase Analytics
  • Project URL: Your Supabase project URL
  • API Key: Service role API key
  • Project Reference: Project reference ID

Teradata Vantage

  • Host: Teradata server hostname
  • Database: Database name
  • Username: Database username
  • Password: Corresponding password
  • Authentication Method:
    • Database credentials
    • LDAP integration

Security Considerations

Credential Management

  • Encryption: All credentials are encrypted at rest and in transit
  • Access Control: Credentials are only accessible to authorized processes
  • Audit Trail: All credential access is logged and monitored
  • Regular Rotation: Consider implementing credential rotation policies

Network Security

  • Firewall Configuration: Ensure your firewall allows outbound
    connections to Spartera
  • IP Whitelisting: Configure IP restrictions if required by your
    security policy
  • VPN Support: Use VPN connections for additional security layers
  • Private Endpoints: Leverage private network connectivity where
    available

Permissions

Grant minimal required permissions:

  • Read-Only Access: Spartera only requires read permissions
  • Specific Tables: Limit access to only necessary datasets
  • Query Execution: Allow SELECT and analytical function execution
  • Metadata Access: Optional - for enhanced data discovery

Platform-Specific Security

AWS
  • Create dedicated IAM users with read-only policies
  • Use IAM database authentication for Aurora and RDS when possible
  • Enable CloudTrail logging for audit compliance
  • Configure VPC security groups to restrict access
Google Cloud Platform
  • Create service accounts with minimal required roles
  • Use Cloud SQL Proxy for enhanced security
  • Enable Cloud Audit Logs for monitoring
  • Configure VPC and firewall rules appropriately

Connection Testing

Validation Process

After configuration, Spartera will automatically:

  1. Test Connectivity: Verifies network access to your data source
  2. Validate Credentials: Confirms authentication works correctly
  3. Check Permissions: Ensures required access levels are available
  4. Performance Test: Runs a simple query to verify functionality

Troubleshooting Common Issues

Connection Timeout

  • Check firewall rules and network connectivity
  • Verify server addresses and ports are correct
  • Confirm outbound internet access is available
  • For Cloud SQL, ensure public IP access is enabled or Cloud SQL Proxy is
    configured
  • For Aurora/RDS, verify security group rules allow inbound connections

Authentication Failure

  • Verify credentials are correct and current
  • Check if accounts have required permissions
  • Confirm service accounts are properly configured
  • For IAM database authentication, verify IAM policies are correct
  • For Cloud SQL, ensure SSL certificates are valid

Permission Denied

  • Review database user permissions
  • Ensure read access to target tables/schemas
  • Verify query execution permissions are granted
  • Check that the database user has SELECT privileges on required objects

SSL/TLS Issues

  • Verify SSL certificates are valid and not expired
  • Ensure SSL/TLS versions are compatible
  • For Cloud SQL, download and configure required SSL certificates
  • Check that encryption settings match your database configuration

Best Practices

Performance Optimization

  • Resource Allocation: Ensure adequate compute resources for your
    workload
  • Connection Pooling: Configure appropriate connection pool sizes
  • Query Optimization: Structure data and indexes for analytical queries
  • Monitoring: Set up monitoring for connection health and performance

Maintenance

  • Regular Testing: Periodically verify connection functionality
  • Credential Updates: Plan for credential rotation and updates
  • Documentation: Maintain up-to-date connection documentation
  • Change Management: Track changes to data sources and structures

Security

  • Principle of Least Privilege: Grant minimum required permissions
  • Regular Audits: Review connection security and access logs
  • Incident Response: Have procedures for handling security events
  • Backup Credentials: Maintain secure backup access methods

Once your connection is established and validated, you can begin creating
assets that leverage your data for analytics and insights.