dlt-saga 0.2.2__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 (127) hide show
  1. dlt_saga-0.2.2/LICENSE +201 -0
  2. dlt_saga-0.2.2/PKG-INFO +230 -0
  3. dlt_saga-0.2.2/README.md +169 -0
  4. dlt_saga-0.2.2/dlt_saga/__init__.py +46 -0
  5. dlt_saga-0.2.2/dlt_saga/ai_setup_command.py +126 -0
  6. dlt_saga-0.2.2/dlt_saga/cli.py +2221 -0
  7. dlt_saga-0.2.2/dlt_saga/defaults.py +114 -0
  8. dlt_saga-0.2.2/dlt_saga/destinations/__init__.py +10 -0
  9. dlt_saga-0.2.2/dlt_saga/destinations/base.py +677 -0
  10. dlt_saga-0.2.2/dlt_saga/destinations/bigquery/__init__.py +11 -0
  11. dlt_saga-0.2.2/dlt_saga/destinations/bigquery/access.py +287 -0
  12. dlt_saga-0.2.2/dlt_saga/destinations/bigquery/base.py +643 -0
  13. dlt_saga-0.2.2/dlt_saga/destinations/bigquery/config.py +134 -0
  14. dlt_saga-0.2.2/dlt_saga/destinations/bigquery/destination.py +1473 -0
  15. dlt_saga-0.2.2/dlt_saga/destinations/config.py +63 -0
  16. dlt_saga-0.2.2/dlt_saga/destinations/databricks/__init__.py +0 -0
  17. dlt_saga-0.2.2/dlt_saga/destinations/databricks/access.py +203 -0
  18. dlt_saga-0.2.2/dlt_saga/destinations/databricks/config.py +155 -0
  19. dlt_saga-0.2.2/dlt_saga/destinations/databricks/destination.py +843 -0
  20. dlt_saga-0.2.2/dlt_saga/destinations/duckdb/__init__.py +6 -0
  21. dlt_saga-0.2.2/dlt_saga/destinations/duckdb/config.py +66 -0
  22. dlt_saga-0.2.2/dlt_saga/destinations/duckdb/destination.py +371 -0
  23. dlt_saga-0.2.2/dlt_saga/destinations/factory.py +146 -0
  24. dlt_saga-0.2.2/dlt_saga/historize/__init__.py +1 -0
  25. dlt_saga-0.2.2/dlt_saga/historize/config.py +216 -0
  26. dlt_saga-0.2.2/dlt_saga/historize/factory.py +133 -0
  27. dlt_saga-0.2.2/dlt_saga/historize/runner.py +862 -0
  28. dlt_saga-0.2.2/dlt_saga/historize/sql.py +585 -0
  29. dlt_saga-0.2.2/dlt_saga/historize/state.py +315 -0
  30. dlt_saga-0.2.2/dlt_saga/hooks/__init__.py +63 -0
  31. dlt_saga-0.2.2/dlt_saga/hooks/loader.py +170 -0
  32. dlt_saga-0.2.2/dlt_saga/hooks/registry.py +136 -0
  33. dlt_saga-0.2.2/dlt_saga/init_command.py +660 -0
  34. dlt_saga-0.2.2/dlt_saga/packages.py +204 -0
  35. dlt_saga-0.2.2/dlt_saga/pipeline_config/__init__.py +29 -0
  36. dlt_saga-0.2.2/dlt_saga/pipeline_config/base_config.py +515 -0
  37. dlt_saga-0.2.2/dlt_saga/pipeline_config/file_config.py +649 -0
  38. dlt_saga-0.2.2/dlt_saga/pipeline_config/naming.py +191 -0
  39. dlt_saga-0.2.2/dlt_saga/pipelines/__init__.py +13 -0
  40. dlt_saga-0.2.2/dlt_saga/pipelines/api/__init__.py +5 -0
  41. dlt_saga-0.2.2/dlt_saga/pipelines/api/base.py +509 -0
  42. dlt_saga-0.2.2/dlt_saga/pipelines/api/config.py +188 -0
  43. dlt_saga-0.2.2/dlt_saga/pipelines/api/pipeline.py +24 -0
  44. dlt_saga-0.2.2/dlt_saga/pipelines/base_client.py +16 -0
  45. dlt_saga-0.2.2/dlt_saga/pipelines/base_config.py +106 -0
  46. dlt_saga-0.2.2/dlt_saga/pipelines/base_pipeline.py +651 -0
  47. dlt_saga-0.2.2/dlt_saga/pipelines/database/__init__.py +14 -0
  48. dlt_saga-0.2.2/dlt_saga/pipelines/database/client.py +409 -0
  49. dlt_saga-0.2.2/dlt_saga/pipelines/database/config.py +185 -0
  50. dlt_saga-0.2.2/dlt_saga/pipelines/database/pipeline.py +120 -0
  51. dlt_saga-0.2.2/dlt_saga/pipelines/executor.py +80 -0
  52. dlt_saga-0.2.2/dlt_saga/pipelines/filesystem/__init__.py +12 -0
  53. dlt_saga-0.2.2/dlt_saga/pipelines/filesystem/client.py +877 -0
  54. dlt_saga-0.2.2/dlt_saga/pipelines/filesystem/config.py +221 -0
  55. dlt_saga-0.2.2/dlt_saga/pipelines/filesystem/pipeline.py +440 -0
  56. dlt_saga-0.2.2/dlt_saga/pipelines/google_sheets/__init__.py +12 -0
  57. dlt_saga-0.2.2/dlt_saga/pipelines/google_sheets/client.py +137 -0
  58. dlt_saga-0.2.2/dlt_saga/pipelines/google_sheets/config.py +64 -0
  59. dlt_saga-0.2.2/dlt_saga/pipelines/google_sheets/pipeline.py +129 -0
  60. dlt_saga-0.2.2/dlt_saga/pipelines/native_load/__init__.py +1 -0
  61. dlt_saga-0.2.2/dlt_saga/pipelines/native_load/_sql.py +16 -0
  62. dlt_saga-0.2.2/dlt_saga/pipelines/native_load/config.py +455 -0
  63. dlt_saga-0.2.2/dlt_saga/pipelines/native_load/pipeline.py +851 -0
  64. dlt_saga-0.2.2/dlt_saga/pipelines/native_load/state.py +371 -0
  65. dlt_saga-0.2.2/dlt_saga/pipelines/native_load/storage/__init__.py +47 -0
  66. dlt_saga-0.2.2/dlt_saga/pipelines/native_load/storage/adls.py +154 -0
  67. dlt_saga-0.2.2/dlt_saga/pipelines/native_load/storage/base.py +42 -0
  68. dlt_saga-0.2.2/dlt_saga/pipelines/native_load/storage/gcs.py +77 -0
  69. dlt_saga-0.2.2/dlt_saga/pipelines/registry.py +369 -0
  70. dlt_saga-0.2.2/dlt_saga/pipelines/sharepoint/__init__.py +12 -0
  71. dlt_saga-0.2.2/dlt_saga/pipelines/sharepoint/client.py +207 -0
  72. dlt_saga-0.2.2/dlt_saga/pipelines/sharepoint/config.py +128 -0
  73. dlt_saga-0.2.2/dlt_saga/pipelines/sharepoint/pipeline.py +106 -0
  74. dlt_saga-0.2.2/dlt_saga/pipelines/target/__init__.py +0 -0
  75. dlt_saga-0.2.2/dlt_saga/pipelines/target/config.py +304 -0
  76. dlt_saga-0.2.2/dlt_saga/pipelines/target/writer.py +83 -0
  77. dlt_saga-0.2.2/dlt_saga/project_config.py +523 -0
  78. dlt_saga-0.2.2/dlt_saga/report/__init__.py +5 -0
  79. dlt_saga-0.2.2/dlt_saga/report/collector.py +460 -0
  80. dlt_saga-0.2.2/dlt_saga/report/favicon.svg +13 -0
  81. dlt_saga-0.2.2/dlt_saga/report/generator.py +211 -0
  82. dlt_saga-0.2.2/dlt_saga/report/report.css +291 -0
  83. dlt_saga-0.2.2/dlt_saga/report/report.js +1346 -0
  84. dlt_saga-0.2.2/dlt_saga/report/uploader.py +109 -0
  85. dlt_saga-0.2.2/dlt_saga/schemas/dlt_common.json +310 -0
  86. dlt_saga-0.2.2/dlt_saga/session.py +769 -0
  87. dlt_saga-0.2.2/dlt_saga/templates/ai_context.md +268 -0
  88. dlt_saga-0.2.2/dlt_saga/testing/__init__.py +273 -0
  89. dlt_saga-0.2.2/dlt_saga/testing/fixtures.py +111 -0
  90. dlt_saga-0.2.2/dlt_saga/utility/__init__.py +10 -0
  91. dlt_saga-0.2.2/dlt_saga/utility/auth/__init__.py +0 -0
  92. dlt_saga-0.2.2/dlt_saga/utility/auth/databricks.py +220 -0
  93. dlt_saga-0.2.2/dlt_saga/utility/auth/gcp.py +74 -0
  94. dlt_saga-0.2.2/dlt_saga/utility/auth/providers.py +187 -0
  95. dlt_saga-0.2.2/dlt_saga/utility/cli/__init__.py +10 -0
  96. dlt_saga-0.2.2/dlt_saga/utility/cli/common.py +258 -0
  97. dlt_saga-0.2.2/dlt_saga/utility/cli/context.py +225 -0
  98. dlt_saga-0.2.2/dlt_saga/utility/cli/gcloud_auth.py +280 -0
  99. dlt_saga-0.2.2/dlt_saga/utility/cli/logging.py +140 -0
  100. dlt_saga-0.2.2/dlt_saga/utility/cli/profiles.py +523 -0
  101. dlt_saga-0.2.2/dlt_saga/utility/cli/reporting.py +92 -0
  102. dlt_saga-0.2.2/dlt_saga/utility/cli/selectors.py +320 -0
  103. dlt_saga-0.2.2/dlt_saga/utility/env.py +17 -0
  104. dlt_saga-0.2.2/dlt_saga/utility/gcp/__init__.py +7 -0
  105. dlt_saga-0.2.2/dlt_saga/utility/gcp/client_pool.py +390 -0
  106. dlt_saga-0.2.2/dlt_saga/utility/gcp/secrets.py +75 -0
  107. dlt_saga-0.2.2/dlt_saga/utility/generate_schemas.py +844 -0
  108. dlt_saga-0.2.2/dlt_saga/utility/naming.py +166 -0
  109. dlt_saga-0.2.2/dlt_saga/utility/optional_deps.py +116 -0
  110. dlt_saga-0.2.2/dlt_saga/utility/orchestration/__init__.py +7 -0
  111. dlt_saga-0.2.2/dlt_saga/utility/orchestration/cloud_run_trigger.py +180 -0
  112. dlt_saga-0.2.2/dlt_saga/utility/orchestration/execution_plan.py +601 -0
  113. dlt_saga-0.2.2/dlt_saga/utility/orchestration/providers.py +196 -0
  114. dlt_saga-0.2.2/dlt_saga/utility/secrets/__init__.py +27 -0
  115. dlt_saga-0.2.2/dlt_saga/utility/secrets/azure.py +106 -0
  116. dlt_saga-0.2.2/dlt_saga/utility/secrets/providers.py +94 -0
  117. dlt_saga-0.2.2/dlt_saga/utility/secrets/resolver.py +254 -0
  118. dlt_saga-0.2.2/dlt_saga/utility/secrets/secret_str.py +68 -0
  119. dlt_saga-0.2.2/dlt_saga/validate.py +191 -0
  120. dlt_saga-0.2.2/dlt_saga.egg-info/PKG-INFO +230 -0
  121. dlt_saga-0.2.2/dlt_saga.egg-info/SOURCES.txt +125 -0
  122. dlt_saga-0.2.2/dlt_saga.egg-info/dependency_links.txt +1 -0
  123. dlt_saga-0.2.2/dlt_saga.egg-info/entry_points.txt +2 -0
  124. dlt_saga-0.2.2/dlt_saga.egg-info/requires.txt +38 -0
  125. dlt_saga-0.2.2/dlt_saga.egg-info/top_level.txt +1 -0
  126. dlt_saga-0.2.2/pyproject.toml +148 -0
  127. dlt_saga-0.2.2/setup.cfg +4 -0
