Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Turso #130

Merged
merged 15 commits into from
Jan 26, 2025
Merged

Add Turso #130

merged 15 commits into from
Jan 26, 2025

Conversation

andrewm4894
Copy link
Owner

@andrewm4894 andrewm4894 commented Jan 25, 2025

This pull request introduces several updates and improvements, including support for Turso databases, enhancements to SQLite functionalities, and updates to documentation and configuration files. The most important changes are summarized below:

Support for Turso Databases:

  • Added Turso-related environment variables in .example.env and updated the README.md to include Turso as a supported database. [1] [2] [3]

Enhancements to SQLite Functionalities:

  • Refactored sqlite.py to include retry logic, context management, and support for Turso connections. Introduced functions such as get_sqlite_path, get_conn, with_sqlite_retry, sqlite_connection, infer_sqlite_type, and generate_create_table_sql. [1] [2]
  • Added a new utility function generate_insert_sql in anomstack/df/utils.py to generate SQL DDL and batched DML from a DataFrame.

Documentation and Configuration Updates:

  • Updated the default database type to SQLite in metrics/defaults/defaults.yaml and modified the SQL query in metrics/defaults/sql/train.sql to include specific columns. [1] [2]
  • Added libsql-experimental to requirements.compile to support new SQLite functionalities.

Utility Enhancements:

  • Introduced a new utility function get_columns_from_sql in anomstack/sql/utils.py to extract columns from a SQL query.

These changes collectively enhance the database support and functionality, particularly for SQLite and Turso, while also improving the overall codebase and documentation.

Copy link

github-actions bot commented Jan 25, 2025

Your pull request is automatically being deployed to Dagster Cloud.

Location Status Link Updated
anomstack View in Cloud Jan 26, 2025 at 12:58 AM (UTC)

@andrewm4894 andrewm4894 marked this pull request as ready for review January 26, 2025 00:52
@andrewm4894 andrewm4894 merged commit 6633c7b into main Jan 26, 2025
4 checks passed
@andrewm4894 andrewm4894 deleted the turso branch January 26, 2025 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant