snowflake-sqlalchemy 1.5.1__tar.gz → 1.7.3__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 (137) hide show
  1. snowflake_sqlalchemy-1.7.3/.gitignore +112 -0
  2. snowflake_sqlalchemy-1.7.3/.gitmodules +0 -0
  3. snowflake_sqlalchemy-1.7.3/.pre-commit-config.yaml +54 -0
  4. {snowflake-sqlalchemy-1.5.1 → snowflake_sqlalchemy-1.7.3}/DESCRIPTION.md +54 -1
  5. snowflake_sqlalchemy-1.7.3/PKG-INFO +737 -0
  6. {snowflake-sqlalchemy-1.5.1 → snowflake_sqlalchemy-1.7.3}/README.md +245 -13
  7. snowflake_sqlalchemy-1.7.3/ci/build.sh +26 -0
  8. snowflake_sqlalchemy-1.7.3/ci/build_docker.sh +31 -0
  9. snowflake_sqlalchemy-1.7.3/ci/docker/sqlalchemy_build/Dockerfile +19 -0
  10. snowflake_sqlalchemy-1.7.3/ci/docker/sqlalchemy_build/scripts/entrypoint.sh +13 -0
  11. snowflake_sqlalchemy-1.7.3/ci/set_base_image.sh +17 -0
  12. snowflake_sqlalchemy-1.7.3/ci/test.sh +27 -0
  13. snowflake_sqlalchemy-1.7.3/ci/test_docker.sh +53 -0
  14. snowflake_sqlalchemy-1.7.3/ci/test_linux.sh +25 -0
  15. snowflake_sqlalchemy-1.7.3/license_header.txt +2 -0
  16. snowflake_sqlalchemy-1.7.3/pyproject.toml +143 -0
  17. snowflake_sqlalchemy-1.7.3/setup.cfg +3 -0
  18. snowflake_sqlalchemy-1.7.3/snyk/requirements.txt +2 -0
  19. snowflake_sqlalchemy-1.7.3/snyk/requiremtnts.txt +2 -0
  20. snowflake_sqlalchemy-1.7.3/snyk/update_requirements.py +17 -0
  21. {snowflake-sqlalchemy-1.5.1 → snowflake_sqlalchemy-1.7.3}/src/snowflake/sqlalchemy/__init__.py +52 -6
  22. {snowflake-sqlalchemy-1.5.1 → snowflake_sqlalchemy-1.7.3}/src/snowflake/sqlalchemy/_constants.py +3 -1
  23. {snowflake-sqlalchemy-1.5.1 → snowflake_sqlalchemy-1.7.3}/src/snowflake/sqlalchemy/base.py +201 -49
  24. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/compat.py +36 -0
  25. {snowflake-sqlalchemy-1.5.1 → snowflake_sqlalchemy-1.7.3}/src/snowflake/sqlalchemy/custom_commands.py +13 -5
  26. {snowflake-sqlalchemy-1.5.1 → snowflake_sqlalchemy-1.7.3}/src/snowflake/sqlalchemy/custom_types.py +54 -4
  27. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/exc.py +82 -0
  28. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/functions.py +16 -0
  29. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/parser/custom_type_parser.py +245 -0
  30. {snowflake-sqlalchemy-1.5.1 → snowflake_sqlalchemy-1.7.3}/src/snowflake/sqlalchemy/requirements.py +16 -0
  31. {snowflake-sqlalchemy-1.5.1 → snowflake_sqlalchemy-1.7.3}/src/snowflake/sqlalchemy/snowdialect.py +334 -208
  32. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/__init__.py +3 -0
  33. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/__init__.py +9 -0
  34. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/clustered_table.py +37 -0
  35. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/custom_table_base.py +127 -0
  36. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/custom_table_prefix.py +13 -0
  37. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/dynamic_table.py +117 -0
  38. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/hybrid_table.py +63 -0
  39. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/iceberg_table.py +102 -0
  40. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/options/__init__.py +33 -0
  41. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/options/as_query_option.py +63 -0
  42. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/options/cluster_by_option.py +58 -0
  43. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/options/identifier_option.py +63 -0
  44. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/options/invalid_table_option.py +25 -0
  45. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/options/keyword_option.py +65 -0
  46. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/options/keywords.py +14 -0
  47. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/options/literal_option.py +67 -0
  48. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/options/table_option.py +84 -0
  49. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/options/target_lag_option.py +94 -0
  50. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/snowflake_table.py +70 -0
  51. snowflake_sqlalchemy-1.7.3/src/snowflake/sqlalchemy/sql/custom_schema/table_from_query.py +54 -0
  52. {snowflake-sqlalchemy-1.5.1 → snowflake_sqlalchemy-1.7.3}/src/snowflake/sqlalchemy/util.py +18 -3
  53. {snowflake-sqlalchemy-1.5.1 → snowflake_sqlalchemy-1.7.3}/src/snowflake/sqlalchemy/version.py +1 -1
  54. snowflake_sqlalchemy-1.7.3/tested_requirements/requirements_310.reqs +19 -0
  55. snowflake_sqlalchemy-1.7.3/tested_requirements/requirements_37.reqs +22 -0
  56. snowflake_sqlalchemy-1.7.3/tested_requirements/requirements_38.reqs +19 -0
  57. snowflake_sqlalchemy-1.7.3/tested_requirements/requirements_39.reqs +19 -0
  58. snowflake_sqlalchemy-1.7.3/tests/README.rst +51 -0
  59. snowflake_sqlalchemy-1.7.3/tests/__init__.py +3 -0
  60. snowflake_sqlalchemy-1.7.3/tests/__snapshots__/test_compile_dynamic_table.ambr +13 -0
  61. snowflake_sqlalchemy-1.7.3/tests/__snapshots__/test_core.ambr +4 -0
  62. snowflake_sqlalchemy-1.7.3/tests/__snapshots__/test_orm.ambr +4 -0
  63. snowflake_sqlalchemy-1.7.3/tests/__snapshots__/test_reflect_dynamic_table.ambr +4 -0
  64. snowflake_sqlalchemy-1.7.3/tests/__snapshots__/test_structured_datatypes.ambr +249 -0
  65. snowflake_sqlalchemy-1.7.3/tests/__snapshots__/test_unit_structured_types.ambr +4 -0
  66. snowflake_sqlalchemy-1.7.3/tests/conftest.py +328 -0
  67. snowflake_sqlalchemy-1.7.3/tests/custom_tables/__init__.py +2 -0
  68. snowflake_sqlalchemy-1.7.3/tests/custom_tables/__snapshots__/test_compile_dynamic_table.ambr +40 -0
  69. snowflake_sqlalchemy-1.7.3/tests/custom_tables/__snapshots__/test_compile_hybrid_table.ambr +10 -0
  70. snowflake_sqlalchemy-1.7.3/tests/custom_tables/__snapshots__/test_compile_iceberg_table.ambr +19 -0
  71. snowflake_sqlalchemy-1.7.3/tests/custom_tables/__snapshots__/test_compile_snowflake_table.ambr +35 -0
  72. snowflake_sqlalchemy-1.7.3/tests/custom_tables/__snapshots__/test_create_dynamic_table.ambr +7 -0
  73. snowflake_sqlalchemy-1.7.3/tests/custom_tables/__snapshots__/test_create_hybrid_table.ambr +7 -0
  74. snowflake_sqlalchemy-1.7.3/tests/custom_tables/__snapshots__/test_create_iceberg_table.ambr +14 -0
  75. snowflake_sqlalchemy-1.7.3/tests/custom_tables/__snapshots__/test_create_snowflake_table.ambr +4 -0
  76. snowflake_sqlalchemy-1.7.3/tests/custom_tables/__snapshots__/test_generic_options.ambr +13 -0
  77. snowflake_sqlalchemy-1.7.3/tests/custom_tables/__snapshots__/test_reflect_hybrid_table.ambr +4 -0
  78. snowflake_sqlalchemy-1.7.3/tests/custom_tables/__snapshots__/test_reflect_snowflake_table.ambr +29 -0
  79. snowflake_sqlalchemy-1.7.3/tests/custom_tables/test_compile_dynamic_table.py +271 -0
  80. snowflake_sqlalchemy-1.7.3/tests/custom_tables/test_compile_hybrid_table.py +69 -0
  81. snowflake_sqlalchemy-1.7.3/tests/custom_tables/test_compile_iceberg_table.py +116 -0
  82. snowflake_sqlalchemy-1.7.3/tests/custom_tables/test_compile_snowflake_table.py +180 -0
  83. snowflake_sqlalchemy-1.7.3/tests/custom_tables/test_create_dynamic_table.py +124 -0
  84. snowflake_sqlalchemy-1.7.3/tests/custom_tables/test_create_hybrid_table.py +95 -0
  85. snowflake_sqlalchemy-1.7.3/tests/custom_tables/test_create_iceberg_table.py +43 -0
  86. snowflake_sqlalchemy-1.7.3/tests/custom_tables/test_create_snowflake_table.py +66 -0
  87. snowflake_sqlalchemy-1.7.3/tests/custom_tables/test_generic_options.py +83 -0
  88. snowflake_sqlalchemy-1.7.3/tests/custom_tables/test_reflect_dynamic_table.py +88 -0
  89. snowflake_sqlalchemy-1.7.3/tests/custom_tables/test_reflect_hybrid_table.py +65 -0
  90. snowflake_sqlalchemy-1.7.3/tests/custom_tables/test_reflect_snowflake_table.py +92 -0
  91. snowflake_sqlalchemy-1.7.3/tests/data/users.txt +8 -0
  92. snowflake_sqlalchemy-1.7.3/tests/sqlalchemy_test_suite/README.md +21 -0
  93. snowflake_sqlalchemy-1.7.3/tests/sqlalchemy_test_suite/__init__.py +3 -0
  94. snowflake_sqlalchemy-1.7.3/tests/sqlalchemy_test_suite/conftest.py +69 -0
  95. snowflake_sqlalchemy-1.7.3/tests/sqlalchemy_test_suite/test_suite.py +155 -0
  96. snowflake_sqlalchemy-1.7.3/tests/sqlalchemy_test_suite/test_suite_20.py +205 -0
  97. snowflake_sqlalchemy-1.7.3/tests/test_compiler.py +231 -0
  98. snowflake_sqlalchemy-1.7.3/tests/test_copy.py +448 -0
  99. snowflake_sqlalchemy-1.7.3/tests/test_core.py +1951 -0
  100. snowflake_sqlalchemy-1.7.3/tests/test_create.py +132 -0
  101. snowflake_sqlalchemy-1.7.3/tests/test_custom_functions.py +25 -0
  102. snowflake_sqlalchemy-1.7.3/tests/test_custom_types.py +67 -0
  103. snowflake_sqlalchemy-1.7.3/tests/test_geography.py +69 -0
  104. snowflake_sqlalchemy-1.7.3/tests/test_geometry.py +67 -0
  105. snowflake_sqlalchemy-1.7.3/tests/test_imports.py +64 -0
  106. snowflake_sqlalchemy-1.7.3/tests/test_index_reflection.py +68 -0
  107. snowflake_sqlalchemy-1.7.3/tests/test_multivalues_insert.py +43 -0
  108. snowflake_sqlalchemy-1.7.3/tests/test_orm.py +584 -0
  109. snowflake_sqlalchemy-1.7.3/tests/test_pandas.py +399 -0
  110. snowflake_sqlalchemy-1.7.3/tests/test_qmark.py +39 -0
  111. snowflake_sqlalchemy-1.7.3/tests/test_quote.py +63 -0
  112. snowflake_sqlalchemy-1.7.3/tests/test_quote_identifiers.py +43 -0
  113. snowflake_sqlalchemy-1.7.3/tests/test_semi_structured_datatypes.py +111 -0
  114. snowflake_sqlalchemy-1.7.3/tests/test_sequence.py +163 -0
  115. snowflake_sqlalchemy-1.7.3/tests/test_structured_datatypes.py +597 -0
  116. snowflake_sqlalchemy-1.7.3/tests/test_timestamp.py +83 -0
  117. snowflake_sqlalchemy-1.7.3/tests/test_transactions.py +157 -0
  118. snowflake_sqlalchemy-1.7.3/tests/test_unit_core.py +169 -0
  119. snowflake_sqlalchemy-1.7.3/tests/test_unit_cte.py +34 -0
  120. snowflake_sqlalchemy-1.7.3/tests/test_unit_structured_types.py +81 -0
  121. snowflake_sqlalchemy-1.7.3/tests/test_unit_types.py +23 -0
  122. snowflake_sqlalchemy-1.7.3/tests/test_unit_url.py +134 -0
  123. snowflake_sqlalchemy-1.7.3/tests/util.py +95 -0
  124. snowflake_sqlalchemy-1.7.3/tox.ini +140 -0
  125. snowflake-sqlalchemy-1.5.1/PKG-INFO +0 -312
  126. snowflake-sqlalchemy-1.5.1/setup.cfg +0 -84
  127. snowflake-sqlalchemy-1.5.1/setup.py +0 -17
  128. snowflake-sqlalchemy-1.5.1/src/snowflake_sqlalchemy.egg-info/PKG-INFO +0 -312
  129. snowflake-sqlalchemy-1.5.1/src/snowflake_sqlalchemy.egg-info/SOURCES.txt +0 -23
  130. snowflake-sqlalchemy-1.5.1/src/snowflake_sqlalchemy.egg-info/dependency_links.txt +0 -1
  131. snowflake-sqlalchemy-1.5.1/src/snowflake_sqlalchemy.egg-info/entry_points.txt +0 -2
  132. snowflake-sqlalchemy-1.5.1/src/snowflake_sqlalchemy.egg-info/not-zip-safe +0 -1
  133. snowflake-sqlalchemy-1.5.1/src/snowflake_sqlalchemy.egg-info/requires.txt +0 -17
  134. snowflake-sqlalchemy-1.5.1/src/snowflake_sqlalchemy.egg-info/top_level.txt +0 -1
  135. {snowflake-sqlalchemy-1.5.1 → snowflake_sqlalchemy-1.7.3}/LICENSE.txt +0 -0
  136. {snowflake-sqlalchemy-1.5.1 → snowflake_sqlalchemy-1.7.3}/MANIFEST.in +0 -0
  137. {snowflake-sqlalchemy-1.5.1 → snowflake_sqlalchemy-1.7.3}/src/snowflake/sqlalchemy/provision.py +0 -0