dlt_saga-0.2.2/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, you may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Glitni AS
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,230 @@
1
+ Metadata-Version: 2.4
2
+ Name: dlt-saga
3
+ Version: 0.2.2
4
+ Summary: Config-driven data ingestion and historization framework built on dlt
5
+ Author-email: Sindre Grindheim <sindre.grindheim@glitni.no>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/Glitni/dlt-saga
8
+ Project-URL: Documentation, https://github.com/Glitni/dlt-saga/wiki
9
+ Project-URL: Source, https://github.com/Glitni/dlt-saga
10
+ Project-URL: Tracker, https://github.com/Glitni/dlt-saga/issues
11
+ Project-URL: Changelog, https://github.com/Glitni/dlt-saga/blob/main/CHANGELOG.md
12
+ Keywords: dlt,data-pipeline,etl,scd2,historization,data-engineering,bigquery,databricks,duckdb,azure,pipeline,config-driven
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Information Technology
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Database
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: <3.13.0,>=3.11.0
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: dlt[duckdb,filesystem,parquet,sftp]<2.0.0,>=1.18.0
27
+ Requires-Dist: pydantic>=2.11.7
28
+ Requires-Dist: pyyaml>=6.0.2
29
+ Requires-Dist: typer>=0.16.0
30
+ Requires-Dist: connectorx>=0.4.4
31
+ Requires-Dist: pandas>=2.3.1
32
+ Requires-Dist: polars>=1.37.1
33
+ Requires-Dist: pyarrow>=21.0.0
34
+ Provides-Extra: gcp
35
+ Requires-Dist: dlt[bigquery]<2.0.0,>=1.18.0; extra == "gcp"
36
+ Requires-Dist: google-api-python-client>=2.177.0; extra == "gcp"
37
+ Requires-Dist: google-auth-oauthlib>=1.2.2; extra == "gcp"
38
+ Requires-Dist: google-cloud-bigquery-storage>=2.32.0; extra == "gcp"
39
+ Requires-Dist: google-cloud-secret-manager>=2.24.0; extra == "gcp"
40
+ Requires-Dist: google-cloud-storage>=3.2.0; extra == "gcp"
41
+ Requires-Dist: google-cloud-run>=0.12.0; extra == "gcp"
42
+ Requires-Dist: gcsfs>=2026.1.0; extra == "gcp"
43
+ Provides-Extra: databricks
44
+ Requires-Dist: dlt[databricks]<2.0.0,>=1.18.0; extra == "databricks"
45
+ Provides-Extra: azure
46
+ Requires-Dist: adlfs>=2024.7.0; extra == "azure"
47
+ Requires-Dist: azure-identity>=1.21.0; extra == "azure"
48
+ Requires-Dist: azure-keyvault-secrets>=4.9.0; extra == "azure"
49
+ Requires-Dist: requests>=2.32.0; extra == "azure"
50
+ Requires-Dist: openpyxl>=3.1.0; extra == "azure"
51
+ Provides-Extra: dev
52
+ Requires-Dist: dlt-saga[azure,databricks,gcp]; extra == "dev"
53
+ Requires-Dist: ruff>=0.14.14; extra == "dev"
54
+ Requires-Dist: mypy>=1.19.1; extra == "dev"
55
+ Requires-Dist: types-PyYAML>=6.0.0; extra == "dev"
56
+ Requires-Dist: types-requests>=2.31.0; extra == "dev"
57
+ Requires-Dist: pre-commit>=4.3.0; extra == "dev"
58
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
59
+ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
60
+ Dynamic: license-file
61
+
62
+ # dlt-saga
63
+
64
+ Config-driven data ingestion and historization framework, built on [dlt](https://dlthub.com/).
65
+
66
+ [![PyPI version](https://img.shields.io/pypi/v/dlt-saga.svg)](https://pypi.org/project/dlt-saga/)
67
+ [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
68
+ [![CI](https://github.com/Glitni/dlt-saga/actions/workflows/ci.yml/badge.svg)](https://github.com/Glitni/dlt-saga/actions/workflows/ci.yml)
69
+ [![codecov](https://codecov.io/gh/Glitni/dlt-saga/graph/badge.svg)](https://codecov.io/gh/Glitni/dlt-saga)
70
+ [![Python](https://img.shields.io/pypi/pyversions/dlt-saga.svg)](https://pypi.org/project/dlt-saga/)
71
+
72
+ ## Why dlt-saga?
73
+
74
+ [dlt](https://dlthub.com/) is an excellent Python library for building data pipelines.
75
+ dlt-saga adds the **operational layer** that teams need to run dlt at scale:
76
+
77
+ | What you get | How |
78
+ |---|---|
79
+ | **Zero-code pipelines** | Drop a YAML file in `configs/` — no Python needed for common sources |
80
+ | **SCD2 historization** | `write_disposition: append+historize` turns any snapshot table into a full change history with `_dlt_valid_from` / `_dlt_valid_to` |
81
+ | **dbt-style selectors** | `saga ingest --select "tag:daily,group:api"` — union, intersection, glob patterns |
82
+ | **Multi-environment profiles** | `profiles.yml` with dev/prod targets, service account impersonation, per-environment datasets |
83
+ | **Plugin architecture** | Register custom sources and destinations via `packages.yml` or Python entry points — no framework fork needed |
84
+ | **Cloud-agnostic** | BigQuery today, Databricks and DuckDB included, more via plugins |
85
+
86
+ If you are already using dlt directly and finding yourself re-implementing incremental
87
+ state management, environment switching, or SCD2 transforms — dlt-saga is the
88
+ config layer you are building.
89
+
90
+ ## Installation
91
+
92
+ ```bash
93
+ pip install dlt-saga[bigquery] # BigQuery
94
+ pip install dlt-saga[databricks,azure] # Databricks on Azure
95
+ pip install dlt-saga # DuckDB only (no cloud dependencies)
96
+ ```
97
+
98
+ ## Quick Start
99
+
100
+ ```bash
101
+ # 1. Create and scaffold a project
102
+ mkdir my-pipelines && cd my-pipelines
103
+ saga init # prompts for destination and credentials
104
+
105
+ # 2. Authenticate to your destination (skip for DuckDB)
106
+ # See: https://github.com/Glitni/dlt-saga/wiki/Getting-Started
107
+
108
+ # 3. List available pipelines
109
+ saga list
110
+
111
+ # 4. Run a pipeline
112
+ saga ingest --select "example__sample"
113
+ ```
114
+
115
+ > See the **[Getting Started guide](https://github.com/Glitni/dlt-saga/wiki/Getting-Started)** for a full walkthrough, or browse [`example/`](example/) for a minimal runnable setup.
116
+
117
+ > Local execution is the default. Use `--orchestrate` to fan out to parallel workers (requires `orchestration:` configured in `saga_project.yml`).
118
+
119
+ ## CLI Commands
120
+
121
+ All commands are subcommands under the `saga` entry point and share common options:
122
+ `--select`, `--verbose`, `--profile`, `--target`.
123
+
124
+ ### Selectors (dbt-style)
125
+
126
+ Selectors filter which pipelines to run. They work across all commands.
127
+
128
+ | Syntax | Meaning | Example |
129
+ |--------|---------|---------|
130
+ | `name` | Exact pipeline name | `--select google_sheets__my_pipeline` |
131
+ | `*glob*` | Glob pattern | `--select "*balance*"` |
132
+ | `tag:name` | Filter by tag | `--select "tag:daily"` |
133
+ | `group:name` | Filter by source group | `--select "group:google_sheets"` |
134
+ | space-separated | UNION (OR) | `--select "tag:daily group:filesystem"` |
135
+ | comma-separated | INTERSECTION (AND) | `--select "tag:daily,group:google_sheets"` |
136
+
137
+ ### Common Examples
138
+
139
+ ```bash
140
+ # List pipelines
141
+ saga list # All enabled pipelines
142
+ saga list --resource-type ingest # Ingest-enabled only
143
+ saga list --resource-type historize # Historize-enabled only
144
+ saga list --select "tag:daily" # Filtered by tag
145
+
146
+ # Ingest
147
+ saga ingest --select "tag:daily"
148
+ saga ingest --select "group:api" --workers 8
149
+ saga ingest --full-refresh --select "my_pipeline"
150
+ saga ingest --select "group:api" --start-value-override "2026-01-01" # Backfill
151
+
152
+ # Historize (SCD2)
153
+ saga historize --select "tag:daily"
154
+ saga historize --full-refresh --select "filesystem__*"
155
+
156
+ # Run (ingest + historize sequentially)
157
+ saga run --select "tag:daily"
158
+
159
+ # Update BigQuery access controls
160
+ saga update-access --select "group:google_sheets"
161
+
162
+ # Target a specific environment
163
+ saga ingest --target prod --select "tag:daily" # production (with impersonation)
164
+ ```
165
+
166
+ ## Adding a New Pipeline
167
+
168
+ Create a YAML config file in `configs/<source_type>/` — that's it. The framework auto-discovers configs.
169
+
170
+ Supported source types out of the box: **API**, **Database** (PostgreSQL, MySQL, SQL Server, and more via ConnectorX), **Filesystem** (GCS, SFTP, local), **Google Sheets**, and **SharePoint**.
171
+
172
+ See the **[Pipeline Types guide](https://github.com/Glitni/dlt-saga/wiki/Pipeline-Types)** for config examples for each source type, and the **[Configuration reference](https://github.com/Glitni/dlt-saga/wiki/Configuration)** for all available fields.
173
+
174
+ ## Write Dispositions and Historize
175
+
176
+ The `write_disposition` field controls what operations are enabled for a pipeline:
177
+
178
+ | Value | Ingest | Historize | Use Case |
179
+ |-------|--------|-----------|----------|
180
+ | `append` | Yes | No | Raw event/log data |
181
+ | `merge` | Yes | No | Upsert on primary key |
182
+ | `replace` | Yes | No | Full refresh each run |
183
+ | `append+historize` | Yes | Yes | Snapshot → SCD2 |
184
+ | `historize` | No | Yes | External data → SCD2 |
185
+
186
+ Historize transforms raw snapshot data into [SCD2](https://en.wikipedia.org/wiki/Slowly_changing_dimension#Type_2:_add_new_row) tables with `_dlt_valid_from`, `_dlt_valid_to`, and `_dlt_is_deleted` columns. See the **[Historize guide](https://github.com/Glitni/dlt-saga/wiki/Historize)** for the full reference.
187
+
188
+ ## Community
189
+
190
+ - [GitHub Issues](https://github.com/Glitni/dlt-saga/issues) — bug reports and feature requests
191
+ - [GitHub Discussions](https://github.com/Glitni/dlt-saga/discussions) — questions, ideas, show & tell
192
+ - [Contributing guide](CONTRIBUTING.md) — how to get involved
193
+ - [dlt community](https://dlthub.com/community) — dlt Slack / Discord
194
+
195
+ ## Further Reading
196
+
197
+ - **[Getting Started](https://github.com/Glitni/dlt-saga/wiki/Getting-Started)** — Full walkthrough: install, init, first pipeline
198
+ - **[Architecture](https://github.com/Glitni/dlt-saga/wiki/Architecture)** — Three-layer design, plugin system, execution flow
199
+ - **[Pipeline Types](https://github.com/Glitni/dlt-saga/wiki/Pipeline-Types)** — Config reference for API, Database, Filesystem, Sheets, SharePoint
200
+ - **[Configuration](https://github.com/Glitni/dlt-saga/wiki/Configuration)** — Hierarchical config, all options reference
201
+ - **[Profiles](https://github.com/Glitni/dlt-saga/wiki/Profiles)** — Multi-environment setup, service account impersonation
202
+ - **[Historize (SCD2)](https://github.com/Glitni/dlt-saga/wiki/Historize)** — Snapshot tables → slowly changing dimensions
203
+ - **[CLI Reference](https://github.com/Glitni/dlt-saga/wiki/CLI-Reference)** — All commands, flags, and the programmatic API
204
+ - **[Deployment](https://github.com/Glitni/dlt-saga/wiki/Deployment)** — Orchestration, Cloud Run, worker setup
205
+ - **[Performance](https://github.com/Glitni/dlt-saga/wiki/Performance)** — Parallel execution, worker tuning, backfill
206
+ - **[Plugin Development](https://github.com/Glitni/dlt-saga/wiki/Plugin-Development)** — Custom sources, destinations, hooks
207
+
208
+ ## Project Structure
209
+
210
+ ```
211
+ dlt-saga/
212
+ ├── dlt_saga/ # Main package
213
+ │ ├── cli.py # CLI entry point (saga command)
214
+ │ ├── pipelines/ # Built-in source implementations
215
+ │ │ ├── api/ # Generic REST API pipeline
216
+ │ │ ├── database/ # Database source (ConnectorX)
217
+ │ │ ├── filesystem/ # Filesystem / GCS source
218
+ │ │ ├── google_sheets/# Google Sheets source
219
+ │ │ └── sharepoint/ # SharePoint source
220
+ │ ├── historize/ # SCD2 historization engine
221
+ │ ├── destinations/ # Destination implementations
222
+ │ │ ├── bigquery/ # BigQuery
223
+ │ │ └── duckdb/ # DuckDB (local development)
224
+ │ ├── pipeline_config/ # Config discovery and parsing
225
+ │ ├── schemas/ # Bundled static schemas (dlt_common.json)
226
+ │ └── utility/ # Shared utilities (CLI, naming, orchestration)
227
+ ├── example/ # Minimal runnable consumer project (DuckDB)
228
+ ├── wiki/ # Documentation (synced to GitHub wiki)
229
+ └── .dlt/ # dlt runtime config overrides
230
+ ```
@@ -0,0 +1,169 @@
1
+ # dlt-saga
2
+
3
+ Config-driven data ingestion and historization framework, built on [dlt](https://dlthub.com/).
4
+
5
+ [![PyPI version](https://img.shields.io/pypi/v/dlt-saga.svg)](https://pypi.org/project/dlt-saga/)
6
+ [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
7
+ [![CI](https://github.com/Glitni/dlt-saga/actions/workflows/ci.yml/badge.svg)](https://github.com/Glitni/dlt-saga/actions/workflows/ci.yml)
8
+ [![codecov](https://codecov.io/gh/Glitni/dlt-saga/graph/badge.svg)](https://codecov.io/gh/Glitni/dlt-saga)
9
+ [![Python](https://img.shields.io/pypi/pyversions/dlt-saga.svg)](https://pypi.org/project/dlt-saga/)
10
+
11
+ ## Why dlt-saga?
12
+
13
+ [dlt](https://dlthub.com/) is an excellent Python library for building data pipelines.
14
+ dlt-saga adds the **operational layer** that teams need to run dlt at scale:
15
+
16
+ | What you get | How |
17
+ |---|---|
18
+ | **Zero-code pipelines** | Drop a YAML file in `configs/` — no Python needed for common sources |
19
+ | **SCD2 historization** | `write_disposition: append+historize` turns any snapshot table into a full change history with `_dlt_valid_from` / `_dlt_valid_to` |
20
+ | **dbt-style selectors** | `saga ingest --select "tag:daily,group:api"` — union, intersection, glob patterns |
21
+ | **Multi-environment profiles** | `profiles.yml` with dev/prod targets, service account impersonation, per-environment datasets |
22
+ | **Plugin architecture** | Register custom sources and destinations via `packages.yml` or Python entry points — no framework fork needed |
23
+ | **Cloud-agnostic** | BigQuery today, Databricks and DuckDB included, more via plugins |
24
+
25
+ If you are already using dlt directly and finding yourself re-implementing incremental
26
+ state management, environment switching, or SCD2 transforms — dlt-saga is the
27
+ config layer you are building.
28
+
29
+ ## Installation
30
+
31
+ ```bash
32
+ pip install dlt-saga[bigquery] # BigQuery
33
+ pip install dlt-saga[databricks,azure] # Databricks on Azure
34
+ pip install dlt-saga # DuckDB only (no cloud dependencies)
35
+ ```
36
+
37
+ ## Quick Start
38
+
39
+ ```bash
40
+ # 1. Create and scaffold a project
41
+ mkdir my-pipelines && cd my-pipelines
42
+ saga init # prompts for destination and credentials
43
+
44
+ # 2. Authenticate to your destination (skip for DuckDB)
45
+ # See: https://github.com/Glitni/dlt-saga/wiki/Getting-Started
46
+
47
+ # 3. List available pipelines
48
+ saga list
49
+
50
+ # 4. Run a pipeline
51
+ saga ingest --select "example__sample"
52
+ ```
53
+
54
+ > See the **[Getting Started guide](https://github.com/Glitni/dlt-saga/wiki/Getting-Started)** for a full walkthrough, or browse [`example/`](example/) for a minimal runnable setup.
55
+
56
+ > Local execution is the default. Use `--orchestrate` to fan out to parallel workers (requires `orchestration:` configured in `saga_project.yml`).
57
+
58
+ ## CLI Commands
59
+
60
+ All commands are subcommands under the `saga` entry point and share common options:
61
+ `--select`, `--verbose`, `--profile`, `--target`.
62
+
63
+ ### Selectors (dbt-style)
64
+
65
+ Selectors filter which pipelines to run. They work across all commands.
66
+
67
+ | Syntax | Meaning | Example |
68
+ |--------|---------|---------|
69
+ | `name` | Exact pipeline name | `--select google_sheets__my_pipeline` |
70
+ | `*glob*` | Glob pattern | `--select "*balance*"` |
71
+ | `tag:name` | Filter by tag | `--select "tag:daily"` |
72
+ | `group:name` | Filter by source group | `--select "group:google_sheets"` |
73
+ | space-separated | UNION (OR) | `--select "tag:daily group:filesystem"` |
74
+ | comma-separated | INTERSECTION (AND) | `--select "tag:daily,group:google_sheets"` |
75
+
76
+ ### Common Examples
77
+
78
+ ```bash
79
+ # List pipelines
80
+ saga list # All enabled pipelines
81
+ saga list --resource-type ingest # Ingest-enabled only
82
+ saga list --resource-type historize # Historize-enabled only
83
+ saga list --select "tag:daily" # Filtered by tag
84
+
85
+ # Ingest
86
+ saga ingest --select "tag:daily"
87
+ saga ingest --select "group:api" --workers 8
88
+ saga ingest --full-refresh --select "my_pipeline"
89
+ saga ingest --select "group:api" --start-value-override "2026-01-01" # Backfill
90
+
91
+ # Historize (SCD2)
92
+ saga historize --select "tag:daily"
93
+ saga historize --full-refresh --select "filesystem__*"
94
+
95
+ # Run (ingest + historize sequentially)
96
+ saga run --select "tag:daily"
97
+
98
+ # Update BigQuery access controls
99
+ saga update-access --select "group:google_sheets"
100
+
101
+ # Target a specific environment
102
+ saga ingest --target prod --select "tag:daily" # production (with impersonation)
103
+ ```
104
+
105
+ ## Adding a New Pipeline
106
+
107
+ Create a YAML config file in `configs/<source_type>/` — that's it. The framework auto-discovers configs.
108
+
109
+ Supported source types out of the box: **API**, **Database** (PostgreSQL, MySQL, SQL Server, and more via ConnectorX), **Filesystem** (GCS, SFTP, local), **Google Sheets**, and **SharePoint**.
110
+
111
+ See the **[Pipeline Types guide](https://github.com/Glitni/dlt-saga/wiki/Pipeline-Types)** for config examples for each source type, and the **[Configuration reference](https://github.com/Glitni/dlt-saga/wiki/Configuration)** for all available fields.
112
+
113
+ ## Write Dispositions and Historize
114
+
115
+ The `write_disposition` field controls what operations are enabled for a pipeline:
116
+
117
+ | Value | Ingest | Historize | Use Case |
118
+ |-------|--------|-----------|----------|
119
+ | `append` | Yes | No | Raw event/log data |
120
+ | `merge` | Yes | No | Upsert on primary key |
121
+ | `replace` | Yes | No | Full refresh each run |
122
+ | `append+historize` | Yes | Yes | Snapshot → SCD2 |
123
+ | `historize` | No | Yes | External data → SCD2 |
124
+
125
+ Historize transforms raw snapshot data into [SCD2](https://en.wikipedia.org/wiki/Slowly_changing_dimension#Type_2:_add_new_row) tables with `_dlt_valid_from`, `_dlt_valid_to`, and `_dlt_is_deleted` columns. See the **[Historize guide](https://github.com/Glitni/dlt-saga/wiki/Historize)** for the full reference.
126
+
127
+ ## Community
128
+
129
+ - [GitHub Issues](https://github.com/Glitni/dlt-saga/issues) — bug reports and feature requests
130
+ - [GitHub Discussions](https://github.com/Glitni/dlt-saga/discussions) — questions, ideas, show & tell
131
+ - [Contributing guide](CONTRIBUTING.md) — how to get involved
132
+ - [dlt community](https://dlthub.com/community) — dlt Slack / Discord
133
+
134
+ ## Further Reading
135
+
136
+ - **[Getting Started](https://github.com/Glitni/dlt-saga/wiki/Getting-Started)** — Full walkthrough: install, init, first pipeline
137
+ - **[Architecture](https://github.com/Glitni/dlt-saga/wiki/Architecture)** — Three-layer design, plugin system, execution flow
138
+ - **[Pipeline Types](https://github.com/Glitni/dlt-saga/wiki/Pipeline-Types)** — Config reference for API, Database, Filesystem, Sheets, SharePoint
139
+ - **[Configuration](https://github.com/Glitni/dlt-saga/wiki/Configuration)** — Hierarchical config, all options reference
140
+ - **[Profiles](https://github.com/Glitni/dlt-saga/wiki/Profiles)** — Multi-environment setup, service account impersonation
141
+ - **[Historize (SCD2)](https://github.com/Glitni/dlt-saga/wiki/Historize)** — Snapshot tables → slowly changing dimensions
142
+ - **[CLI Reference](https://github.com/Glitni/dlt-saga/wiki/CLI-Reference)** — All commands, flags, and the programmatic API
143
+ - **[Deployment](https://github.com/Glitni/dlt-saga/wiki/Deployment)** — Orchestration, Cloud Run, worker setup
144
+ - **[Performance](https://github.com/Glitni/dlt-saga/wiki/Performance)** — Parallel execution, worker tuning, backfill
145
+ - **[Plugin Development](https://github.com/Glitni/dlt-saga/wiki/Plugin-Development)** — Custom sources, destinations, hooks
146
+
147
+ ## Project Structure
148
+
149
+ ```
150
+ dlt-saga/
151
+ ├── dlt_saga/ # Main package
152
+ │ ├── cli.py # CLI entry point (saga command)
153
+ │ ├── pipelines/ # Built-in source implementations
154
+ │ │ ├── api/ # Generic REST API pipeline
155
+ │ │ ├── database/ # Database source (ConnectorX)
156
+ │ │ ├── filesystem/ # Filesystem / GCS source
157
+ │ │ ├── google_sheets/# Google Sheets source
158
+ │ │ └── sharepoint/ # SharePoint source
159
+ │ ├── historize/ # SCD2 historization engine
160
+ │ ├── destinations/ # Destination implementations
161
+ │ │ ├── bigquery/ # BigQuery
162
+ │ │ └── duckdb/ # DuckDB (local development)
163
+ │ ├── pipeline_config/ # Config discovery and parsing
164
+ │ ├── schemas/ # Bundled static schemas (dlt_common.json)
165
+ │ └── utility/ # Shared utilities (CLI, naming, orchestration)
166
+ ├── example/ # Minimal runnable consumer project (DuckDB)
167
+ ├── wiki/ # Documentation (synced to GitHub wiki)
168
+ └── .dlt/ # dlt runtime config overrides
169
+ ```
@@ -0,0 +1,46 @@
1
+ """dlt-saga: a config-driven data ingestion framework built on dlt."""
2
+
3
+ # Stable plugin API version. Increment when the contract for
4
+ # BasePipeline, Destination, or AccessManager changes in a way
5
+ # that existing plugins must adapt to.
6
+ PLUGIN_API_VERSION = 1
7
+
8
+ __all__ = [
9
+ "PLUGIN_API_VERSION",
10
+ "AuthenticationError",
11
+ "Session",
12
+ "SessionResult",
13
+ "PipelineResult",
14
+ "HookContext",
15
+ "get_hook_registry",
16
+ ]
17
+
18
+
19
+ def __getattr__(name: str):
20
+ """Lazy-load public API symbols on first access.
21
+
22
+ Avoids eagerly importing the full module graph (DestinationFactory,
23
+ BigQuery SDK, etc.) at ``import dlt_saga`` time. This matters because
24
+ dlt's normalize step forks worker processes that inherit the parent's
25
+ memory — eager imports would bloat every worker.
26
+ """
27
+ if name == "AuthenticationError":
28
+ from dlt_saga.utility.auth.providers import AuthenticationError
29
+
30
+ globals()["AuthenticationError"] = AuthenticationError
31
+ return AuthenticationError
32
+ if name in ("Session", "SessionResult", "PipelineResult"):
33
+ from dlt_saga.session import PipelineResult, Session, SessionResult
34
+
35
+ globals().update(
36
+ Session=Session,
37
+ SessionResult=SessionResult,
38
+ PipelineResult=PipelineResult,
39
+ )
40
+ return globals()[name]
41
+ if name in ("HookContext", "get_hook_registry"):
42
+ from dlt_saga.hooks.registry import HookContext, get_hook_registry
43
+
44
+ globals().update(HookContext=HookContext, get_hook_registry=get_hook_registry)
45
+ return globals()[name]
46
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")