Skip to main content

SQL feature lineage extraction and unified vector SQL planning

Project description

feature-sql-tool

Current implementation of feature-sql-tool focused on:

  • recursive column resolution through CTEs and scope aliases
  • computed-vs-passthrough alias classification
  • intermediate feature extraction
  • filter_only_intermediate_features classification through graph reachability
  • multi-feature unified graph building
  • safe SQL optimization by merging features with identical logical query shape

Current scope

This package is a practical implementation scaffold with working core logic for:

  • scope parsing
  • recursive lineage for one feature
  • filter_only classification
  • safe grouping of multiple feature queries into shared aggregate CTEs when their WITH/FROM/JOIN/WHERE/GROUP/HAVING/QUALIFY signatures are identical

Notes

The optimizer intentionally uses safe reuse only. It merges features only when their normalized query shape matches exactly.

Optimized reusable-stage SQL builder (2.0.0)

Use FeatureSqlTool.build_optimized_unified_sql(features) to build unified SQL with reusable base and aggregate CTE stages when possible.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

feature_sql_tool-2.0.0.tar.gz (30.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

feature_sql_tool-2.0.0-py3-none-any.whl (44.7 kB view details)

Uploaded Python 3

File details

Details for the file feature_sql_tool-2.0.0.tar.gz.

File metadata

  • Download URL: feature_sql_tool-2.0.0.tar.gz
  • Upload date:
  • Size: 30.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for feature_sql_tool-2.0.0.tar.gz
Algorithm Hash digest
SHA256 185a2ae4496c078187ef12b1c8d36ce9b64e44bad6a10e34350ac646b77180da
MD5 4a6649606cb38db67203933202c33f54
BLAKE2b-256 72d057a9879f5ee23830bf44c8117bb6659e4ee86b5572d6b641404e4cda9a9c

See more details on using hashes here.

File details

Details for the file feature_sql_tool-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for feature_sql_tool-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1806a018c84082cd69d8cb98bc19e9aa4495a24f65e8c4d67a90654d845b2ccb
MD5 539ac421ce2522cff17f6d6788ba0836
BLAKE2b-256 e247463289d7857c1c80b2be9e62c0b2adb7f7e06ed6e7a2d94300b27ee4e3a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page