Troubleshooting
This guide provides solutions to common issues you may encounter when working with Olytix Core. Issues are organized by category for easy navigation.
Installation Issues
Python version incompatibility
Error:
ERROR: Package 'olytix-core' requires a different Python: 3.9.0 not in '>=3.11'
Solution: Olytix Core requires Python 3.11 or later. Check your Python version:
python --version
If needed, install Python 3.11+ using your package manager or pyenv:
# Using pyenv
pyenv install 3.11.0
pyenv local 3.11.0
Dependency installation fails
Error:
ERROR: Could not build wheels for package
Solution:
- Ensure you have build tools installed:
# Ubuntu/Debian
sudo apt-get install build-essential
# macOS
xcode-select --install
- Upgrade pip:
pip install --upgrade pip
- Try installing with verbose output to identify the specific package:
pip install olytix-core -v
Permission denied during installation
Error:
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied
Solution: Use a virtual environment:
python -m venv venv
source venv/bin/activate # Linux/macOS
# or
venv\Scripts\activate # Windows
pip install olytix-core
Do not use sudo pip install.
Connection Issues
Cannot connect to database
Error:
ConnectionError: Unable to connect to postgresql://localhost:5432/analytics
Solution:
- Verify the database is running:
# PostgreSQL
pg_isready -h localhost -p 5432
- Check your connection settings in
olytix-core_project.yml:
warehouse:
type: postgresql
host: localhost # or your actual host
port: 5432
database: analytics
user: ${OLYTIX_DB_USER}
password: ${OLYTIX_DB_PASSWORD}
- Verify environment variables are set:
echo $OLYTIX_DB_USER
echo $OLYTIX_DB_PASSWORD
- Test the connection manually:
psql -h localhost -p 5432 -U $OLYTIX_DB_USER -d analytics
Authentication failed
Error:
AuthenticationError: password authentication failed for user "analytics"
Solution:
- Verify credentials are correct
- Check that the user has appropriate permissions:
GRANT ALL PRIVILEGES ON DATABASE analytics TO your_user;
GRANT ALL PRIVILEGES ON SCHEMA public TO your_user;
- For Snowflake/BigQuery, verify your authentication method (password, key-pair, OAuth)
SSL connection required
Error:
SSLError: SSL connection is required
Solution: Add SSL configuration to your connection:
warehouse:
type: postgresql
host: your-host.com
port: 5432
database: analytics
user: ${OLYTIX_DB_USER}
password: ${OLYTIX_DB_PASSWORD}
ssl: true
# or for more control:
ssl_mode: require
Compilation Issues
Model not found
Error:
CompilationError: Model 'stg_orders' not found
Solution:
- Verify the model file exists with the correct name:
ls models/**/stg_orders.sql
- Check for typos in
ref()calls:
-- Correct
SELECT * FROM {{ ref('stg_orders') }}
-- Common mistakes
SELECT * FROM {{ ref('stg_order') }} -- Missing 's'
SELECT * FROM {{ ref('staging_orders') }} -- Wrong name
-
Ensure the model is in the correct directory (under
models/) -
Run compile with verbose output:
olytix-core compile --verbose
Source not found
Error:
CompilationError: Source 'raw.orders' not found
Solution:
- Verify the source is defined in a YAML file under
sources/:
# sources/raw.yml
sources:
- name: raw
database: analytics
schema: public
tables:
- name: orders
- Check the
source()call uses the correct source and table names:
SELECT * FROM {{ source('raw', 'orders') }}
Circular dependency detected
Error:
CompilationError: Circular dependency detected: model_a -> model_b -> model_a
Solution:
- Review your model dependencies and break the cycle
- Consider using ephemeral materializations for intermediate steps
- Restructure models to avoid the circular reference
-- Instead of model_a referencing model_b which references model_a,
-- extract shared logic into a third model
-- models/shared_logic.sql
SELECT ...
-- models/model_a.sql
SELECT * FROM {{ ref('shared_logic') }} ...
-- models/model_b.sql
SELECT * FROM {{ ref('shared_logic') }} ...
Invalid YAML syntax
Error:
YAMLParseError: mapping values are not allowed here
Solution:
- Check for proper indentation (use spaces, not tabs)
- Verify colons are followed by a space
- Quote strings with special characters
- Use a YAML validator or IDE extension
# Incorrect
measures:
- name:my_measure # Missing space after colon
# Correct
measures:
- name: my_measure
Query Issues
Measure not found in cube
Error:
QueryError: Measure 'revenue' not found in cube 'orders'
Solution:
- Verify the measure is defined in the cube:
cubes:
- name: orders
measures:
- name: total_revenue # Note: name is 'total_revenue', not 'revenue'
type: sum
sql: amount
- Use the correct measure name in your query:
{
"metrics": ["orders.total_revenue"]
}
Dimension type mismatch
Error:
QueryError: Cannot apply operator 'greater_than' to dimension of type 'string'
Solution: Use appropriate operators for the dimension type:
// For string dimensions
{
"dimension": "status",
"operator": "equals",
"value": "active"
}
// For numeric dimensions
{
"dimension": "amount",
"operator": "greater_than",
"value": 100
}
// For time dimensions
{
"dimension": "order_date",
"operator": "after",
"value": "2024-01-01"
}
Join path not found
Error:
QueryError: No join path found between 'orders' and 'products'
Solution:
- Define a join between the cubes:
cubes:
- name: orders
joins:
- name: products
relationship: many_to_one
sql: "{orders}.product_id = {products}.product_id"
- Ensure the referenced cube exists and is spelled correctly
Query timeout
Error:
QueryError: Query execution exceeded timeout of 30 seconds
Solution:
- Add pre-aggregations for the query pattern:
pre_aggregations:
- name: monthly_revenue
measures: [total_revenue]
dimensions: [country]
time_dimension: order_date
granularity: month
- Increase the timeout in configuration:
query:
timeout: 120 # seconds
- Optimize the underlying SQL:
- Add indexes to filtered columns
- Materialize models as tables instead of views
- Filter data earlier in the pipeline
API Server Issues
Server fails to start
Error:
ERROR: Application startup failed
Solution:
- Check if the port is already in use:
lsof -i :8000
- Use a different port:
olytix-core serve --port 8001
- Verify the project compiles successfully:
olytix-core compile
API returns 500 Internal Server Error
Solution:
- Check server logs for details:
olytix-core serve --log-level debug
- Common causes:
- Database connection issues
- Invalid query syntax
- Missing required configuration
Changes not reflected in API responses
Solution:
- Recompile the project:
olytix-core compile
- Restart the API server:
# Stop current server (Ctrl+C)
olytix-core serve
- Clear any cached pre-aggregations if applicable
Pre-Aggregation Issues
Pre-aggregation not being used
Symptom: Queries are slower than expected despite having pre-aggregations defined.
Solution:
- Verify the pre-aggregation matches your query pattern:
# Query requests: total_revenue by country and month
# Pre-aggregation must include these exact measures and dimensions
pre_aggregations:
- name: revenue_by_country_month
measures: [total_revenue]
dimensions: [country]
time_dimension: order_date
granularity: month
- Check that the pre-aggregation has been built:
curl http://localhost:8000/api/v1/preaggregations/status
- Force a pre-aggregation rebuild:
curl -X POST http://localhost:8000/api/v1/preaggregations/refresh
Pre-aggregation build fails
Error:
PreAggregationError: Failed to build pre-aggregation 'monthly_revenue'
Solution:
- Check for sufficient disk space
- Verify database permissions for creating tables
- Review the pre-aggregation SQL for errors:
olytix-core compile --verbose
Lineage Issues
Lineage not showing expected columns
Solution:
- Ensure models use explicit column references, not
SELECT *:
-- Less optimal for lineage tracking
SELECT * FROM {{ ref('stg_orders') }}
-- Better for lineage tracking
SELECT
order_id,
customer_id,
amount
FROM {{ ref('stg_orders') }}
- Recompile after changes:
olytix-core compile
Incomplete upstream lineage
Solution:
- Verify all sources are properly defined
- Check that source column names match actual database columns
- Ensure models reference sources using
source()function
Performance Issues
Slow compilation
Solution:
- Use parallel compilation:
olytix-core compile --threads 4
- Reduce the number of models by combining simple transformations
- Use ephemeral materializations for intermediate steps
High memory usage
Solution:
- Limit concurrent queries:
server:
max_concurrent_queries: 10
- Use streaming for large result sets
- Add appropriate limits to queries:
{
"metrics": ["total_revenue"],
"limit": 1000
}