@@ -0,0 +1,112 @@
1
+ tests/parameters*.py
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ *.py[cod]
6
+ *$py.class
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ env/
14
+ build/
15
+ develop-eggs/
16
+ dist/
17
+ downloads/
18
+ eggs/
19
+ .eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ #*.spec # used to build snowsql
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .coverage
43
+ .coverage.*
44
+ .cache
45
+ nosetests.xml
46
+ coverage.xml
47
+ *,cover
48
+ .hypothesis/
49
+
50
+ # Translations
51
+ *.mo
52
+ *.pot
53
+
54
+ # Django stuff:
55
+ *.log
56
+ local_settings.py
57
+
58
+ # Flask stuff:
59
+ instance/
60
+ .webassets-cache
61
+
62
+ # Scrapy stuff:
63
+ .scrapy
64
+
65
+ # Sphinx documentation
66
+ docs/_build/
67
+
68
+ # PyBuilder
69
+ target/
70
+
71
+ # IPython Notebook
72
+ .ipynb_checkpoints
73
+
74
+ # pyenv
75
+ .python-version
76
+
77
+ # celery beat schedule file
78
+ celerybeat-schedule
79
+
80
+ # dotenv
81
+ .env
82
+
83
+ # virtualenv
84
+ venv*/
85
+ ENV/
86
+
87
+ # Spyder project settings
88
+ .spyderproject
89
+
90
+ # Rope project settings
91
+ .ropeproject
92
+
93
+ # vim
94
+ *.swp
95
+
96
+ # others
97
+ .tox/
98
+ generated_version.py
99
+ *coverage.xml
100
+ .DS_Store
101
+
102
+ # Editor specific
103
+ .idea/
104
+ .vscode/
105
+ *.code-workspace
106
+
107
+ # WhiteSource Scan
108
+ wss-*agent.config
109
+ wss-unified-agent.jar
110
+ whitesource/
111
+ .idea
112
+ Python
File without changes
@@ -0,0 +1,54 @@
1
+ exclude: '^(.*egg.info.*|.*/parameters.py).*$'
2
+ repos:
3
+ - repo: https://github.com/pre-commit/pre-commit-hooks
4
+ rev: v4.5.0
5
+ hooks:
6
+ - id: trailing-whitespace
7
+ exclude: '\.ambr$'
8
+ - id: end-of-file-fixer
9
+ - id: check-yaml
10
+ exclude: .github/repo_meta.yaml
11
+ - id: debug-statements
12
+ - repo: https://github.com/PyCQA/isort
13
+ rev: 5.13.2
14
+ hooks:
15
+ - id: isort
16
+ - repo: https://github.com/asottile/pyupgrade
17
+ rev: v3.15.1
18
+ hooks:
19
+ - id: pyupgrade
20
+ args: [--py37-plus]
21
+ - repo: https://github.com/psf/black
22
+ rev: 24.2.0
23
+ hooks:
24
+ - id: black
25
+ args:
26
+ - --safe
27
+ language_version: python3
28
+ - repo: https://github.com/Lucas-C/pre-commit-hooks.git
29
+ rev: v1.5.5
30
+ hooks:
31
+ - id: insert-license
32
+ name: insert-py-license
33
+ files: >
34
+ (?x)^(
35
+ src/snowflake/sqlalchemy/.*\.py|
36
+ tests/.*\.py|
37
+ setup.py
38
+ )$
39
+ args:
40
+ - --license-filepath
41
+ - license_header.txt
42
+ - repo: https://github.com/pycqa/flake8
43
+ rev: 7.0.0
44
+ hooks:
45
+ - id: flake8
46
+ additional_dependencies:
47
+ - flake8-bugbear
48
+ - repo: local
49
+ hooks:
50
+ - id: requirements-update
51
+ name: "Update dependencies from pyproject.toml to snyk/requirements.txt"
52
+ language: system
53
+ entry: python snyk/update_requirements.py
54
+ files: ^pyproject.toml$
@@ -8,10 +8,63 @@ Source code is also available at:
8
8
  <https://github.com/snowflakedb/snowflake-sqlalchemy>
