Skip to main content

SQLAlchemy Parseable Connector for Apache Superset

A SQLAlchemy dialect and DBAPI implementation for connecting Apache Superset to Parseable, enabling seamless data visualization and analytics of your log data.

Features

  • Full SQLAlchemy dialect implementation for Parseable
  • Support for timestamp-based queries
  • Automatic schema detection
  • Support for special characters in table names (e.g., "ingress-nginx")
  • Type mapping from Parseable to SQLAlchemy types
  • Connection pooling and management

Prerequisites

  • Python 3.11.6 or higher
  • Apache Superset
  • A running Parseable instance

Installation

1. Set Up Python Environment

First, create and activate a Python virtual environment:

python3 -m venv venv
source venv/bin/activate  # On Linux/Mac
# or
.\venv\Scripts\activate  # On Windows

2. Install and Configure Superset

Install Apache Superset and perform initial setup:

# Install Superset
pip install apache-superset

# Configure Superset
export SUPERSET_SECRET_KEY=your-secure-secret-key
export FLASK_APP=superset

# Initialize the database
superset db upgrade

# Create an admin user
superset fab create-admin

# Load initial data
superset init

3. Install Parseable Connector

Install the Parseable connector in development mode:

cd sqlalchemy-parseable
pip install -e .

Running Superset

Start the Superset development server:

superset run -p 8088 --with-threads --reload --debugger

Access Superset at http://localhost:8088

Connecting to Parseable

  1. In the Superset UI, go to Data → Databases → + Database
  2. Select "Other" as the database type
  3. Use the following SQLAlchemy URI format:
    parseable://username:password@host:port/table_name
    
    Example:
    parseable://admin:admin@demo.parseable.com:443/ingress-nginx
    

Query Examples

The connector supports standard SQL queries with some Parseable-specific features:

-- Basic query with time range
SELECT method, status, COUNT(*) as count
FROM ingress-nginx
WHERE p_timestamp >= '2024-01-01T00:00:00Z'
  AND p_timestamp < '2024-01-02T00:00:00Z'
GROUP BY method, status;

-- Status code analysis
SELECT status, COUNT(*) as count
FROM ingress-nginx
WHERE p_timestamp >= '2024-01-01T00:00:00Z'
GROUP BY status;

Development

The connector implements several key components:

  • ParseableDialect: SQLAlchemy dialect implementation
  • ParseableClient: HTTP client for Parseable API
  • ParseableConnection: DBAPI connection implementation
  • ParseableCursor: DBAPI cursor implementation

Features and Limitations

Supported Features

  • Query execution with time range filtering
  • Schema inspection
  • Column type mapping
  • Connection testing
  • Table existence checking

Current Limitations

  • No transaction support (Parseable is append-only)
  • No write operations support
  • Limited to supported Parseable query operations

Troubleshooting

Common Issues

  1. Connection Errors

    • Verify Parseable host and port are correct
    • Ensure credentials are valid
    • Check if table name exists in Parseable
  2. Query Errors

    • Verify time range format (should be ISO8601)
    • Check if column names exist in schema
    • Ensure proper quoting for table names with special characters

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

Apache License 2.0

Metadata

Release files for sqlalchemy-parseable 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlalchemy-parseable 0.1.0
File Size Uploaded Provenance Actions
sqlalchemy_parseable-0.1.0.tar.gz 13.0 kB Without provenance Details for sqlalchemy_parseable-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sqlalchemy-parseable 0.1.0
File Interpreter ABI Platform Actions
sqlalchemy_parseable-0.1.0-py3-none-any.whl Python 3 none any Details for sqlalchemy_parseable-0.1.0-py3-none-any.whl

Total release size: 24.7 kB

Release files / sqlalchemy_parseable-0.1.0.tar.gz

Download URL sqlalchemy_parseable-0.1.0.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0e9c934f23a94d82f1e372244b2cdffb428b5bc17feb8003bb4790d6ed90d8f5
BLAKE2b-256 checksum
How to use checksums
9e91506fc03c9998571039a913375a3ba8bea1817d34ea82e9d6814cb1645ac4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.6

Release files / sqlalchemy_parseable-0.1.0-py3-none-any.whl

Download URL sqlalchemy_parseable-0.1.0-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
920f1a3be88c8aa1593fe1abaaeba2bd97833f1831695f8caca220503782d2eb
BLAKE2b-256 checksum
How to use checksums
277efba290c1e8c18234cbdf6d69bce14ffaeb09b3513f964a8a8743081cda51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.6

Security for sqlalchemy-parseable 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page