Client Interfaces
You can connect to your data through several client interfaces, each suited to different tools and workloads.
All client interfaces require authentication with your Altertable credentials. Learn more about the SQL engine that powers these interfaces.
REST API quick start
Use the REST API clients when you want a lightweight HTTPS interface for queries, uploads, and appends.
from altertable_lakehouse import Clientfrom altertable_lakehouse.models import QueryRequestclient = Client(username="your_username",password="your_password",)# Run a SQL queryreq = QueryRequest(statement="""SELECTdate_trunc('day', timestamp) AS day,COUNT(DISTINCT user_id) AS dauFROM eventsWHERE event = 'Event Name'AND timestamp >= NOW() - INTERVAL '30 days'GROUP BY 1ORDER BY 1 DESC""")# Accumulate all rows in memoryresult = client.query_all(req)for row in result.rows:print(row)# Append data to a tableclient.append(catalog="my_catalog",schema="my_schema",table="users",data={"user_id": 1, "plan": "pro"})
SQL API quick start
Use the SQL API clients when you want Postgres wire protocol compatibility or high-throughput Arrow Flight SQL.
-- Altertable speaks the Postgres wire protocol natively.-- No SDK needed — any Postgres client works out of the box.-- psqlpsql "postgresql://your_username:[email protected]:443/my_db"
Official Client Libraries
Client | Install | Repository |
|---|---|---|
Lakehouse Python SDK | pip install altertable-lakehouse | |
Lakehouse Ruby SDK | gem install altertable-lakehouse (or add gem "altertable-lakehouse" to your Gemfile) | |
Lakehouse CLI | Copy bin/altertable from the repo to your PATH (see README) | |
Arrow Flight SQL Python | See repository README |
For protocol-specific details, see:
Arrow Flight SQL
High-performance streaming analytics with Arrow Flight SQL. Built on Apache Arrow, ideal for dbt, Airbyte, and large datasets.Postgres Adapter
Connect to Altertable using the Postgres wire protocol for compatibility with hundreds of BI tools including Hex, Looker, Tableau, Metabase, and SQL clients.REST API
Introduces the Altertable REST API and links to the full endpoint reference.