sqlctx 0.1.6__tar.gz → 0.14.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (578) hide show
  1. sqlctx-0.14.0/.agents/plugins/marketplace.json +20 -0
  2. sqlctx-0.14.0/.bun-version +1 -0
  3. sqlctx-0.14.0/.claude-plugin/marketplace.json +14 -0
  4. sqlctx-0.14.0/.dockerignore +26 -0
  5. sqlctx-0.14.0/.gitignore +63 -0
  6. sqlctx-0.14.0/AGENTS.md +133 -0
  7. sqlctx-0.14.0/CLAUDE.md +1 -0
  8. sqlctx-0.14.0/CONTRIBUTING.md +27 -0
  9. sqlctx-0.14.0/Cargo.lock +3511 -0
  10. sqlctx-0.14.0/Cargo.toml +18 -0
  11. sqlctx-0.14.0/Dockerfile +67 -0
  12. {sqlctx-0.1.6 → sqlctx-0.14.0}/LICENSE +67 -80
  13. sqlctx-0.14.0/PKG-INFO +1249 -0
  14. sqlctx-0.14.0/README.md +452 -0
  15. sqlctx-0.14.0/SECURITY.md +3 -0
  16. sqlctx-0.14.0/crates/dax-parser/Cargo.toml +10 -0
  17. sqlctx-0.14.0/crates/dax-parser/src/builtin_functions.txt +352 -0
  18. sqlctx-0.14.0/crates/dax-parser/src/formatter.rs +825 -0
  19. sqlctx-0.14.0/crates/dax-parser/src/function_catalog.rs +4556 -0
  20. sqlctx-0.14.0/crates/dax-parser/src/lib.rs +3791 -0
  21. sqlctx-0.14.0/crates/dax-parser/src/model_validation.rs +1062 -0
  22. sqlctx-0.14.0/crates/dax-parser/src/recovery.rs +418 -0
  23. sqlctx-0.14.0/crates/dax-parser/src/validation.rs +1470 -0
  24. sqlctx-0.14.0/crates/dax-parser/tests/corpus.rs +95 -0
  25. sqlctx-0.14.0/crates/dax-parser/tests/corpus_errors.rs +40 -0
  26. sqlctx-0.14.0/crates/dax-parser/tests/corpus_functions.rs +40 -0
  27. sqlctx-0.14.0/crates/dax-parser/tests/corpus_queries.rs +59 -0
  28. sqlctx-0.14.0/crates/dax-pyo3/Cargo.toml +18 -0
  29. sqlctx-0.14.0/crates/dax-pyo3/README.md +34 -0
  30. sqlctx-0.14.0/crates/dax-pyo3/pyproject.toml +37 -0
  31. sqlctx-0.14.0/crates/dax-pyo3/python/sqlctx_dax/__init__.py +263 -0
  32. sqlctx-0.14.0/crates/dax-pyo3/python/sqlctx_dax/ast.py +1364 -0
  33. sqlctx-0.14.0/crates/dax-pyo3/python/sqlctx_dax/py.typed +0 -0
  34. sqlctx-0.14.0/crates/dax-pyo3/src/lib.rs +575 -0
  35. sqlctx-0.14.0/docker-entrypoint.sh +155 -0
  36. sqlctx-0.14.0/examples/adbc_snowflake/.gitignore +3 -0
  37. sqlctx-0.14.0/examples/adbc_snowflake/README.md +122 -0
  38. sqlctx-0.14.0/examples/adbc_snowflake/orders.yaml +41 -0
  39. sqlctx-0.14.0/examples/adbc_snowflake/setup.sql +45 -0
  40. sqlctx-0.14.0/examples/adbc_snowflake/sqlctx.yaml.example +11 -0
  41. sqlctx-0.14.0/examples/advanced/comprehensive_demo.py +326 -0
  42. sqlctx-0.14.0/examples/advanced/comprehensive_example.py +376 -0
  43. sqlctx-0.14.0/examples/basic/basic_example.py +123 -0
  44. sqlctx-0.14.0/examples/basic/simplified_api_example.py +69 -0
  45. sqlctx-0.14.0/examples/bsl/customers.yml +26 -0
  46. sqlctx-0.14.0/examples/cloudflare_containers/.gitignore +4 -0
  47. sqlctx-0.14.0/examples/cloudflare_containers/Dockerfile +10 -0
  48. sqlctx-0.14.0/examples/cloudflare_containers/README.md +98 -0
  49. sqlctx-0.14.0/examples/cloudflare_containers/bun.lock +202 -0
  50. sqlctx-0.14.0/examples/cloudflare_containers/src/index.ts +57 -0
  51. sqlctx-0.14.0/examples/cloudflare_containers/tsconfig.json +18 -0
  52. sqlctx-0.14.0/examples/cloudflare_containers/wrangler.jsonc +32 -0
  53. sqlctx-0.14.0/examples/cube_demo/.gitignore +1 -0
  54. sqlctx-0.14.0/examples/cube_demo/Dockerfile +7 -0
  55. sqlctx-0.14.0/examples/cube_demo/run_demo.py +313 -0
  56. sqlctx-0.14.0/examples/cube_demo/sqlctx.yaml +137 -0
  57. sqlctx-0.14.0/examples/docker/README.md +173 -0
  58. sqlctx-0.14.0/examples/docker/docker-compose.yml +71 -0
  59. sqlctx-0.14.0/examples/ecommerce/README.md +133 -0
  60. sqlctx-0.14.0/examples/ecommerce/data/create_db.py +222 -0
  61. sqlctx-0.14.0/examples/ecommerce/data/ecommerce.db +0 -0
  62. sqlctx-0.14.0/examples/ecommerce/models/customers.yml +70 -0
  63. sqlctx-0.14.0/examples/ecommerce/models/metrics.yml +38 -0
  64. sqlctx-0.14.0/examples/ecommerce/models/order_items.sql +95 -0
  65. sqlctx-0.14.0/examples/ecommerce/models/orders.yml +87 -0
  66. sqlctx-0.14.0/examples/ecommerce/models/products.sql +79 -0
  67. sqlctx-0.14.0/examples/features/cross_model_metrics_example.py +144 -0
  68. sqlctx-0.14.0/examples/features/multi_hop_joins_example.py +128 -0
  69. sqlctx-0.14.0/examples/features/parameters_example.py +135 -0
  70. sqlctx-0.14.0/examples/features/symmetric_aggregates_example.py +230 -0
  71. sqlctx-0.14.0/examples/headless_dashboard/.gitignore +3 -0
  72. sqlctx-0.14.0/examples/headless_dashboard/README.md +42 -0
  73. sqlctx-0.14.0/examples/headless_dashboard/dashboard.ts +58 -0
  74. sqlctx-0.14.0/examples/headless_dashboard/dashboard.yml +46 -0
  75. sqlctx-0.14.0/examples/headless_dashboard/models.yml +41 -0
  76. sqlctx-0.14.0/examples/headless_dashboard/queries.ts +46 -0
  77. sqlctx-0.14.0/examples/headless_dashboard/setup_data.py +83 -0
  78. sqlctx-0.14.0/examples/headless_dashboard/sqlctx.client.generated.ts +57 -0
  79. sqlctx-0.14.0/examples/headless_dashboard/sqlctx.generated.ts +246 -0
  80. sqlctx-0.14.0/examples/headless_dashboard/sqlctx.queries.generated.ts +16 -0
  81. sqlctx-0.14.0/examples/headless_dashboard/vite.config.example.ts +26 -0
  82. sqlctx-0.14.0/examples/hive_parquet/.gitignore +1 -0
  83. sqlctx-0.14.0/examples/hive_parquet/README.md +147 -0
  84. sqlctx-0.14.0/examples/hive_parquet/hive_parquet_example.py +207 -0
  85. sqlctx-0.14.0/examples/hive_parquet/hive_parquet_preagg_example.py +272 -0
  86. sqlctx-0.14.0/examples/integrations/chart_example.py +162 -0
  87. sqlctx-0.14.0/examples/integrations/export_example.py +35 -0
  88. sqlctx-0.14.0/examples/integrations/headless_charting.py +622 -0
  89. sqlctx-0.14.0/examples/integrations/modal_headless_charting.py +113 -0
  90. sqlctx-0.14.0/examples/integrations/streamlit_dashboard.py +505 -0
  91. sqlctx-0.14.0/examples/malloy_demo/README.md +57 -0
  92. sqlctx-0.14.0/examples/malloy_demo/bun.lock +214 -0
  93. sqlctx-0.14.0/examples/malloy_demo/lookml_input/customers.lkml +35 -0
  94. sqlctx-0.14.0/examples/malloy_demo/lookml_input/orders.lkml +72 -0
  95. sqlctx-0.14.0/examples/malloy_demo/lookml_input/products.lkml +41 -0
  96. sqlctx-0.14.0/examples/malloy_demo/malloy_output/data/customers.parquet +0 -0
  97. sqlctx-0.14.0/examples/malloy_demo/malloy_output/data/orders.parquet +0 -0
  98. sqlctx-0.14.0/examples/malloy_demo/malloy_output/data/products.parquet +0 -0
  99. sqlctx-0.14.0/examples/malloy_demo/malloy_output/thelook.malloy +101 -0
  100. sqlctx-0.14.0/examples/malloy_demo/run_demo.py +255 -0
  101. sqlctx-0.14.0/examples/malloy_demo/validate_malloy.test.ts +210 -0
  102. sqlctx-0.14.0/examples/migrator/README.md +100 -0
  103. sqlctx-0.14.0/examples/migrator/generate_from_queries.py +602 -0
  104. sqlctx-0.14.0/examples/migrator/raw_queries/cancelled_orders.sql +10 -0
  105. sqlctx-0.14.0/examples/migrator/raw_queries/customer_demographics.sql +9 -0
  106. sqlctx-0.14.0/examples/migrator/raw_queries/customer_orders.sql +12 -0
  107. sqlctx-0.14.0/examples/migrator/raw_queries/high_value_orders.sql +11 -0
  108. sqlctx-0.14.0/examples/migrator/raw_queries/inventory_analysis.sql +10 -0
  109. sqlctx-0.14.0/examples/migrator/raw_queries/monthly_trends.sql +10 -0
  110. sqlctx-0.14.0/examples/migrator/raw_queries/product_performance.sql +13 -0
  111. sqlctx-0.14.0/examples/migrator/raw_queries/revenue_by_status.sql +8 -0
  112. sqlctx-0.14.0/examples/motherduck/README.md +85 -0
  113. sqlctx-0.14.0/examples/motherduck/query_examples.py +118 -0
  114. sqlctx-0.14.0/examples/motherduck/refresh_preaggs.py +76 -0
  115. sqlctx-0.14.0/examples/motherduck/setup_data.py +89 -0
  116. sqlctx-0.14.0/examples/motherduck/sqlctx.yaml +57 -0
  117. sqlctx-0.14.0/examples/multi_format_demo/cube/customers.yml +41 -0
  118. sqlctx-0.14.0/examples/multi_format_demo/demo_data.py +110 -0
  119. sqlctx-0.14.0/examples/multi_format_demo/hex/products.yml +65 -0
  120. sqlctx-0.14.0/examples/multi_format_demo/lookml/orders.lkml +72 -0
  121. sqlctx-0.14.0/examples/notebooks/lookml_multi_entity_duckdb_demo.ipynb +292 -0
  122. sqlctx-0.14.0/examples/notebooks/sqlctx_sql_duckdb_demo.ipynb +216 -0
  123. sqlctx-0.14.0/examples/osi_demo/adtech_semantic_model.yaml +562 -0
  124. sqlctx-0.14.0/examples/osi_demo/osi_widget_notebook.py +438 -0
  125. sqlctx-0.14.0/examples/osi_demo/run_demo.py +400 -0
  126. sqlctx-0.14.0/examples/pre_aggregations/.gitignore +2 -0
  127. sqlctx-0.14.0/examples/pre_aggregations/README.md +293 -0
  128. sqlctx-0.14.0/examples/pre_aggregations/demo.sh +60 -0
  129. sqlctx-0.14.0/examples/pre_aggregations/models/orders.yml +36 -0
  130. sqlctx-0.14.0/examples/pre_aggregations/query_history.sql +64 -0
  131. sqlctx-0.14.0/examples/pre_aggregations/setup_data.py +87 -0
  132. sqlctx-0.14.0/examples/pre_aggregations/sqlctx.yaml +11 -0
  133. sqlctx-0.14.0/examples/rill_demo/.gitignore +2 -0
  134. sqlctx-0.14.0/examples/rill_demo/Dockerfile +19 -0
  135. sqlctx-0.14.0/examples/rill_demo/run_demo.py +125 -0
  136. sqlctx-0.14.0/examples/rill_demo/sqlctx.yaml +83 -0
  137. sqlctx-0.14.0/examples/snowflake/ecommerce.yaml +199 -0
  138. sqlctx-0.14.0/examples/snowflake/simple.yaml +45 -0
  139. sqlctx-0.14.0/examples/sqlctx_wasm_demo/README.md +51 -0
  140. sqlctx-0.14.0/examples/sqlctx_wasm_demo/index.html +95 -0
  141. sqlctx-0.14.0/examples/sqlctx_wasm_demo/scripts/build_wasm.sh +13 -0
  142. sqlctx-0.14.0/examples/sqlctx_wasm_demo/server.ts +45 -0
  143. sqlctx-0.14.0/examples/sqlctx_wasm_demo/src/app.js +307 -0
  144. sqlctx-0.14.0/examples/sqlctx_wasm_demo/src/components/sqlctx/sqlctx-ui-static.js +9520 -0
  145. sqlctx-0.14.0/examples/sqlctx_wasm_demo/src/components/sqlctx/sqlctx-ui.css +1 -0
  146. sqlctx-0.14.0/examples/sqlctx_wasm_demo/src/demo/ecommerce.js +172 -0
  147. sqlctx-0.14.0/examples/sqlctx_wasm_demo/src/queries.js +92 -0
  148. sqlctx-0.14.0/examples/sqlctx_wasm_demo/src/runtime/duckdb-runtime.js +96 -0
  149. sqlctx-0.14.0/examples/sqlctx_wasm_demo/src/runtime/sqlctx-runtime.js +31 -0
  150. sqlctx-0.14.0/examples/sqlctx_wasm_demo/src/styles.css +381 -0
  151. sqlctx-0.14.0/examples/sqlctx_wasm_demo/typed_client_example.js +41 -0
  152. sqlctx-0.14.0/examples/sqlctx_wasm_demo/vendor/sqlctx/manifest.json +6 -0
  153. sqlctx-0.14.0/examples/sqlctx_wasm_demo/vendor/sqlctx/sqlctx.d.ts +307 -0
  154. sqlctx-0.14.0/examples/sqlctx_wasm_demo/vendor/sqlctx/sqlctx.js +2937 -0
  155. sqlctx-0.14.0/examples/sqlctx_wasm_demo/vendor/sqlctx/sqlctx_bg.wasm +0 -0
  156. sqlctx-0.14.0/examples/sqlctx_wasm_demo/vendor/sqlctx/sqlctx_bg.wasm.d.ts +120 -0
  157. sqlctx-0.14.0/examples/superset_demo/.gitignore +3 -0
  158. sqlctx-0.14.0/examples/superset_demo/Dockerfile +6 -0
  159. sqlctx-0.14.0/examples/superset_demo/docker-compose.yml +27 -0
  160. sqlctx-0.14.0/examples/superset_demo/run_demo.py +492 -0
  161. sqlctx-0.14.0/examples/superset_demo/sqlctx.yaml +83 -0
  162. sqlctx-0.14.0/examples/superset_demo/superset_config.py +20 -0
  163. sqlctx-0.14.0/examples/widget_demo/widget_demo.ipynb +712 -0
  164. sqlctx-0.14.0/examples/widget_demo/widget_demo.marimo.py +479 -0
  165. sqlctx-0.14.0/examples/widget_demo/widget_demo_simple.ipynb +309 -0
  166. sqlctx-0.14.0/examples/yaml/yaml_syntax_example.py +154 -0
  167. sqlctx-0.14.0/examples/yaml/yaml_syntax_example.yml +68 -0
  168. sqlctx-0.14.0/js/bun.lock +124 -0
  169. sqlctx-0.14.0/js/package.json +15 -0
  170. sqlctx-0.14.0/js/widget.css +514 -0
  171. sqlctx-0.14.0/js/widget.js +532 -0
  172. sqlctx-0.14.0/preview.png +0 -0
  173. sqlctx-0.14.0/pyproject.toml +287 -0
  174. sqlctx-0.14.0/scripts/audit_engine_exceptions.py +745 -0
  175. sqlctx-0.14.0/scripts/benchmark_semantic_sql_planner.py +910 -0
  176. sqlctx-0.14.0/scripts/build_demo_duckdb.py +33 -0
  177. sqlctx-0.14.0/scripts/build_foursquare_preagg_db.py +179 -0
  178. sqlctx-0.14.0/scripts/build_ui_distribution.py +95 -0
  179. sqlctx-0.14.0/scripts/build_webapp.py +72 -0
  180. sqlctx-0.14.0/scripts/build_widget.py +74 -0
  181. sqlctx-0.14.0/scripts/check_malloy_grammar_drift.py +86 -0
  182. sqlctx-0.14.0/scripts/commit_chart.py +61 -0
  183. sqlctx-0.14.0/scripts/docker_smoke_test.py +260 -0
  184. sqlctx-0.14.0/scripts/fix_test_fixtures.py +89 -0
  185. sqlctx-0.14.0/scripts/generate_compatibility_docs.py +173 -0
  186. sqlctx-0.14.0/scripts/generate_man_page.py +20 -0
  187. sqlctx-0.14.0/scripts/generate_schema.py +122 -0
  188. sqlctx-0.14.0/scripts/preagg_recommendation_example.py +127 -0
  189. sqlctx-0.14.0/scripts/setup-dns.sh +50 -0
  190. sqlctx-0.14.0/sqlctx/__init__.py +82 -0
  191. sqlctx-0.14.0/sqlctx/adapters/atscale_sml.py +1569 -0
  192. sqlctx-0.14.0/sqlctx/adapters/base.py +155 -0
  193. sqlctx-0.14.0/sqlctx/adapters/bsl.py +815 -0
  194. sqlctx-0.14.0/sqlctx/adapters/bsl_expr.py +923 -0
  195. sqlctx-0.14.0/sqlctx/adapters/cube.py +2069 -0
  196. sqlctx-0.14.0/sqlctx/adapters/gooddata.py +1404 -0
  197. sqlctx-0.14.0/sqlctx/adapters/graphene.py +1506 -0
  198. sqlctx-0.14.0/sqlctx/adapters/hex.py +831 -0
  199. sqlctx-0.14.0/sqlctx/adapters/holistics.py +2432 -0
  200. sqlctx-0.14.0/sqlctx/adapters/holistics_grammar/HolisticsLexer.g4 +70 -0
  201. sqlctx-0.14.0/sqlctx/adapters/holistics_grammar/HolisticsLexer.interp +179 -0
  202. sqlctx-0.14.0/sqlctx/adapters/holistics_grammar/HolisticsLexer.py +270 -0
  203. sqlctx-0.14.0/sqlctx/adapters/holistics_grammar/HolisticsLexer.tokens +99 -0
  204. sqlctx-0.14.0/sqlctx/adapters/holistics_grammar/HolisticsParser.g4 +248 -0
  205. sqlctx-0.14.0/sqlctx/adapters/holistics_grammar/HolisticsParser.interp +164 -0
  206. sqlctx-0.14.0/sqlctx/adapters/holistics_grammar/HolisticsParser.py +3866 -0
  207. sqlctx-0.14.0/sqlctx/adapters/holistics_grammar/HolisticsParser.tokens +99 -0
  208. sqlctx-0.14.0/sqlctx/adapters/holistics_grammar/HolisticsParserListener.py +435 -0
  209. sqlctx-0.14.0/sqlctx/adapters/holistics_grammar/HolisticsParserVisitor.py +248 -0
  210. sqlctx-0.14.0/sqlctx/adapters/holistics_grammar/__init__.py +5 -0
  211. sqlctx-0.14.0/sqlctx/adapters/lookml.py +5279 -0
  212. sqlctx-0.14.0/sqlctx/adapters/malloy.py +4112 -0
  213. sqlctx-0.14.0/sqlctx/adapters/malloy_expressions.py +977 -0
  214. sqlctx-0.14.0/sqlctx/adapters/malloy_grammar/MalloyLexer.g4 +301 -0
  215. sqlctx-0.14.0/sqlctx/adapters/malloy_grammar/MalloyLexer.interp +615 -0
  216. sqlctx-0.14.0/sqlctx/adapters/malloy_grammar/MalloyLexer.py +1335 -0
  217. sqlctx-0.14.0/sqlctx/adapters/malloy_grammar/MalloyLexer.tokens +216 -0
  218. sqlctx-0.14.0/sqlctx/adapters/malloy_grammar/MalloyParser.g4 +859 -0
  219. sqlctx-0.14.0/sqlctx/adapters/malloy_grammar/MalloyParser.interp +560 -0
  220. sqlctx-0.14.0/sqlctx/adapters/malloy_grammar/MalloyParser.py +17819 -0
  221. sqlctx-0.14.0/sqlctx/adapters/malloy_grammar/MalloyParser.tokens +216 -0
  222. sqlctx-0.14.0/sqlctx/adapters/malloy_grammar/MalloyParserListener.py +2379 -0
  223. sqlctx-0.14.0/sqlctx/adapters/malloy_grammar/MalloyParserVisitor.py +1328 -0
  224. sqlctx-0.14.0/sqlctx/adapters/malloy_grammar/UPSTREAM.json +30 -0
  225. sqlctx-0.14.0/sqlctx/adapters/malloy_grammar/UPSTREAM.md +19 -0
  226. sqlctx-0.14.0/sqlctx/adapters/malloy_grammar/__init__.py +17 -0
  227. sqlctx-0.14.0/sqlctx/adapters/malloy_modules.py +739 -0
  228. sqlctx-0.14.0/sqlctx/adapters/malloy_queries.py +575 -0
  229. sqlctx-0.14.0/sqlctx/adapters/metricflow.py +1550 -0
  230. sqlctx-0.14.0/sqlctx/adapters/official.py +633 -0
  231. sqlctx-0.14.0/sqlctx/adapters/omni.py +1301 -0
  232. sqlctx-0.14.0/sqlctx/adapters/osi.py +1056 -0
  233. sqlctx-0.14.0/sqlctx/adapters/ossie.py +355 -0
  234. sqlctx-0.14.0/sqlctx/adapters/rill.py +1094 -0
  235. sqlctx-0.14.0/sqlctx/adapters/snowflake.py +1330 -0
  236. sqlctx-0.14.0/sqlctx/adapters/sqlctx.py +1456 -0
  237. sqlctx-0.14.0/sqlctx/adapters/superset.py +573 -0
  238. sqlctx-0.14.0/sqlctx/adapters/tableau.py +2059 -0
  239. sqlctx-0.14.0/sqlctx/adapters/thoughtspot.py +2078 -0
  240. sqlctx-0.14.0/sqlctx/adapters/tmdl.py +2545 -0
  241. sqlctx-0.14.0/sqlctx/adapters/tmdl_parser.py +792 -0
  242. sqlctx-0.14.0/sqlctx/adapters/yardstick.py +401 -0
  243. sqlctx-0.14.0/sqlctx/api_server.py +967 -0
  244. sqlctx-0.14.0/sqlctx/apps/__init__.py +79 -0
  245. sqlctx-0.14.0/sqlctx/apps/_mcp_ui.py +83 -0
  246. sqlctx-0.14.0/sqlctx/apps/chart.html +341 -0
  247. sqlctx-0.14.0/sqlctx/apps/chart_widget.html +73 -0
  248. sqlctx-0.14.0/sqlctx/apps/web/.gitignore +2 -0
  249. sqlctx-0.14.0/sqlctx/apps/web/chart-app.ts +155 -0
  250. sqlctx-0.14.0/sqlctx/apps/web/chart.html +37 -0
  251. sqlctx-0.14.0/sqlctx/apps/web/package.json +21 -0
  252. sqlctx-0.14.0/sqlctx/apps/web/vite.config.ts +17 -0
  253. sqlctx-0.14.0/sqlctx/assets/vendor/README.md +14 -0
  254. sqlctx-0.14.0/sqlctx/assets/vendor/d3-7.9.0.min.js +2 -0
  255. sqlctx-0.14.0/sqlctx/assets/vendor/observable-plot-0.6.17.umd.min.js +2 -0
  256. sqlctx-0.14.0/sqlctx/assets/vendor/plotly-2.35.2.min.js +8 -0
  257. sqlctx-0.14.0/sqlctx/assets/vendor/vega-5.33.1.min.js +2 -0
  258. sqlctx-0.14.0/sqlctx/assets/vendor/vega-embed-6.29.0.min.js +7 -0
  259. sqlctx-0.14.0/sqlctx/assets/vendor/vega-lite-5.23.0.min.js +2 -0
  260. sqlctx-0.14.0/sqlctx/bootstrap.py +361 -0
  261. sqlctx-0.14.0/sqlctx/charts.py +433 -0
  262. sqlctx-0.14.0/sqlctx/cli.py +3710 -0
  263. sqlctx-0.14.0/sqlctx/cli_contract.py +729 -0
  264. sqlctx-0.14.0/sqlctx/cli_polish.py +416 -0
  265. sqlctx-0.14.0/sqlctx/click_compat.py +37 -0
  266. sqlctx-0.14.0/sqlctx/codegen.py +379 -0
  267. sqlctx-0.14.0/sqlctx/config.py +516 -0
  268. sqlctx-0.14.0/sqlctx/core/catalog.py +297 -0
  269. sqlctx-0.14.0/sqlctx/core/consumption.py +184 -0
  270. sqlctx-0.14.0/sqlctx/core/dependency_analyzer.py +179 -0
  271. sqlctx-0.14.0/sqlctx/core/dialect.py +1148 -0
  272. sqlctx-0.14.0/sqlctx/core/dimension.py +150 -0
  273. sqlctx-0.14.0/sqlctx/core/freshness.py +36 -0
  274. sqlctx-0.14.0/sqlctx/core/governance.py +66 -0
  275. sqlctx-0.14.0/sqlctx/core/inheritance.py +253 -0
  276. sqlctx-0.14.0/sqlctx/core/introspection.py +334 -0
  277. sqlctx-0.14.0/sqlctx/core/metric.py +461 -0
  278. sqlctx-0.14.0/sqlctx/core/migrator.py +2066 -0
  279. sqlctx-0.14.0/sqlctx/core/model.py +227 -0
  280. sqlctx-0.14.0/sqlctx/core/parameter.py +194 -0
  281. sqlctx-0.14.0/sqlctx/core/pre_aggregation.py +1148 -0
  282. sqlctx-0.14.0/sqlctx/core/preagg_management.py +212 -0
  283. sqlctx-0.14.0/sqlctx/core/preagg_matcher.py +795 -0
  284. sqlctx-0.14.0/sqlctx/core/preagg_recommender.py +381 -0
  285. sqlctx-0.14.0/sqlctx/core/query_plan.py +97 -0
  286. sqlctx-0.14.0/sqlctx/core/registry.py +62 -0
  287. sqlctx-0.14.0/sqlctx/core/relationship.py +141 -0
  288. sqlctx-0.14.0/sqlctx/core/relative_date.py +174 -0
  289. sqlctx-0.14.0/sqlctx/core/required_filters.py +157 -0
  290. sqlctx-0.14.0/sqlctx/core/result_cache.py +224 -0
  291. sqlctx-0.14.0/sqlctx/core/schema_exposure.py +63 -0
  292. sqlctx-0.14.0/sqlctx/core/security.py +307 -0
  293. sqlctx-0.14.0/sqlctx/core/segment.py +36 -0
  294. sqlctx-0.14.0/sqlctx/core/semantic_catalog.py +221 -0
  295. sqlctx-0.14.0/sqlctx/core/semantic_graph.py +830 -0
  296. sqlctx-0.14.0/sqlctx/core/semantic_layer.py +2447 -0
  297. sqlctx-0.14.0/sqlctx/core/sql_definitions.py +1056 -0
  298. sqlctx-0.14.0/sqlctx/core/symmetric_aggregate.py +188 -0
  299. sqlctx-0.14.0/sqlctx/core/table_calculation.py +74 -0
  300. sqlctx-0.14.0/sqlctx/core/template.py +208 -0
  301. sqlctx-0.14.0/sqlctx/core/time_intelligence.py +133 -0
  302. sqlctx-0.14.0/sqlctx/core/transport_security.py +251 -0
  303. sqlctx-0.14.0/sqlctx/dashboard.py +768 -0
  304. sqlctx-0.14.0/sqlctx/datafiles.py +83 -0
  305. sqlctx-0.14.0/sqlctx/db/__init__.py +42 -0
  306. sqlctx-0.14.0/sqlctx/db/_duckdb_compat.py +13 -0
  307. sqlctx-0.14.0/sqlctx/db/adbc.py +451 -0
  308. sqlctx-0.14.0/sqlctx/db/base.py +302 -0
  309. sqlctx-0.14.0/sqlctx/db/bigquery.py +240 -0
  310. sqlctx-0.14.0/sqlctx/db/clickhouse.py +320 -0
  311. sqlctx-0.14.0/sqlctx/db/databricks.py +264 -0
  312. sqlctx-0.14.0/sqlctx/db/duckdb.py +289 -0
  313. sqlctx-0.14.0/sqlctx/db/motherduck.py +131 -0
  314. sqlctx-0.14.0/sqlctx/db/postgres.py +204 -0
  315. sqlctx-0.14.0/sqlctx/db/snowflake.py +309 -0
  316. sqlctx-0.14.0/sqlctx/db/spark.py +219 -0
  317. sqlctx-0.14.0/sqlctx/db/unavailable.py +59 -0
  318. sqlctx-0.14.0/sqlctx/fidelity.py +378 -0
  319. sqlctx-0.14.0/sqlctx/formats.py +458 -0
  320. sqlctx-0.14.0/sqlctx/interchange/__init__.py +1 -0
  321. sqlctx-0.14.0/sqlctx/interchange/ossie/__init__.py +124 -0
  322. sqlctx-0.14.0/sqlctx/interchange/ossie/compatibility.py +88 -0
  323. sqlctx-0.14.0/sqlctx/interchange/ossie/diagnostics.py +112 -0
  324. sqlctx-0.14.0/sqlctx/interchange/ossie/documents.py +290 -0
  325. sqlctx-0.14.0/sqlctx/interchange/ossie/expression_validation.py +73 -0
  326. sqlctx-0.14.0/sqlctx/interchange/ossie/identifier.py +50 -0
  327. sqlctx-0.14.0/sqlctx/interchange/ossie/latest_semantics.py +183 -0
  328. sqlctx-0.14.0/sqlctx/interchange/ossie/lowering.py +1022 -0
  329. sqlctx-0.14.0/sqlctx/interchange/ossie/mapping.py +281 -0
  330. sqlctx-0.14.0/sqlctx/interchange/ossie/parser.py +643 -0
  331. sqlctx-0.14.0/sqlctx/interchange/ossie/portable.py +306 -0
  332. sqlctx-0.14.0/sqlctx/interchange/ossie/profiles.py +208 -0
  333. sqlctx-0.14.0/sqlctx/interchange/ossie/runtime_extension.py +253 -0
  334. sqlctx-0.14.0/sqlctx/interchange/ossie/schemas/README.md +14 -0
  335. sqlctx-0.14.0/sqlctx/interchange/ossie/schemas/logical/0.1.1/schema.json +344 -0
  336. sqlctx-0.14.0/sqlctx/interchange/ossie/schemas/logical/0.2.0.dev0/schema.json +366 -0
  337. sqlctx-0.14.0/sqlctx/interchange/ossie/schemas/logical/0.2.0.dev0-172a3e5/schema.json +396 -0
  338. sqlctx-0.14.0/sqlctx/interchange/ossie/schemas/logical/0.2.0.dev0-b6c702e/schema.json +374 -0
  339. sqlctx-0.14.0/sqlctx/interchange/ossie/schemas/manifest.json +226 -0
  340. sqlctx-0.14.0/sqlctx/interchange/ossie/schemas/mapping/0.2.0.dev0-172a3e5/schema.json +71 -0
  341. sqlctx-0.14.0/sqlctx/interchange/ossie/schemas/mapping/0.2.0.dev0-172a3e5/upstream.json +63 -0
  342. sqlctx-0.14.0/sqlctx/interchange/ossie/schemas/ontology/0.2.0.dev0/schema.json +298 -0
  343. sqlctx-0.14.0/sqlctx/interchange/ossie/schemas/ontology/0.2.0.dev0/upstream.json +298 -0
  344. sqlctx-0.14.0/sqlctx/interchange/ossie/schemas/ontology/0.2.0.dev0-172a3e5/schema.json +399 -0
  345. sqlctx-0.14.0/sqlctx/interchange/ossie/schemas/ontology/0.2.0.dev0-172a3e5/upstream.json +339 -0
  346. sqlctx-0.14.0/sqlctx/interchange/ossie/schemas/ontology/0.2.0.dev0-b6c702e/schema.json +341 -0
  347. sqlctx-0.14.0/sqlctx/interchange/ossie/schemas/ontology/0.2.0.dev0-b6c702e/upstream.json +314 -0
  348. sqlctx-0.14.0/sqlctx/interchange/ossie/semantic_validation.py +1148 -0
  349. sqlctx-0.14.0/sqlctx/interchange/ossie/serialization.py +271 -0
  350. sqlctx-0.14.0/sqlctx/interchange/ossie/synthesis.py +990 -0
  351. sqlctx-0.14.0/sqlctx/interchange/ossie/validation.py +695 -0
  352. sqlctx-0.14.0/sqlctx/loaders.py +1852 -0
  353. sqlctx-0.14.0/sqlctx/lsp/__init__.py +5 -0
  354. sqlctx-0.14.0/sqlctx/lsp/server.py +1068 -0
  355. sqlctx-0.14.0/sqlctx/man/sqlctx.1 +962 -0
  356. sqlctx-0.14.0/sqlctx/manpage.py +137 -0
  357. sqlctx-0.14.0/sqlctx/mcp_server.py +1327 -0
  358. sqlctx-0.14.0/sqlctx/paths.py +22 -0
  359. sqlctx-0.14.0/sqlctx/project.py +299 -0
  360. sqlctx-0.14.0/sqlctx/quickstart.py +253 -0
  361. sqlctx-0.14.0/sqlctx/runtime.py +12 -0
  362. sqlctx-0.14.0/sqlctx/rust_bridge.py +2011 -0
  363. sqlctx-0.14.0/sqlctx/rust_parity.py +73 -0
  364. sqlctx-0.14.0/sqlctx/schema.py +144 -0
  365. sqlctx-0.14.0/sqlctx/semantic_handoff.py +150 -0
  366. sqlctx-0.14.0/sqlctx/server/__init__.py +1 -0
  367. sqlctx-0.14.0/sqlctx/server/common.py +312 -0
  368. sqlctx-0.14.0/sqlctx/server/connection.py +557 -0
  369. sqlctx-0.14.0/sqlctx/server/pg_catalog.py +372 -0
  370. sqlctx-0.14.0/sqlctx/server/server.py +196 -0
  371. sqlctx-0.14.0/sqlctx/sql/aggregation_detection.py +52 -0
  372. sqlctx-0.14.0/sqlctx/sql/fragment.py +292 -0
  373. sqlctx-0.14.0/sqlctx/sql/frozen_time.py +293 -0
  374. sqlctx-0.14.0/sqlctx/sql/generator.py +8689 -0
  375. sqlctx-0.14.0/sqlctx/sql/lookml_expression.py +944 -0
  376. sqlctx-0.14.0/sqlctx/sql/order_by.py +26 -0
  377. sqlctx-0.14.0/sqlctx/sql/ossie_discovery.py +183 -0
  378. sqlctx-0.14.0/sqlctx/sql/ossie_query.py +13 -0
  379. sqlctx-0.14.0/sqlctx/sql/ossie_relational.py +1502 -0
  380. sqlctx-0.14.0/sqlctx/sql/ossie_views.py +344 -0
  381. sqlctx-0.14.0/sqlctx/sql/ossie_wide.py +690 -0
  382. sqlctx-0.14.0/sqlctx/sql/parsing.py +43 -0
  383. sqlctx-0.14.0/sqlctx/sql/planner.py +85 -0
  384. sqlctx-0.14.0/sqlctx/sql/query_rewriter.py +7333 -0
  385. sqlctx-0.14.0/sqlctx/sql/rendering.py +79 -0
  386. sqlctx-0.14.0/sqlctx/sql/selected_table_calculations.py +192 -0
  387. sqlctx-0.14.0/sqlctx/sql/table_calc_processor.py +329 -0
  388. sqlctx-0.14.0/sqlctx/testing.py +313 -0
  389. sqlctx-0.14.0/sqlctx/ui/static/assets/index-DBXs5BBH.css +1 -0
  390. sqlctx-0.14.0/sqlctx/ui/static/assets/index-jPypzafc.js +55 -0
  391. sqlctx-0.14.0/sqlctx/ui/static/index.html +13 -0
  392. sqlctx-0.14.0/sqlctx/validation.py +963 -0
  393. sqlctx-0.14.0/sqlctx/validation_runner.py +131 -0
  394. sqlctx-0.14.0/sqlctx/vendor_assets.py +39 -0
  395. sqlctx-0.14.0/sqlctx/viz.py +5004 -0
  396. sqlctx-0.14.0/sqlctx/widget/__init__.py +24 -0
  397. sqlctx-0.14.0/sqlctx/widget/_auto_model.py +149 -0
  398. sqlctx-0.14.0/sqlctx/widget/_data_registry.py +85 -0
  399. sqlctx-0.14.0/sqlctx/widget/_widget.py +1059 -0
  400. sqlctx-0.14.0/sqlctx/widget/static/widget.css +516 -0
  401. sqlctx-0.14.0/sqlctx/widget/static/widget.js +40 -0
  402. sqlctx-0.14.0/sqlctx/workbench/__init__.py +53 -0
  403. sqlctx-0.14.0/sqlctx/workbench/app.py +905 -0
  404. sqlctx-0.14.0/sqlctx/workbench/examples.py +34 -0
  405. sqlctx-0.14.0/sqlctx/workbench/validation_app.py +109 -0
  406. sqlctx-0.14.0/sqlctx/yaml_compat.py +22 -0
  407. sqlctx-0.14.0/sqlctx-schema.json +6078 -0
  408. sqlctx-0.14.0/sqlctx-wasm/.gitignore +7 -0
  409. sqlctx-0.14.0/sqlctx-wasm/.npmignore +6 -0
  410. sqlctx-0.14.0/sqlctx-wasm/LICENSE +661 -0
  411. sqlctx-0.14.0/sqlctx-wasm/README.md +133 -0
  412. sqlctx-0.14.0/sqlctx-wasm/adapters/params.d.ts +7 -0
  413. sqlctx-0.14.0/sqlctx-wasm/adapters/params.js +29 -0
  414. sqlctx-0.14.0/sqlctx-wasm/adapters/serve.d.ts +34 -0
  415. sqlctx-0.14.0/sqlctx-wasm/adapters/serve.js +78 -0
  416. sqlctx-0.14.0/sqlctx-wasm/adapters/wasm.d.ts +31 -0
  417. sqlctx-0.14.0/sqlctx-wasm/adapters/wasm.js +36 -0
  418. sqlctx-0.14.0/sqlctx-wasm/bin/sqlctx-codegen.js +70 -0
  419. sqlctx-0.14.0/sqlctx-wasm/client.d.ts +216 -0
  420. sqlctx-0.14.0/sqlctx-wasm/client.js +99 -0
  421. sqlctx-0.14.0/sqlctx-wasm/codegen.d.ts +29 -0
  422. sqlctx-0.14.0/sqlctx-wasm/codegen.js +428 -0
  423. sqlctx-0.14.0/sqlctx-wasm/index.d.ts +59 -0
  424. sqlctx-0.14.0/sqlctx-wasm/index.js +69 -0
  425. sqlctx-0.14.0/sqlctx-wasm/scripts/build.sh +62 -0
  426. sqlctx-0.14.0/sqlctx-wasm/scripts/package_consumer.mjs +65 -0
  427. sqlctx-0.14.0/sqlctx-wasm/scripts/smoke.mjs +123 -0
  428. sqlctx-0.14.0/sqlctx-wasm/scripts/smoke_client.mjs +160 -0
  429. sqlctx-0.14.0/sqlctx-wasm/scripts/smoke_codegen.mjs +244 -0
  430. sqlctx-0.14.0/sqlctx-wasm/scripts/smoke_package.mjs +27 -0
  431. sqlctx-0.14.0/sqlctx-wasm/scripts/smoke_vite.mjs +56 -0
  432. sqlctx-0.14.0/sqlctx-wasm/vite.d.ts +26 -0
  433. sqlctx-0.14.0/sqlctx-wasm/vite.js +102 -0
  434. sqlctx-0.14.0/vscode-sqlctx/package.json +100 -0
  435. sqlctx-0.14.0/webapp/.gitignore +8 -0
  436. sqlctx-0.14.0/webapp/README.md +104 -0
  437. sqlctx-0.14.0/webapp/bun.lock +473 -0
  438. sqlctx-0.14.0/webapp/dist/assets/index-DBXs5BBH.css +1 -0
  439. sqlctx-0.14.0/webapp/dist/assets/index-jPypzafc.js +55 -0
  440. sqlctx-0.14.0/webapp/dist/index.html +13 -0
  441. sqlctx-0.14.0/webapp/index.html +12 -0
  442. sqlctx-0.14.0/webapp/package.json +35 -0
  443. sqlctx-0.14.0/webapp/playwright.config.ts +30 -0
  444. sqlctx-0.14.0/webapp/playwright.ui.config.ts +16 -0
  445. sqlctx-0.14.0/webapp/postcss.config.js +6 -0
  446. sqlctx-0.14.0/webapp/src/App.tsx +326 -0
  447. sqlctx-0.14.0/webapp/src/components/AddFilter.tsx +85 -0
  448. sqlctx-0.14.0/webapp/src/components/AppBrand.test.tsx +26 -0
  449. sqlctx-0.14.0/webapp/src/components/AppBrand.tsx +33 -0
  450. sqlctx-0.14.0/webapp/src/components/AppShell.tsx +166 -0
  451. sqlctx-0.14.0/webapp/src/components/BarLineCombo.tsx +152 -0
  452. sqlctx-0.14.0/webapp/src/components/Button.tsx +29 -0
  453. sqlctx-0.14.0/webapp/src/components/Catalog.tsx +153 -0
  454. sqlctx-0.14.0/webapp/src/components/ChartTooltip.tsx +62 -0
  455. sqlctx-0.14.0/webapp/src/components/ColumnChart.tsx +114 -0
  456. sqlctx-0.14.0/webapp/src/components/Combobox.test.tsx +37 -0
  457. sqlctx-0.14.0/webapp/src/components/Combobox.tsx +189 -0
  458. sqlctx-0.14.0/webapp/src/components/DashboardShell.tsx +25 -0
  459. sqlctx-0.14.0/webapp/src/components/DataTable.test.tsx +46 -0
  460. sqlctx-0.14.0/webapp/src/components/DataTable.tsx +218 -0
  461. sqlctx-0.14.0/webapp/src/components/DatePicker.test.tsx +36 -0
  462. sqlctx-0.14.0/webapp/src/components/DatePicker.tsx +198 -0
  463. sqlctx-0.14.0/webapp/src/components/DateRangeControl.tsx +176 -0
  464. sqlctx-0.14.0/webapp/src/components/DistributionAdapters.tsx +32 -0
  465. sqlctx-0.14.0/webapp/src/components/DonutChart.test.tsx +44 -0
  466. sqlctx-0.14.0/webapp/src/components/DonutChart.tsx +129 -0
  467. sqlctx-0.14.0/webapp/src/components/ErrorBoundary.tsx +42 -0
  468. sqlctx-0.14.0/webapp/src/components/FilterEditor.tsx +282 -0
  469. sqlctx-0.14.0/webapp/src/components/FilterPill.tsx +68 -0
  470. sqlctx-0.14.0/webapp/src/components/GrainSelect.tsx +30 -0
  471. sqlctx-0.14.0/webapp/src/components/HeatmapChart.tsx +0 -0
  472. sqlctx-0.14.0/webapp/src/components/HistogramChart.test.ts +24 -0
  473. sqlctx-0.14.0/webapp/src/components/HistogramChart.tsx +110 -0
  474. sqlctx-0.14.0/webapp/src/components/Leaderboard.test.tsx +37 -0
  475. sqlctx-0.14.0/webapp/src/components/Leaderboard.tsx +165 -0
  476. sqlctx-0.14.0/webapp/src/components/LeaderboardPanel.tsx +198 -0
  477. sqlctx-0.14.0/webapp/src/components/MetricCard.test.tsx +22 -0
  478. sqlctx-0.14.0/webapp/src/components/MetricCard.tsx +119 -0
  479. sqlctx-0.14.0/webapp/src/components/MetricTimeSeries.tsx +81 -0
  480. sqlctx-0.14.0/webapp/src/components/NetworkChart.test.ts +38 -0
  481. sqlctx-0.14.0/webapp/src/components/NetworkChart.tsx +0 -0
  482. sqlctx-0.14.0/webapp/src/components/QueryDebugPanel.test.ts +25 -0
  483. sqlctx-0.14.0/webapp/src/components/QueryDebugPanel.tsx +113 -0
  484. sqlctx-0.14.0/webapp/src/components/RowPreviewDrawer.test.ts +13 -0
  485. sqlctx-0.14.0/webapp/src/components/RowPreviewDrawer.tsx +87 -0
  486. sqlctx-0.14.0/webapp/src/components/ScatterChart.tsx +138 -0
  487. sqlctx-0.14.0/webapp/src/components/Select.tsx +40 -0
  488. sqlctx-0.14.0/webapp/src/components/Sparkline.tsx +153 -0
  489. sqlctx-0.14.0/webapp/src/components/StackedAreaChart.tsx +153 -0
  490. sqlctx-0.14.0/webapp/src/components/States.tsx +45 -0
  491. sqlctx-0.14.0/webapp/src/components/Switch.tsx +37 -0
  492. sqlctx-0.14.0/webapp/src/components/Tabs.test.tsx +25 -0
  493. sqlctx-0.14.0/webapp/src/components/Tabs.tsx +31 -0
  494. sqlctx-0.14.0/webapp/src/components/ThemeToggle.tsx +26 -0
  495. sqlctx-0.14.0/webapp/src/components/TimeSeriesChart.tsx +295 -0
  496. sqlctx-0.14.0/webapp/src/components/TimezoneSelect.tsx +102 -0
  497. sqlctx-0.14.0/webapp/src/components/Tooltip.test.tsx +34 -0
  498. sqlctx-0.14.0/webapp/src/components/Tooltip.tsx +25 -0
  499. sqlctx-0.14.0/webapp/src/components/ViewSwitcher.tsx +47 -0
  500. sqlctx-0.14.0/webapp/src/components/WaterfallChart.test.ts +27 -0
  501. sqlctx-0.14.0/webapp/src/components/WaterfallChart.tsx +136 -0
  502. sqlctx-0.14.0/webapp/src/components/useFilterPopover.ts +40 -0
  503. sqlctx-0.14.0/webapp/src/data/arrow.test.ts +72 -0
  504. sqlctx-0.14.0/webapp/src/data/arrow.ts +41 -0
  505. sqlctx-0.14.0/webapp/src/data/backend.ts +19 -0
  506. sqlctx-0.14.0/webapp/src/data/dashboardTypes.ts +90 -0
  507. sqlctx-0.14.0/webapp/src/data/httpAdapter.test.ts +98 -0
  508. sqlctx-0.14.0/webapp/src/data/httpAdapter.ts +239 -0
  509. sqlctx-0.14.0/webapp/src/data/types.test.ts +14 -0
  510. sqlctx-0.14.0/webapp/src/data/types.ts +0 -0
  511. sqlctx-0.14.0/webapp/src/index.css +251 -0
  512. sqlctx-0.14.0/webapp/src/lib/catalog.test.ts +54 -0
  513. sqlctx-0.14.0/webapp/src/lib/catalog.ts +231 -0
  514. sqlctx-0.14.0/webapp/src/lib/dashboard.test.ts +410 -0
  515. sqlctx-0.14.0/webapp/src/lib/dashboard.ts +134 -0
  516. sqlctx-0.14.0/webapp/src/lib/format.test.ts +72 -0
  517. sqlctx-0.14.0/webapp/src/lib/format.ts +94 -0
  518. sqlctx-0.14.0/webapp/src/lib/queries.test.ts +264 -0
  519. sqlctx-0.14.0/webapp/src/lib/queries.ts +280 -0
  520. sqlctx-0.14.0/webapp/src/lib/rows.test.ts +70 -0
  521. sqlctx-0.14.0/webapp/src/lib/rows.ts +0 -0
  522. sqlctx-0.14.0/webapp/src/lib/theme.ts +85 -0
  523. sqlctx-0.14.0/webapp/src/lib/time.test.ts +153 -0
  524. sqlctx-0.14.0/webapp/src/lib/time.ts +234 -0
  525. sqlctx-0.14.0/webapp/src/lib/timezones.ts +66 -0
  526. sqlctx-0.14.0/webapp/src/lib/uiCore.d.ts +23 -0
  527. sqlctx-0.14.0/webapp/src/lib/uiCore.js +91 -0
  528. sqlctx-0.14.0/webapp/src/lib/uiCore.test.ts +49 -0
  529. sqlctx-0.14.0/webapp/src/lib/viewport.test.ts +75 -0
  530. sqlctx-0.14.0/webapp/src/lib/viewport.ts +50 -0
  531. sqlctx-0.14.0/webapp/src/lib/viz.ts +27 -0
  532. sqlctx-0.14.0/webapp/src/main.tsx +24 -0
  533. sqlctx-0.14.0/webapp/src/state/ExplorerContext.test.tsx +194 -0
  534. sqlctx-0.14.0/webapp/src/state/ExplorerContext.tsx +122 -0
  535. sqlctx-0.14.0/webapp/src/state/dashboardState.test.ts +531 -0
  536. sqlctx-0.14.0/webapp/src/state/dashboardState.ts +587 -0
  537. sqlctx-0.14.0/webapp/src/state/explorerState.test.ts +269 -0
  538. sqlctx-0.14.0/webapp/src/state/explorerState.ts +251 -0
  539. sqlctx-0.14.0/webapp/src/state/queryActivity.ts +29 -0
  540. sqlctx-0.14.0/webapp/src/state/url.test.ts +189 -0
  541. sqlctx-0.14.0/webapp/src/state/url.ts +174 -0
  542. sqlctx-0.14.0/webapp/src/state/useQueryResult.test.tsx +65 -0
  543. sqlctx-0.14.0/webapp/src/state/useQueryResult.ts +65 -0
  544. sqlctx-0.14.0/webapp/src/static-api.tsx +238 -0
  545. sqlctx-0.14.0/webapp/src/ui.ts +78 -0
  546. sqlctx-0.14.0/webapp/src/views/ComponentGallery.tsx +411 -0
  547. sqlctx-0.14.0/webapp/src/views/DashboardDocumentView.tsx +625 -0
  548. sqlctx-0.14.0/webapp/src/views/ExploreIndexView.tsx +57 -0
  549. sqlctx-0.14.0/webapp/src/views/ExplorerView.integration.test.tsx +52 -0
  550. sqlctx-0.14.0/webapp/src/views/ExplorerView.test.ts +90 -0
  551. sqlctx-0.14.0/webapp/src/views/ExplorerView.tsx +388 -0
  552. sqlctx-0.14.0/webapp/src/views/PivotView.tsx +102 -0
  553. sqlctx-0.14.0/webapp/src/views/TypographyGallery.tsx +327 -0
  554. sqlctx-0.14.0/webapp/tailwind.config.ts +49 -0
  555. sqlctx-0.14.0/webapp/tests/dashboard.spec.ts +107 -0
  556. sqlctx-0.14.0/webapp/tests/date-default.spec.ts +47 -0
  557. sqlctx-0.14.0/webapp/tests/explorer.spec.ts +247 -0
  558. sqlctx-0.14.0/webapp/tests/filter-escaping.spec.ts +40 -0
  559. sqlctx-0.14.0/webapp/tests/filter-popovers.spec.ts +156 -0
  560. sqlctx-0.14.0/webapp/tests/fixtures/dashboard.yml +70 -0
  561. sqlctx-0.14.0/webapp/tests/joined-dimensions.spec.ts +118 -0
  562. sqlctx-0.14.0/webapp/tests/widget.spec.ts +113 -0
  563. sqlctx-0.14.0/webapp/tsconfig.json +26 -0
  564. sqlctx-0.14.0/webapp/vite.config.ts +29 -0
  565. sqlctx-0.1.6/PKG-INFO +0 -69
  566. sqlctx-0.1.6/README.md +0 -51
  567. sqlctx-0.1.6/pyproject.toml +0 -21
  568. sqlctx-0.1.6/setup.cfg +0 -4
  569. sqlctx-0.1.6/src/cli_commands.py +0 -31
  570. sqlctx-0.1.6/src/db_utils.py +0 -394
  571. sqlctx-0.1.6/src/main.py +0 -17
  572. sqlctx-0.1.6/src/mcp_server.py +0 -57
  573. sqlctx-0.1.6/src/sqlctx.egg-info/PKG-INFO +0 -69
  574. sqlctx-0.1.6/src/sqlctx.egg-info/SOURCES.txt +0 -13
  575. sqlctx-0.1.6/src/sqlctx.egg-info/entry_points.txt +0 -2
  576. sqlctx-0.1.6/src/sqlctx.egg-info/requires.txt +0 -10
  577. sqlctx-0.1.6/src/sqlctx.egg-info/top_level.txt +0 -4
  578. /sqlctx-0.1.6/src/sqlctx.egg-info/dependency_links.txt → /sqlctx-0.14.0/sqlctx/py.typed +0 -0
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "sidequery",
3
+ "interface": {
4
+ "displayName": "Sidequery"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "name": "sqlctx",
9
+ "source": {
10
+ "source": "local",
11
+ "path": "./plugins/sqlctx"
12
+ },
13
+ "policy": {
14
+ "installation": "AVAILABLE",
15
+ "authentication": "ON_INSTALL"
16
+ },
17
+ "category": "Data & Analytics"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1 @@
1
+ 1.4.0
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "sidequery",
3
+ "owner": {
4
+ "name": "Sidequery",
5
+ "email": "hello@sidemantic.com"
6
+ },
7
+ "plugins": [
8
+ {
9
+ "name": "sqlctx",
10
+ "source": "./plugins/sqlctx",
11
+ "description": "Build, validate, and query sqlctx semantic models, and generate analytics webapps from them. Ships the modeler and webapp-builder skills."
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,26 @@
1
+ .git
2
+ .github
3
+ .venv
4
+ .mypy_cache
5
+ .pytest_cache
6
+ .ruff_cache
7
+ __pycache__
8
+ *.egg-info
9
+ *.pyc
10
+
11
+ # Rust/DuckDB extension builds (not needed for Python image)
12
+ sqlctx-rs/
13
+ sqlctx-duckdb/
14
+
15
+ # Docs and examples not needed at runtime
16
+ docs/
17
+ examples/superset_demo/
18
+ examples/rill_demo/
19
+ examples/cube_demo/
20
+
21
+ # Dev/test artifacts
22
+ Dockerfile.test
23
+ docker-compose.yml
24
+ *.md
25
+ !README.md
26
+ .context/
@@ -0,0 +1,63 @@
1
+ docs/_site
2
+ # Local preview/runtime artifacts
3
+ .quarto-preview.log
4
+ .quarto-preview.pid
5
+ .marimo-server.log
6
+ .marimo-server.pid
7
+ .playwright-mcp/
8
+
9
+ # Python caches
10
+ __pycache__/
11
+ *.py[cod]
12
+
13
+ # Coverage reports
14
+ .coverage
15
+ htmlcov/
16
+
17
+ # Virtual envs
18
+ .venv/
19
+
20
+ # OS/editor cruft
21
+ .DS_Store
22
+ .idea/
23
+ .vscode/
24
+ .wrangler/
25
+
26
+ # Local example DBs
27
+ examples/*.db
28
+ examples/.ipynb_checkpoints/
29
+ examples/juv.tmp*.py
30
+
31
+ # Local parquet files (large demo data)
32
+ /le_places.parquet
33
+ /categories.parquet
34
+
35
+ # Package installers
36
+ *.pkg
37
+ .claude/settings.local.json
38
+ crates/dax-pyo3/python/sqlctx_dax/_native*.so
39
+
40
+ # Docker volumes
41
+ docker-compose.override.yml
42
+ Dockerfile.test
43
+ sqlctx_definitions.sql
44
+
45
+ # Node.js (for bun tests)
46
+ node_modules/
47
+ bun.lockb
48
+ package.json
49
+ !js/package.json
50
+ !js/bun.lock
51
+ !webapp/package.json
52
+ !sqlctx/apps/web/package.json
53
+ !vscode-sqlctx/package.json
54
+
55
+ # Rust workspace build artifacts (dax local wheel builds)
56
+ /target/
57
+
58
+ # GitHub Actions compiler cache and Cargo shim
59
+ /.ci-mbx/
60
+ /.ci-cache-bin/
61
+
62
+ # Editor indexes
63
+ **/.cache/clangd/
@@ -0,0 +1,133 @@
1
+ # sqlctx
2
+
3
+ Universal SQL-first semantic layer in Python. Imports from Cube/LookML/dbt/Hex/Rill/Malloy, queries against DuckDB/Postgres/BigQuery/Snowflake/etc.
4
+
5
+ ## Usage Preference (Important)
6
+
7
+ - sqlctx usage is overwhelmingly CLI-first in practice (roughly 95% CLI usage).
8
+ - Default to `sqlctx` CLI workflows (`validate`, `info`, `query`, `migrate`, etc.).
9
+ - Treat Python API examples as secondary, advanced automation paths, not the default onboarding path.
10
+
11
+ ## Codebase Structure
12
+
13
+ **Main Python package:** `sqlctx/`
14
+ - `core/` - SemanticLayer, Model, Dimension, Metric, SemanticGraph
15
+ - `adapters/` - Format parsers (Cube, LookML, MetricFlow, Hex, Rill, Malloy, etc.)
16
+ - `db/` - Database adapters
17
+ - `sql/` - SQL generation and query rewriting
18
+ - `widget/`, `server/`, `workbench/`, `mcp_server.py` - Optional features with lazy imports
19
+
20
+ **Rust runtime and DuckDB extension (experimental):**
21
+ - `sqlctx-rs/` - Rust native runtime, also built as the `sqlctx-rs` Python extension. Python opts in through `sqlctx/rust_bridge.py`, the optional `rust` extra, and `--engine rust|auto`; Python stays the default engine (see `docs/rust-engine-mode.md`).
22
+ - `sqlctx-duckdb/` - DuckDB extension wrapping sqlctx-rs
23
+
24
+ CI runs the Rust and DuckDB jobs when their dirs change, and the Rust jobs also when the Python code they exercise changes (bridge, core, SQL, CLI; see the paths filter in `.github/workflows/ci.yml`).
25
+
26
+ ## Version Management
27
+
28
+ Update BOTH when releasing:
29
+ - `pyproject.toml`: `version = "X.Y.Z"`
30
+ - `sqlctx/__init__.py`: `__version__ = "X.Y.Z"`
31
+
32
+ ## Validation Before Commits
33
+
34
+ Match validation scope to the change instead of running the entire suite automatically.
35
+
36
+ - For small, localized changes, run ruff on the changed Python files and the narrowest relevant tests. This is the default.
37
+ - Expand to the affected package or subsystem when shared code, planners, adapters, or fixtures may have broader impact.
38
+ - Run the full CI-equivalent sequence only when explicitly requested, preparing a release, changing dependencies/CI/tooling, making a broad cross-cutting refactor, or when targeted checks cannot bound the blast radius.
39
+ - Do not rerun the full suite for a small follow-up on a branch that already had a green full run when targeted tests cover the follow-up.
40
+ - Before handoff, report exactly what ran and what was left to CI.
41
+
42
+ When full CI parity is warranted, run these commands in order:
43
+
44
+ ```bash
45
+ # Run these in order:
46
+ uv sync --extra dev
47
+ uv run python - <<'PY'
48
+ import sys
49
+
50
+ from sqlctx import Dimension, Metric, Model
51
+
52
+ assert Model.__name__ == "Model"
53
+ assert Dimension.__name__ == "Dimension"
54
+ assert Metric.__name__ == "Metric"
55
+ assert "sqlctx_dax" not in sys.modules
56
+ PY
57
+ uv sync --extra dev --extra dax
58
+ uv run ruff check . --exclude docs/_extensions --exclude sqlctx-duckdb/extension-ci-tools --exclude sqlctx-duckdb/scripts --exclude sqlctx-duckdb/duckdb --exclude sqlctx/adapters/malloy_grammar --exclude sqlctx/adapters/holistics_grammar
59
+ uv run ruff format --check . --exclude docs/_extensions --exclude sqlctx-duckdb/extension-ci-tools --exclude sqlctx-duckdb/scripts --exclude sqlctx-duckdb/duckdb --exclude sqlctx/adapters/malloy_grammar --exclude sqlctx/adapters/holistics_grammar
60
+ uv run python -m playwright install --with-deps chromium
61
+ uv run pytest -v
62
+ ```
63
+
64
+ If any fail, fix them:
65
+ ```bash
66
+ # Fix ruff issues
67
+ uv run ruff check --fix . --exclude docs/_extensions --exclude sqlctx-duckdb/extension-ci-tools --exclude sqlctx-duckdb/scripts --exclude sqlctx-duckdb/duckdb --exclude sqlctx/adapters/malloy_grammar --exclude sqlctx/adapters/holistics_grammar
68
+ uv run ruff format . --exclude docs/_extensions --exclude sqlctx-duckdb/extension-ci-tools --exclude sqlctx-duckdb/scripts --exclude sqlctx-duckdb/duckdb --exclude sqlctx/adapters/malloy_grammar --exclude sqlctx/adapters/holistics_grammar
69
+ ```
70
+
71
+ **PRs:** Do not include test commands in PR bodies unless explicitly requested.
72
+
73
+ **Why this matters:**
74
+ - Targeted checks keep small changes fast while still covering the affected behavior
75
+ - CI runs the full matrix and remains the final integration gate
76
+ - CI installs with `uv sync --extra dev`, so ruff and other CI tools must be in `[project.optional-dependencies] dev`
77
+ - `[dependency-groups] dev` alone is not enough (uv-only; CI reads the `dev` extra)
78
+
79
+ ## Dependency Management
80
+
81
+ - Use `uv` for all Python package management
82
+ - Dev tools such as ruff go in the `dev` extra (`[project.optional-dependencies] dev`); `[dependency-groups] dev` mirrors them for local uv use
83
+ - DO NOT add dev tools to main dependencies unless explicitly requested
84
+ - Optional features use `[project.optional-dependencies]`:
85
+ - `workbench` - textual, plotext, textual-plotext (for TUI, NOT Pyodide compatible)
86
+ - `serve` - riffq, pyarrow (for the PostgreSQL wire server, `sqlctx server postgres`; NOT Pyodide compatible)
87
+ - `api` / `mcp` - fastapi, uvicorn, pyarrow / mcp[cli] (for `sqlctx serve`, `server api`, `server mcp`)
88
+ - `dev` - pytest, ruff, pandas, numpy (for development)
89
+
90
+ **CRITICAL: Pyodide Compatibility Rules**
91
+ - **Core dependencies** (in main `dependencies` list) MUST work in Pyodide/WASM
92
+ - **Optional dependencies** can use packages incompatible with Pyodide (textual, riffq, pyarrow, mcp)
93
+ - **ALL imports** of optional deps MUST be lazy (inside functions, NOT at module level)
94
+ - **Test**: `from sqlctx import Model, Dimension, Metric` must work without any optional deps
95
+
96
+ ## Pyodide Compatibility
97
+
98
+ **Import Structure:**
99
+ - `sqlctx/__init__.py` - Only imports core classes (Model, Dimension, etc.)
100
+ - `sqlctx/cli.py` - Imports typer (core dep) at top, workbench/server imports inside command functions
101
+ - `sqlctx/workbench/__init__.py` - Lazy imports textual inside `run_workbench()` function
102
+ - `sqlctx/server/` - Not imported by `sqlctx/__init__.py`; `server.py`/`connection.py` (riffq) load only for `sqlctx server postgres`, and the dependency-free `common.py` is shared with the API, MCP, and chart modules
103
+
104
+ **Pyodide install path** (`docs/pyodide.md`, `.github/workflows/pyodide-test.yml`):
105
+ - Pyodide's bundled `pydantic`, `pyyaml`, and `jinja2` are loaded first; `sqlglot`, `lkml`, and `inflect` are installed with `deps=False`
106
+ - Bundled Pyodide packages pin their own versions (including typing-extensions), so a core dep that needs newer versions breaks this path
107
+
108
+ **Version constraints with "PYODIDE:" comments are REQUIRED:**
109
+ - Heavy deps (textual, riffq, mcp) are optional to avoid Pyodide conflicts
110
+ - Pyodide CI builds local wheel and installs it with `deps=False`
111
+ - This ensures code changes are tested in Pyodide before publish
112
+ - If adding new core deps, check they work in Pyodide or make them optional
113
+
114
+ **If Pyodide CI fails:**
115
+ - Check if a dep version changed that requires newer typing-extensions
116
+ - Either constrain that dep OR update the install sequence in `docs/pyodide.md` and `pyodide-test.yml` together
117
+ - CI installs local wheel to test current code, not PyPI version
118
+
119
+ ## Testing
120
+
121
+ Use the validation scope above. Prefer focused test paths or test names for localized changes; reserve `uv run pytest -v` for cases that warrant full CI parity.
122
+
123
+ ## Publishing to PyPI
124
+
125
+ ```bash
126
+ gh workflow run publish.yml
127
+ ```
128
+
129
+ ## Common Mistakes to Avoid
130
+
131
+ 1. **Breaking ruff** - Always ensure ruff is installed in dev dependencies
132
+ 2. **Pyodide compatibility** - Keep heavy deps (textual, pygments) optional
133
+ 3. **Not linting** - Format and lint EVERY TIME before commit
@@ -0,0 +1 @@
1
+ @AGENTS.md
@@ -0,0 +1,27 @@
1
+ # Contributing
2
+
3
+ sqlctx is primarily developed by Sidequery Corporation. We're not actively seeking external contributions at this time.
4
+
5
+ If you find bugs, please open an issue with reproduction steps.
6
+
7
+ ## Development Setup
8
+
9
+ ```bash
10
+ uv sync --all-extras
11
+ uv run pytest
12
+ ```
13
+
14
+ ## Running Tests
15
+
16
+ ```bash
17
+ uv run pytest -v
18
+ ```
19
+
20
+ ## Code Style
21
+
22
+ We use `ruff` for linting and formatting:
23
+
24
+ ```bash
25
+ uv run ruff check .
26
+ uv run ruff format .
27
+ ```