sqlframe 1.6.3__tar.gz → 1.7.1__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.
- {sqlframe-1.6.3 → sqlframe-1.7.1}/Makefile +1 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/PKG-INFO +7 -2
- {sqlframe-1.6.3 → sqlframe-1.7.1}/README.md +5 -0
- sqlframe-1.7.1/blogs/add_chatgpt_support.md +101 -0
- sqlframe-1.7.1/blogs/images/add_chatgpt_support/adding_ai_to_meal.jpeg +0 -0
- sqlframe-1.7.1/blogs/images/add_chatgpt_support/hype_train.gif +0 -0
- sqlframe-1.7.1/blogs/images/add_chatgpt_support/marvin_paranoid_robot.gif +0 -0
- sqlframe-1.7.1/blogs/images/add_chatgpt_support/nonsense_sql.png +0 -0
- sqlframe-1.7.1/blogs/images/add_chatgpt_support/openai_full_rewrite.png +0 -0
- sqlframe-1.7.1/blogs/images/add_chatgpt_support/openai_replacing_cte_names.png +0 -0
- sqlframe-1.7.1/blogs/images/add_chatgpt_support/sqlglot_optimized_code.png +0 -0
- sqlframe-1.7.1/blogs/images/add_chatgpt_support/sunny_shake_head_no.gif +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/bigquery.md +2 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/duckdb.md +2 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/postgres.md +2 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/snowflake.md +2 -0
- sqlframe-1.7.1/docs/spark.md +505 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/standalone.md +2 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/mkdocs.yml +1 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/setup.py +4 -4
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/_version.py +2 -2
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/functions.py +19 -4
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/session.py +2 -1
- sqlframe-1.7.1/sqlframe/spark/__init__.py +23 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/spark/functions.py +1 -3
- sqlframe-1.7.1/sqlframe/spark/functions.pyi +244 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/spark/session.py +55 -13
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe.egg-info/PKG-INFO +7 -2
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe.egg-info/SOURCES.txt +11 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe.egg-info/requires.txt +3 -3
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/test_engine_session.py +1 -1
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/test_int_functions.py +18 -8
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/fixtures.py +7 -7
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/unit/standalone/test_functions.py +13 -7
- sqlframe-1.6.3/sqlframe/spark/__init__.py +0 -23
- {sqlframe-1.6.3 → sqlframe-1.7.1}/.github/CODEOWNERS +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/.github/workflows/main.workflow.yaml +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/.github/workflows/publish.workflow.yaml +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/.gitignore +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/.pre-commit-config.yaml +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/.readthedocs.yaml +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/LICENSE +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/blogs/images/but_wait_theres_more.gif +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/blogs/images/cake.gif +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/blogs/images/you_get_pyspark_api.gif +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/blogs/sqlframe_universal_dataframe_api.md +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/configuration.md +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/docs/bigquery.md +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/docs/duckdb.md +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/docs/images/SF.png +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/docs/images/favicon.png +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/docs/images/favicon_old.png +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/docs/images/sqlframe_diagram.png +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/docs/images/sqlframe_logo.png +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/docs/postgres.md +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/images/SF.png +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/images/favicon.png +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/images/favicon_old.png +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/images/sqlframe_diagram.png +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/images/sqlframe_logo.png +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/index.md +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/requirements.txt +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/docs/stylesheets/extra.css +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/pytest.ini +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/renovate.json +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/setup.cfg +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/LICENSE +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/_typing.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/catalog.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/column.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/dataframe.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/decorators.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/exceptions.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/function_alternatives.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/group.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/mixins/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/mixins/catalog_mixins.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/mixins/dataframe_mixins.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/mixins/readwriter_mixins.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/normalize.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/operations.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/readerwriter.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/transforms.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/types.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/util.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/base/window.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/bigquery/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/bigquery/catalog.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/bigquery/column.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/bigquery/dataframe.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/bigquery/functions.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/bigquery/functions.pyi +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/bigquery/group.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/bigquery/readwriter.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/bigquery/session.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/bigquery/types.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/bigquery/window.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/duckdb/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/duckdb/catalog.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/duckdb/column.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/duckdb/dataframe.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/duckdb/functions.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/duckdb/functions.pyi +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/duckdb/group.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/duckdb/readwriter.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/duckdb/session.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/duckdb/types.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/duckdb/window.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/postgres/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/postgres/catalog.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/postgres/column.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/postgres/dataframe.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/postgres/functions.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/postgres/functions.pyi +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/postgres/group.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/postgres/readwriter.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/postgres/session.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/postgres/types.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/postgres/window.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/redshift/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/redshift/catalog.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/redshift/column.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/redshift/dataframe.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/redshift/functions.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/redshift/group.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/redshift/readwriter.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/redshift/session.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/redshift/types.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/redshift/window.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/snowflake/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/snowflake/catalog.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/snowflake/column.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/snowflake/dataframe.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/snowflake/functions.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/snowflake/functions.pyi +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/snowflake/group.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/snowflake/readwriter.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/snowflake/session.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/snowflake/types.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/snowflake/window.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/spark/catalog.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/spark/column.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/spark/dataframe.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/spark/group.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/spark/readwriter.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/spark/types.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/spark/window.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/standalone/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/standalone/catalog.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/standalone/column.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/standalone/dataframe.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/standalone/functions.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/standalone/group.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/standalone/readwriter.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/standalone/session.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/standalone/types.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe/standalone/window.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe.egg-info/dependency_links.txt +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/sqlframe.egg-info/top_level.txt +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/common_fixtures.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/conftest.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/fixtures/employee.csv +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/fixtures/employee.json +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/fixtures/employee.parquet +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/fixtures/employee_extra_line.csv +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/bigquery/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/bigquery/test_bigquery_catalog.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/bigquery/test_bigquery_session.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/duck/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/duck/test_duckdb_catalog.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/duck/test_duckdb_dataframe.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/duck/test_duckdb_reader.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/duck/test_duckdb_session.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/postgres/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/postgres/test_postgres_catalog.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/postgres/test_postgres_dataframe.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/postgres/test_postgres_session.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/redshift/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/redshift/test_redshift_catalog.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/redshift/test_redshift_session.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/snowflake/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/snowflake/test_snowflake_catalog.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/snowflake/test_snowflake_session.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/spark/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/spark/test_spark_catalog.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/test_engine_dataframe.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/test_engine_reader.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/engines/test_engine_writer.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/test_int_dataframe.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/test_int_dataframe_stats.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/test_int_grouped_data.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/integration/test_int_session.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/types.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/unit/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/unit/standalone/__init__.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/unit/standalone/fixtures.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/unit/standalone/test_column.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/unit/standalone/test_dataframe.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/unit/standalone/test_dataframe_writer.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/unit/standalone/test_session.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/unit/standalone/test_session_case_sensitivity.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/unit/standalone/test_types.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/unit/standalone/test_window.py +0 -0
- {sqlframe-1.6.3 → sqlframe-1.7.1}/tests/unit/test_util.py +0 -0
|
@@ -30,6 +30,7 @@ stubs:
|
|
|
30
30
|
stubgen sqlframe/duckdb/functions.py --output ./ --inspect-mode
|
|
31
31
|
stubgen sqlframe/postgres/functions.py --output ./ --inspect-mode
|
|
32
32
|
stubgen sqlframe/snowflake/functions.py --output ./ --inspect-mode
|
|
33
|
+
stubgen sqlframe/spark/functions.py --output ./ --inspect-mode
|
|
33
34
|
|
|
34
35
|
package:
|
|
35
36
|
pip3 install wheel && python3 setup.py sdist bdist_wheel
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sqlframe
|
|
3
|
-
Version: 1.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 1.7.1
|
|
4
|
+
Summary: Turning PySpark Into a Universal DataFrame API
|
|
5
5
|
Home-page: https://github.com/eakmanrq/sqlframe
|
|
6
6
|
Author: Ryan Eakman
|
|
7
7
|
Author-email: eakmanrq@gmail.com
|
|
@@ -40,14 +40,17 @@ SQLFrame currently supports the following engines (many more in development):
|
|
|
40
40
|
* [DuckDB](https://sqlframe.readthedocs.io/en/stable/duckdb)
|
|
41
41
|
* [Postgres](https://sqlframe.readthedocs.io/en/stable/postgres)
|
|
42
42
|
* [Snowflake](https://sqlframe.readthedocs.io/en/stable/snowflake)
|
|
43
|
+
* [Spark](https://sqlframe.readthedocs.io/en/stable/spark)
|
|
43
44
|
|
|
44
45
|
SQLFrame also has a "Standalone" session that be used to generate SQL without any connection to a database engine.
|
|
46
|
+
|
|
45
47
|
* [Standalone](https://sqlframe.readthedocs.io/en/stable/standalone)
|
|
46
48
|
|
|
47
49
|
SQLFrame is great for:
|
|
48
50
|
|
|
49
51
|
* Users who want to run PySpark DataFrame code without having to use a Spark cluster
|
|
50
52
|
* Users who want a SQL representation of their DataFrame code for debugging or sharing with others
|
|
53
|
+
* See [Spark Engine](https://sqlframe.readthedocs.io/en/stable/spark/) for more details
|
|
51
54
|
* Users who want a DataFrame API that leverages the full power of their engine to do the processing
|
|
52
55
|
|
|
53
56
|
## Installation
|
|
@@ -61,6 +64,8 @@ pip install "sqlframe[duckdb]"
|
|
|
61
64
|
pip install "sqlframe[postgres]"
|
|
62
65
|
# Snowflake
|
|
63
66
|
pip install "sqlframe[snowflake]"
|
|
67
|
+
# Spark
|
|
68
|
+
pip install "sqlframe[spark]"
|
|
64
69
|
# Standalone
|
|
65
70
|
pip install sqlframe
|
|
66
71
|
```
|
|
@@ -10,14 +10,17 @@ SQLFrame currently supports the following engines (many more in development):
|
|
|
10
10
|
* [DuckDB](https://sqlframe.readthedocs.io/en/stable/duckdb)
|
|
11
11
|
* [Postgres](https://sqlframe.readthedocs.io/en/stable/postgres)
|
|
12
12
|
* [Snowflake](https://sqlframe.readthedocs.io/en/stable/snowflake)
|
|
13
|
+
* [Spark](https://sqlframe.readthedocs.io/en/stable/spark)
|
|
13
14
|
|
|
14
15
|
SQLFrame also has a "Standalone" session that be used to generate SQL without any connection to a database engine.
|
|
16
|
+
|
|
15
17
|
* [Standalone](https://sqlframe.readthedocs.io/en/stable/standalone)
|
|
16
18
|
|
|
17
19
|
SQLFrame is great for:
|
|
18
20
|
|
|
19
21
|
* Users who want to run PySpark DataFrame code without having to use a Spark cluster
|
|
20
22
|
* Users who want a SQL representation of their DataFrame code for debugging or sharing with others
|
|
23
|
+
* See [Spark Engine](https://sqlframe.readthedocs.io/en/stable/spark/) for more details
|
|
21
24
|
* Users who want a DataFrame API that leverages the full power of their engine to do the processing
|
|
22
25
|
|
|
23
26
|
## Installation
|
|
@@ -31,6 +34,8 @@ pip install "sqlframe[duckdb]"
|
|
|
31
34
|
pip install "sqlframe[postgres]"
|
|
32
35
|
# Snowflake
|
|
33
36
|
pip install "sqlframe[snowflake]"
|
|
37
|
+
# Spark
|
|
38
|
+
pip install "sqlframe[spark]"
|
|
34
39
|
# Standalone
|
|
35
40
|
pip install sqlframe
|
|
36
41
|
```
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Adding ChatGPT to SQLFrame - What is the Right Amount of AI?
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
<img src="images/add_chatgpt_support/adding_ai_to_meal.jpeg" alt="Adding AI to Meal" width="800"/>
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
Like many people today, I often grapple with how much AI to integrate into my daily tasks.
|
|
8
|
+
In my experience, AI can be a valuable tool for brainstorming when writing, but over-reliance on it can lead to generic text devoid of personality.
|
|
9
|
+
While I might be overly verbose and fond of metaphors, these quirks add character and make communication more engaging.
|
|
10
|
+
Take "Marvin the Paranoid Robot" from "Hitchhiker's Guide to the Galaxy," for instance.
|
|
11
|
+
His melancholic outlook makes him relatable to the audience, even though his intelligence is 50,000 times greater than ours.
|
|
12
|
+
|
|
13
|
+
<div align="center">
|
|
14
|
+
<img src="images/add_chatgpt_support/marvin_paranoid_robot.gif" alt="Sad Robot" width="800"/>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
When it comes to coding, I strive to eliminate imperfections as much as possible.
|
|
18
|
+
However, AI's tendency to hallucinate makes even a "trust but verify" approach challenging.
|
|
19
|
+
More often than not, especially when working with new libraries or languages, I find myself in a "that just can't be right, so let's move on" mindset.
|
|
20
|
+
|
|
21
|
+
<div align="center">
|
|
22
|
+
<img src="images/add_chatgpt_support/sunny_shake_head_no.gif" alt="Shake Head No" width="800"/>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
When I first considered integrating AI into SQLFrame, it immediately struck me as a bad idea.
|
|
26
|
+
Correctness and consistency are crucial attributes of the product.
|
|
27
|
+
It's one thing to say this, but I've backed it up by writing around 1,800 tests to cover PySpark functionality and ensure reliability.
|
|
28
|
+
Until AI improves significantly in this area, SQLFrame will continue to rely on and enhance its understanding of PySpark, ensuring it's available where people need it most.
|
|
29
|
+
|
|
30
|
+
I've received feedback that the SQL generated by SQLFrame can be hard to read, which is much appreciated feedback.
|
|
31
|
+
I realized that while my primary goal is to produce reliable SQL that runs consistently on my engine, readability is also crucial when sharing code with others.
|
|
32
|
+
Minor imperfections in the SQL are acceptable as long as they don't impede understanding. Large Language Models (LLMs) excel at understanding human communication and have been trained to interpret user intent.
|
|
33
|
+
Could SQLFrame leverage this capability?
|
|
34
|
+
Is it time for SQLFrame to join the AI hype train?
|
|
35
|
+
|
|
36
|
+
<div align="center">
|
|
37
|
+
<img src="images/add_chatgpt_support/hype_train.gif" alt="All aboard the train" width="800"/>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
Starting with [1.4.0](https://github.com/eakmanrq/sqlframe), you can now have SQLFrame enrich generated SQL using OpenAI.
|
|
41
|
+
Provide your API key and include `df.sql(openai_config={})` (to use defaults, [config options here](https://sqlframe.readthedocs.io/en/stable/configuration/#optimized)) when generating SQL to see what it looks like.
|
|
42
|
+
Let's take a look at the example from the README.
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
from sqlframe.bigquery import BigQuerySession
|
|
46
|
+
from sqlframe.bigquery import functions as F
|
|
47
|
+
from sqlframe.bigquery import Window
|
|
48
|
+
|
|
49
|
+
session = BigQuerySession()
|
|
50
|
+
table_path = "bigquery-public-data.samples.natality"
|
|
51
|
+
# Top 5 years with the greatest year-over-year % change in new families with single child
|
|
52
|
+
df = (
|
|
53
|
+
session.table(table_path)
|
|
54
|
+
.where(F.col("ever_born") == 1)
|
|
55
|
+
.groupBy("year")
|
|
56
|
+
.agg(F.count("*").alias("num_single_child_families"))
|
|
57
|
+
.withColumn(
|
|
58
|
+
"last_year_num_single_child_families",
|
|
59
|
+
F.lag(F.col("num_single_child_families"), 1).over(Window.orderBy("year"))
|
|
60
|
+
)
|
|
61
|
+
.withColumn(
|
|
62
|
+
"percent_change",
|
|
63
|
+
(F.col("num_single_child_families") - F.col("last_year_num_single_child_families"))
|
|
64
|
+
/ F.col("last_year_num_single_child_families")
|
|
65
|
+
)
|
|
66
|
+
.orderBy(F.abs(F.col("percent_change")).desc())
|
|
67
|
+
.select(
|
|
68
|
+
F.col("year").alias("year"),
|
|
69
|
+
F.format_number("num_single_child_families", 0).alias("new families single child"),
|
|
70
|
+
F.format_number(F.col("percent_change") * 100, 2).alias("percent change"),
|
|
71
|
+
)
|
|
72
|
+
.limit(5)
|
|
73
|
+
)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Next we will compare SQLGlot optimized, OpenAI replacing SQLGlot optimized CTE names, and then OpenAI doing a full rewrite.
|
|
77
|
+
|
|
78
|
+
<div align="center">
|
|
79
|
+
<img src="images/add_chatgpt_support/sqlglot_optimized_code.png" alt="SQLGlot optimized code" width="800"/>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<div align="center">
|
|
83
|
+
<img src="images/add_chatgpt_support/openai_replacing_cte_names.png" alt="OpenAI Replacing CTE Names" width="800"/>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<div align="center">
|
|
87
|
+
<img src="images/add_chatgpt_support/openai_full_rewrite.png" alt="OpenAI Full Rewrite" width="800"/>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
Overall, the results are promising and make me optimistic that SQLFrame can generate human-like SQL.
|
|
91
|
+
I believe the ideal approach would be to combine tuned SQLGlot optimization rules with OpenAI for tasks such as naming CTEs.
|
|
92
|
+
In the long term, it wouldn't surprise me if models are able to consistently convert accurate SQL into very human-friendly formats without needing any optimization assistance. 💪
|
|
93
|
+
If you are new to SQLFrame, checkout the [repo](https://github.com/eakmanrq/sqlframe) or [announcement blog post](https://towardsdev.com/sqlframe-turning-pyspark-into-a-universal-dataframe-api-e06a1c678f35). 🚀
|
|
94
|
+
If you want to see how I added this integration, checkout [part 1](https://www.loom.com/share/3fab8493818b46f7bff03faf101d2bb6?sid=ffc6a134-f465-478a-a453-7c69b296dc77) or [part 2](https://www.loom.com/share/4055e86dafdd406283d7ba0e0656f0c9?sid=ff0e2af4-1f5a-4760-bf10-9feb89ef9451) where I added this feature ([part 2](https://www.loom.com/share/4055e86dafdd406283d7ba0e0656f0c9?sid=ff0e2af4-1f5a-4760-bf10-9feb89ef9451) is shorter and I think better). 🍿
|
|
95
|
+
Final treat, I overrode the normal prompt with "turn the SQL into complete nonsense". The results:
|
|
96
|
+
|
|
97
|
+
<div align="center">
|
|
98
|
+
<img src="images/add_chatgpt_support/nonsense_sql.png" alt="OpenAI Full Rewrite" width="800"/>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
Nailed it.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -112,6 +112,8 @@ print(session.catalog.listColumns(table_path))
|
|
|
112
112
|
|
|
113
113
|
## Supported PySpark API Methods
|
|
114
114
|
|
|
115
|
+
See something that you would like to see supported? [Open an issue](https://github.com/eakmanrq/sqlframe/issues)!
|
|
116
|
+
|
|
115
117
|
### Catalog Class
|
|
116
118
|
|
|
117
119
|
* add_table
|