9
9
 
10
10
  # Release Notes
11
+ - v1.7.3(January 15, 2025)
12
+ - Fix support for SqlAlchemy ARRAY.
13
+ - Fix return value of snowflake get_table_names.
14
+ - Fix incorrect quoting of identifiers with `_` as initial character.
15
+ - Fix ARRAY type not supported in HYBRID tables.
16
+ - Add `force_div_is_floordiv` flag to override `div_is_floordiv` new default value `False` in `SnowflakeDialect`.
17
+ - With the flag in `False`, the `/` division operator will be treated as a float division and `//` as a floor division.
18
+ - This flag is added to maintain backward compatibility with the previous behavior of Snowflake Dialect division.
19
+ - This flag will be removed in the future and Snowflake Dialect will use `div_is_floor_div` as `False`.
20
+
21
+ - v1.7.2(December 18, 2024)
22
+ - Fix quoting of `_` as column name
23
+ - Fix index columns was not being reflected
24
+ - Fix index reflection cache not working
25
+ - Add support for structured OBJECT datatype
26
+ - Add support for structured ARRAY datatype
27
+
28
+ - v1.7.1(December 02, 2024)
29
+ - Add support for partition by to copy into <location>
30
+ - Fix BOOLEAN type not found in snowdialect
31
+ - Add support for autocommit Isolation Level
32
+
33
+ - v1.7.0(November 21, 2024)
34
+ - Add support for dynamic tables and required options
35
+ - Add support for hybrid tables
36
+ - Fixed SAWarning when registering functions with existing name in default namespace
37
+ - Update options to be defined in key arguments instead of arguments.
38
+ - Add support for refresh_mode option in DynamicTable
39
+ - Add support for iceberg table with Snowflake Catalog
40
+ - Fix cluster by option to support explicit expressions
41
+ - Add support for MAP datatype
42
+
43
+ - v1.6.1(July 9, 2024)
44
+
45
+ - Update internal project workflow with pypi publishing
46
+
47
+ - v1.6.0(July 8, 2024)
48
+
49
+ - support for installing with SQLAlchemy 2.0.x
50
+ - use `hatch` & `uv` for managing project virtual environments
51
+
52
+ - v1.5.4
53
+
54
+ - Add ability to set ORDER / NOORDER sequence on columns with IDENTITY
55
+
56
+ - v1.5.3(April 16, 2024)
57
+
58
+ - Limit SQLAlchemy to < 2.0.0 before releasing version compatible with 2.0
59
+
60
+ - v1.5.2(April 11, 2024)
61
+
62
+ - Bump min SQLAlchemy to 1.4.19 for outer lateral join
63
+ - Add support for sequence ordering in tests
11
64
 
12
65
  - v1.5.1(November 03, 2023)
13
66
 
14
- - Fixed a compatibility issue with Snowflake Behavioral Change 1057 on outer lateral join, for more details check https://docs.snowflake.com/en/release-notes/bcr-bundles/2023_04/bcr-1057.
67
+ - Fixed a compatibility issue with Snowflake Behavioral Change 1057 on outer lateral join, for more details check <https://docs.snowflake.com/en/release-notes/bcr-bundles/2023_04/bcr-1057>.
15
68
  - Fixed credentials with `externalbrowser` authentication not caching due to incorrect parsing of boolean query parameters.
16
69
  - This fixes other boolean parameter passing to driver as well.
17
70