laketower 0.5.0__tar.gz → 0.6.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.

Potentially problematic release.


This version of laketower might be problematic. Click here for more details.

Files changed (66) hide show
  1. {laketower-0.5.0 → laketower-0.6.0}/.github/workflows/ci-cd.yml +14 -14
  2. {laketower-0.5.0 → laketower-0.6.0}/CHANGELOG.md +30 -1
  3. {laketower-0.5.0 → laketower-0.6.0}/PKG-INFO +145 -10
  4. {laketower-0.5.0 → laketower-0.6.0}/README.md +141 -7
  5. {laketower-0.5.0 → laketower-0.6.0}/demo/laketower.yml +3 -0
  6. laketower-0.6.0/docs/static/queries_view.png +0 -0
  7. laketower-0.6.0/docs/static/tables_history.png +0 -0
  8. laketower-0.6.0/docs/static/tables_import.png +0 -0
  9. laketower-0.6.0/docs/static/tables_overview.png +0 -0
  10. laketower-0.6.0/docs/static/tables_query.png +0 -0
  11. laketower-0.6.0/docs/static/tables_statistics.png +0 -0
  12. laketower-0.6.0/docs/static/tables_view.png +0 -0
  13. laketower-0.6.0/laketower/__about__.py +1 -0
  14. {laketower-0.5.0 → laketower-0.6.0}/laketower/cli.py +181 -87
  15. laketower-0.6.0/laketower/config.py +113 -0
  16. laketower-0.6.0/laketower/tables.py +295 -0
  17. {laketower-0.5.0 → laketower-0.6.0}/laketower/templates/queries/view.html +6 -0
  18. {laketower-0.5.0 → laketower-0.6.0}/laketower/templates/tables/_macros.html +3 -0
  19. {laketower-0.5.0 → laketower-0.6.0}/laketower/templates/tables/history.html +6 -0
  20. laketower-0.6.0/laketower/templates/tables/import.html +71 -0
  21. {laketower-0.5.0 → laketower-0.6.0}/laketower/templates/tables/index.html +6 -0
  22. {laketower-0.5.0 → laketower-0.6.0}/laketower/templates/tables/query.html +6 -0
  23. {laketower-0.5.0 → laketower-0.6.0}/laketower/templates/tables/statistics.html +6 -0
  24. {laketower-0.5.0 → laketower-0.6.0}/laketower/templates/tables/view.html +6 -0
  25. {laketower-0.5.0 → laketower-0.6.0}/laketower/web.py +144 -29
  26. {laketower-0.5.0 → laketower-0.6.0}/pyproject.toml +14 -13
  27. {laketower-0.5.0 → laketower-0.6.0}/tasks.py +13 -4
  28. {laketower-0.5.0 → laketower-0.6.0}/tests/conftest.py +50 -1
  29. {laketower-0.5.0 → laketower-0.6.0}/tests/test_cli.py +425 -27
  30. laketower-0.6.0/tests/test_config.py +228 -0
  31. laketower-0.6.0/tests/test_tables.py +98 -0
  32. {laketower-0.5.0 → laketower-0.6.0}/tests/test_web.py +315 -1
  33. laketower-0.6.0/uv.lock +1745 -0
  34. laketower-0.5.0/docs/static/queries_view.png +0 -0
  35. laketower-0.5.0/docs/static/tables_history.png +0 -0
  36. laketower-0.5.0/docs/static/tables_overview.png +0 -0
  37. laketower-0.5.0/docs/static/tables_query.png +0 -0
  38. laketower-0.5.0/docs/static/tables_statistics.png +0 -0
  39. laketower-0.5.0/docs/static/tables_view.png +0 -0
  40. laketower-0.5.0/laketower/__about__.py +0 -1
  41. laketower-0.5.0/laketower/config.py +0 -47
  42. laketower-0.5.0/laketower/tables.py +0 -141
  43. laketower-0.5.0/uv.lock +0 -1462
  44. {laketower-0.5.0 → laketower-0.6.0}/.gitignore +0 -0
  45. {laketower-0.5.0 → laketower-0.6.0}/.python-version +0 -0
  46. {laketower-0.5.0 → laketower-0.6.0}/LICENSE +0 -0
  47. {laketower-0.5.0 → laketower-0.6.0}/demo/generate.py +0 -0
  48. {laketower-0.5.0 → laketower-0.6.0}/demo/sample_table/_delta_log/00000000000000000000.json +0 -0
  49. {laketower-0.5.0 → laketower-0.6.0}/demo/sample_table/_delta_log/00000000000000000001.json +0 -0
  50. {laketower-0.5.0 → laketower-0.6.0}/demo/sample_table/_delta_log/00000000000000000002.json +0 -0
  51. {laketower-0.5.0 → laketower-0.6.0}/demo/sample_table/_delta_log/00000000000000000003.json +0 -0
  52. {laketower-0.5.0 → laketower-0.6.0}/demo/sample_table/part-00001-1a31a393-6db6-4d1a-bf4e-81ea061ff8cd-c000.snappy.parquet +0 -0
  53. {laketower-0.5.0 → laketower-0.6.0}/demo/sample_table/part-00001-5af77102-9207-4c89-aaf6-37e1f815ec26-c000.snappy.parquet +0 -0
  54. {laketower-0.5.0 → laketower-0.6.0}/demo/sample_table/part-00001-b11bab55-43d0-4d05-ae88-5b9481ae57db-c000.snappy.parquet +0 -0
  55. {laketower-0.5.0 → laketower-0.6.0}/demo/weather/_delta_log/00000000000000000000.json +0 -0
  56. {laketower-0.5.0 → laketower-0.6.0}/demo/weather/_delta_log/00000000000000000001.json +0 -0
  57. {laketower-0.5.0 → laketower-0.6.0}/demo/weather/_delta_log/00000000000000000002.json +0 -0
  58. {laketower-0.5.0 → laketower-0.6.0}/demo/weather/part-00001-2323b963-be56-44e0-8c10-e237e7e6d4b9-c000.snappy.parquet +0 -0
  59. {laketower-0.5.0 → laketower-0.6.0}/demo/weather/part-00001-6360cbf8-f8a9-475f-8729-6f20b4ca64a9-c000.snappy.parquet +0 -0
  60. {laketower-0.5.0 → laketower-0.6.0}/laketower/__init__.py +0 -0
  61. {laketower-0.5.0 → laketower-0.6.0}/laketower/__main__.py +0 -0
  62. {laketower-0.5.0 → laketower-0.6.0}/laketower/static/.gitkeep +0 -0
  63. {laketower-0.5.0 → laketower-0.6.0}/laketower/templates/_base.html +0 -0
  64. {laketower-0.5.0 → laketower-0.6.0}/laketower/templates/index.html +0 -0
  65. {laketower-0.5.0 → laketower-0.6.0}/renovate.json +0 -0
  66. {laketower-0.5.0 → laketower-0.6.0}/tests/__init__.py +0 -0
@@ -16,9 +16,9 @@ jobs:
16
16
  matrix:
17
17
  python-version: ["3.10", "3.11", "3.12", "3.13"]
18
18
  steps:
19
- - uses: actions/checkout@v4
19
+ - uses: actions/checkout@v5
20
20
  - name: Install uv
21
- uses: astral-sh/setup-uv@v5
21
+ uses: astral-sh/setup-uv@v6
22
22
  with:
23
23
  python-version: ${{ matrix.python-version }}
24
24
  enable-cache: true
@@ -47,19 +47,19 @@ jobs:
47
47
  CODECOV_MD_FILE: "coverage.md"
48
48
  CODECOV_REPORT_TITLE: "Code coverage report"
49
49
  steps:
50
- - uses: actions/checkout@v4
50
+ - uses: actions/checkout@v5
51
51
  with:
52
52
  ref: main
53
- - uses: actions/checkout@v4
53
+ - uses: actions/checkout@v5
54
54
  - name: Install uv
55
- uses: astral-sh/setup-uv@v5
55
+ uses: astral-sh/setup-uv@v6
56
56
  with:
57
57
  python-version: "3.13"
58
58
  enable-cache: true
59
59
  cache-dependency-glob: "uv.lock"
60
60
  - name: Install dependencies
61
61
  run: uv sync --all-extras --dev
62
- - uses: actions/download-artifact@v4
62
+ - uses: actions/download-artifact@v5
63
63
  with:
64
64
  name: coverage
65
65
  - name: Generate Markdown code coverage report
@@ -124,9 +124,9 @@ jobs:
124
124
  runs-on: ubuntu-latest
125
125
  needs: ci
126
126
  steps:
127
- - uses: actions/checkout@v4
127
+ - uses: actions/checkout@v5
128
128
  - name: Install uv
129
- uses: astral-sh/setup-uv@v5
129
+ uses: astral-sh/setup-uv@v6
130
130
  with:
131
131
  python-version: '3.13'
132
132
  enable-cache: true
@@ -154,7 +154,7 @@ jobs:
154
154
  id-token: write
155
155
  steps:
156
156
  - name: Download package build artifacts
157
- uses: actions/download-artifact@v4
157
+ uses: actions/download-artifact@v5
158
158
  with:
159
159
  name: build
160
160
  path: dist/
@@ -180,14 +180,14 @@ jobs:
180
180
  id-token: write
181
181
  steps:
182
182
  - name: Download package build artifacts
183
- uses: actions/download-artifact@v4
183
+ uses: actions/download-artifact@v5
184
184
  with:
185
185
  name: build
186
186
  path: dist/
187
187
  - name: Publish package distributions to PyPI
188
188
  uses: pypa/gh-action-pypi-publish@release/v1
189
189
  - name: Install uv
190
- uses: astral-sh/setup-uv@v5
190
+ uses: astral-sh/setup-uv@v6
191
191
  - name: Validate package is available with uvx
192
192
  run: uvx laketower --version
193
193
 
@@ -202,14 +202,14 @@ jobs:
202
202
  permissions:
203
203
  contents: write
204
204
  steps:
205
- - uses: actions/checkout@v4
205
+ - uses: actions/checkout@v5
206
206
  - name: Download package build artifacts
207
- uses: actions/download-artifact@v4
207
+ uses: actions/download-artifact@v5
208
208
  with:
209
209
  name: build
210
210
  path: dist/
211
211
  - name: Install uv
212
- uses: astral-sh/setup-uv@v5
212
+ uses: astral-sh/setup-uv@v6
213
213
  with:
214
214
  python-version: '3.13'
215
215
  enable-cache: true
@@ -7,6 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.0] - 2025-08-27
11
+ Minor release with new features (CSV import/export, S3/ADLS remote tables)
12
+ and quality of life improvements (tables lazy loading, quoted SQL identifiers).
13
+
14
+ ### Added
15
+ - cli: add csv export option to tables query command
16
+ - cli: add tables import command
17
+ - web: add csv export to query views
18
+ - web: add table import form
19
+ - allow environment variable substitution in YAML configuration
20
+ - support for remote Delta tables (S3, ADLS)
21
+
22
+ ### Changed
23
+ - cli: table uri lazy validation in app configuration
24
+ - web: table uri lazy validation in app configuration
25
+ - docs: update web application screenshots
26
+
27
+ ### Fixed
28
+ - cli: laketower python entrypoint script
29
+ - always use quoted SQL identifiers in query builder
30
+
31
+ ## [0.5.1] - 2025-05-30
32
+ Patch release with support for `deltalake` version 1.0.0.
33
+
34
+ ### Changes
35
+ - deps: upgrade to `deltalake` version 1
36
+
10
37
  ## [0.5.0] - 2025-03-19
11
38
  **Announcement:** Laketower open-source license is switching from AGPLv3 to Apache 2.0.
12
39
 
@@ -79,7 +106,9 @@ Initial release of `laketower`.
79
106
  - View a given table with simple query builder
80
107
  - Query all registered tables with DuckDB SQL dialect
81
108
 
82
- [Unreleased]: https://github.com/datalpia/laketower/compare/0.5.0...HEAD
109
+ [Unreleased]: https://github.com/datalpia/laketower/compare/0.6.0...HEAD
110
+ [0.6.0]: https://github.com/datalpia/laketower/compare/0.5.1...0.6.0
111
+ [0.5.1]: https://github.com/datalpia/laketower/compare/0.5.0...0.5.1
83
112
  [0.5.0]: https://github.com/datalpia/laketower/compare/0.4.1...0.5.0
84
113
  [0.4.1]: https://github.com/datalpia/laketower/compare/0.4.0...0.4.1
85
114
  [0.4.0]: https://github.com/datalpia/laketower/compare/0.3.0...0.4.0
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: laketower
3
- Version: 0.5.0
3
+ Version: 0.6.0
4
4
  Summary: Oversee your lakehouse
5
5
  Project-URL: Repository, https://github.com/datalpia/laketower
6
6
  Project-URL: Issues, https://github.com/datalpia/laketower/issues
7
- Project-URL: Changelog, https://github.com/datalpia/laketower/blob/master/CHANGELOG.md
7
+ Project-URL: Changelog, https://github.com/datalpia/laketower/blob/main/CHANGELOG.md
8
8
  Author-email: Romain Clement <git@romain-clement.net>
9
9
  License: Apache-2.0
10
10
  License-File: LICENSE
@@ -22,7 +22,7 @@ Classifier: Topic :: Database
22
22
  Classifier: Topic :: Software Development
23
23
  Classifier: Topic :: Utilities
24
24
  Requires-Python: <3.14,>=3.10
25
- Requires-Dist: deltalake
25
+ Requires-Dist: deltalake<2,>=1
26
26
  Requires-Dist: duckdb
27
27
  Requires-Dist: fastapi
28
28
  Requires-Dist: jinja2!=3.1.5,>=3
@@ -30,6 +30,7 @@ Requires-Dist: pandas
30
30
  Requires-Dist: pyarrow!=19.0.0
31
31
  Requires-Dist: pydantic-settings>=2
32
32
  Requires-Dist: pydantic>=2
33
+ Requires-Dist: python-multipart
33
34
  Requires-Dist: pyyaml
34
35
  Requires-Dist: rich
35
36
  Requires-Dist: sqlglot
@@ -50,13 +51,16 @@ Utility application to explore and manage tables in your data lakehouse, especia
50
51
  ## Features
51
52
 
52
53
  - Delta Lake table format support
54
+ - Remote tables support (S3, ADLS)
53
55
  - Inspect table metadata
54
56
  - Inspect table schema
55
57
  - Inspect table history
56
58
  - Get table statistics
59
+ - Import data into a table from CSV files
57
60
  - View table content with a simple query builder
58
61
  - Query all registered tables with DuckDB SQL dialect
59
62
  - Execute saved queries
63
+ - Export query results to CSV files
60
64
  - Static and versionable YAML configuration
61
65
  - Web application
62
66
  - CLI application
@@ -99,7 +103,9 @@ queries:
99
103
 
100
104
  Current limitations:
101
105
 
102
- - `tables.uri`: only local paths are allowed
106
+ - `tables.uri`:
107
+ - Local paths are supported (`./path/to/table`, `/abs/path/to/table`, `file:///abs/path/to/table`)
108
+ - Remote paths to S3 (`s3://<bucket>/<path>`) and ADLS (`abfss://<container>/<path>`)
103
109
  - `tables.format`: only `delta` is allowed
104
110
 
105
111
  Example from the provided demo:
@@ -138,6 +144,103 @@ queries:
138
144
  day asc
139
145
  ```
140
146
 
147
+ Support for environment variables substitution is also supported within the YAML
148
+ configuration using a object containing a single key `env` with the name of the
149
+ environment variable to be injected. The value of the variable can contain JSON
150
+ and will be decoded in a best effort manner (default to string value). For instance:
151
+
152
+ ```yaml
153
+ # export TABLE_URI=path/to/table
154
+
155
+ tables:
156
+ - name: sample_table
157
+ uri:
158
+ env: TABLE_URI
159
+ format: delta
160
+ ```
161
+
162
+ #### Remote S3 Tables
163
+
164
+ Configuring S3 tables (AWS, MinIO, Cloudflare R2):
165
+
166
+ ```yaml
167
+ tables:
168
+ - name: delta_table_s3
169
+ uri: s3://<bucket>/path/to/table
170
+ format: delta
171
+ connection:
172
+ s3:
173
+ s3_access_key_id: access-key-id
174
+ s3_secret_access_key: secret-access-key
175
+ s3_region: s3-region
176
+ s3_endpoint_url: http://s3.domain.com
177
+ s3_allow_http: false
178
+ ```
179
+
180
+ Depending on your object storage location and configuration, one might have to
181
+ set part or all the available `connection.s3` parameters. The only required ones
182
+ are `s3_access_key_id` and `s3_secret_access_key`.
183
+
184
+ Also as a security best practice, it is best not to write secrets directly in
185
+ static configuration files, so one can use environment variables to all dynamic substitution,
186
+ e.g.
187
+
188
+ ```yaml
189
+ tables:
190
+ - name: delta_table_s3
191
+ uri: s3://<bucket>/path/to/table
192
+ format: delta
193
+ connection:
194
+ s3:
195
+ s3_access_key_id: access-key-id
196
+ s3_secret_access_key:
197
+ env: S3_SECRET_ACCESS_KEY
198
+ s3_region: s3-region
199
+ s3_endpoint_url: http://s3.domain.com
200
+ s3_allow_http: false
201
+ ```
202
+
203
+ #### Remote ADLS Tables
204
+
205
+ Configuring Azure ADLS tables:
206
+
207
+ ```yaml
208
+ tables:
209
+ - name: delta_table_adls
210
+ uri: abfss://<container>/path/to/table
211
+ format: delta
212
+ connection:
213
+ adls:
214
+ adls_account_name: adls-account-name
215
+ adls_access_key: adls-access-key
216
+ adls_sas_key: adls-sas-key
217
+ adls_tenant_id: adls-tenant-id
218
+ adls_client_id: adls-client-id
219
+ adls_client_secret: adls-client-secret
220
+ azure_msi_endpoint: https://msi.azure.com
221
+ use_azure_cli: false
222
+ ```
223
+
224
+ Depending on your object storage location and configuration, one might have to
225
+ set part or all the available `connection.adls` parameters. The only required one
226
+ is `adls_account_name`.
227
+
228
+ Also as a security best practice, it is best not to write secrets directly in
229
+ static configuration files, so one can use environment variables to all dynamic substitution,
230
+ e.g.
231
+
232
+ ```yaml
233
+ tables:
234
+ - name: delta_table_adls
235
+ uri: abfss://<container>/path/to/table
236
+ format: delta
237
+ connection:
238
+ adls:
239
+ adls_account_name: adls-account-name
240
+ adls_access_key:
241
+ env: ADLS_ACCESS_KEY
242
+ ```
243
+
141
244
  ### Web Application
142
245
 
143
246
  The easiest way to get started is to launch the Laketower web application:
@@ -148,12 +251,13 @@ $ laketower -c demo/laketower.yml web
148
251
 
149
252
  #### Screenshots
150
253
 
151
- ![Laketower UI - Tables Overview](docs/static/tables_overview.png)
152
- ![Laketower UI - Tables View](docs/static/tables_view.png)
153
- ![Laketower UI - Tables Statistics](docs/static/tables_statistics.png)
154
- ![Laketower UI - Tables History](docs/static/tables_history.png)
155
- ![Laketower UI - Tables Query](docs/static/tables_query.png)
156
- ![Laketower UI - Queries View](docs/static/queries_view.png)
254
+ ![Laketower UI - Tables Overview](https://raw.githubusercontent.com/datalpia/laketower/refs/heads/main/docs/static/tables_overview.png)
255
+ ![Laketower UI - Tables View](https://raw.githubusercontent.com/datalpia/laketower/refs/heads/main/docs/static/tables_view.png)
256
+ ![Laketower UI - Tables Statistics](https://raw.githubusercontent.com/datalpia/laketower/refs/heads/main/docs/static/tables_statistics.png)
257
+ ![Laketower UI - Tables History](https://raw.githubusercontent.com/datalpia/laketower/refs/heads/main/docs/static/tables_history.png)
258
+ ![Laketower UI - Tables Import](https://raw.githubusercontent.com/datalpia/laketower/refs/heads/main/docs/static/tables_import.png)
259
+ ![Laketower UI - Tables Query](https://raw.githubusercontent.com/datalpia/laketower/refs/heads/main/docs/static/tables_query.png)
260
+ ![Laketower UI - Queries View](https://raw.githubusercontent.com/datalpia/laketower/refs/heads/main/docs/static/queries_view.png)
157
261
 
158
262
  ### CLI
159
263
 
@@ -321,6 +425,29 @@ $ laketower -c demo/laketower.yml tables statistics --version 0 weather
321
425
  └──────────────────────┴───────┴──────┴──────┴──────┴──────┘
322
426
  ```
323
427
 
428
+ #### Import data into a given table
429
+
430
+ Import a CSV dataset into a table in append mode:
431
+
432
+ ```bash
433
+ $ laketower -c demo/laketower.yml tables import weather --file data.csv --mode append --format csv --delimiter ',' --encoding 'utf-8'
434
+ ```
435
+
436
+ `--mode` argument can be one of:
437
+ - `append`: append rows to the table (default)
438
+ - `overwrite`: replace all rows with the ones from the input file
439
+
440
+ `--format` argument can be one of:
441
+ - `csv`: CSV file format (default)
442
+
443
+ `--delimiter` argument can be:
444
+ - Any single character (only valid for CSV file format)
445
+ - Default is _comma_ (`','`)
446
+
447
+ `--encoding` argument can be:
448
+ - Any [standard Python encoding](https://docs.python.org/3/library/codecs.html#standard-encodings),
449
+ - Default is `'utf-8'`
450
+
324
451
  #### View a given table
325
452
 
326
453
  Using a simple query builder, the content of a table can be displayed.
@@ -400,6 +527,14 @@ $ laketower -c demo/laketower.yml tables query "select date_trunc('day', time) a
400
527
  └───────────────────────────┴────────────────────┘
401
528
  ```
402
529
 
530
+ Export query results to CSV:
531
+
532
+ ```bash
533
+ $ laketower -c demo/laketower.yml tables query --output results.csv "select date_trunc('day', time) as day, avg(temperature_2m) as mean_temperature from weather group by day order by day desc limit 3"
534
+
535
+ Query results written to: results.csv
536
+ ```
537
+
403
538
  #### List saved queries
404
539
 
405
540
  ```bash
@@ -12,13 +12,16 @@ Utility application to explore and manage tables in your data lakehouse, especia
12
12
  ## Features
13
13
 
14
14
  - Delta Lake table format support
15
+ - Remote tables support (S3, ADLS)
15
16
  - Inspect table metadata
16
17
  - Inspect table schema
17
18
  - Inspect table history
18
19
  - Get table statistics
20
+ - Import data into a table from CSV files
19
21
  - View table content with a simple query builder
20
22
  - Query all registered tables with DuckDB SQL dialect
21
23
  - Execute saved queries
24
+ - Export query results to CSV files
22
25
  - Static and versionable YAML configuration
23
26
  - Web application
24
27
  - CLI application
@@ -61,7 +64,9 @@ queries:
61
64
 
62
65
  Current limitations:
63
66
 
64
- - `tables.uri`: only local paths are allowed
67
+ - `tables.uri`:
68
+ - Local paths are supported (`./path/to/table`, `/abs/path/to/table`, `file:///abs/path/to/table`)
69
+ - Remote paths to S3 (`s3://<bucket>/<path>`) and ADLS (`abfss://<container>/<path>`)
65
70
  - `tables.format`: only `delta` is allowed
66
71
 
67
72
  Example from the provided demo:
@@ -100,6 +105,103 @@ queries:
100
105
  day asc
101
106
  ```
102
107
 
108
+ Support for environment variables substitution is also supported within the YAML
109
+ configuration using a object containing a single key `env` with the name of the
110
+ environment variable to be injected. The value of the variable can contain JSON
111
+ and will be decoded in a best effort manner (default to string value). For instance:
112
+
113
+ ```yaml
114
+ # export TABLE_URI=path/to/table
115
+
116
+ tables:
117
+ - name: sample_table
118
+ uri:
119
+ env: TABLE_URI
120
+ format: delta
121
+ ```
122
+
123
+ #### Remote S3 Tables
124
+
125
+ Configuring S3 tables (AWS, MinIO, Cloudflare R2):
126
+
127
+ ```yaml
128
+ tables:
129
+ - name: delta_table_s3
130
+ uri: s3://<bucket>/path/to/table
131
+ format: delta
132
+ connection:
133
+ s3:
134
+ s3_access_key_id: access-key-id
135
+ s3_secret_access_key: secret-access-key
136
+ s3_region: s3-region
137
+ s3_endpoint_url: http://s3.domain.com
138
+ s3_allow_http: false
139
+ ```
140
+
141
+ Depending on your object storage location and configuration, one might have to
142
+ set part or all the available `connection.s3` parameters. The only required ones
143
+ are `s3_access_key_id` and `s3_secret_access_key`.
144
+
145
+ Also as a security best practice, it is best not to write secrets directly in
146
+ static configuration files, so one can use environment variables to all dynamic substitution,
147
+ e.g.
148
+
149
+ ```yaml
150
+ tables:
151
+ - name: delta_table_s3
152
+ uri: s3://<bucket>/path/to/table
153
+ format: delta
154
+ connection:
155
+ s3:
156
+ s3_access_key_id: access-key-id
157
+ s3_secret_access_key:
158
+ env: S3_SECRET_ACCESS_KEY
159
+ s3_region: s3-region
160
+ s3_endpoint_url: http://s3.domain.com
161
+ s3_allow_http: false
162
+ ```
163
+
164
+ #### Remote ADLS Tables
165
+
166
+ Configuring Azure ADLS tables:
167
+
168
+ ```yaml
169
+ tables:
170
+ - name: delta_table_adls
171
+ uri: abfss://<container>/path/to/table
172
+ format: delta
173
+ connection:
174
+ adls:
175
+ adls_account_name: adls-account-name
176
+ adls_access_key: adls-access-key
177
+ adls_sas_key: adls-sas-key
178
+ adls_tenant_id: adls-tenant-id
179
+ adls_client_id: adls-client-id
180
+ adls_client_secret: adls-client-secret
181
+ azure_msi_endpoint: https://msi.azure.com
182
+ use_azure_cli: false
183
+ ```
184
+
185
+ Depending on your object storage location and configuration, one might have to
186
+ set part or all the available `connection.adls` parameters. The only required one
187
+ is `adls_account_name`.
188
+
189
+ Also as a security best practice, it is best not to write secrets directly in
190
+ static configuration files, so one can use environment variables to all dynamic substitution,
191
+ e.g.
192
+
193
+ ```yaml
194
+ tables:
195
+ - name: delta_table_adls
196
+ uri: abfss://<container>/path/to/table
197
+ format: delta
198
+ connection:
199
+ adls:
200
+ adls_account_name: adls-account-name
201
+ adls_access_key:
202
+ env: ADLS_ACCESS_KEY
203
+ ```
204
+
103
205
  ### Web Application
104
206
 
105
207
  The easiest way to get started is to launch the Laketower web application:
@@ -110,12 +212,13 @@ $ laketower -c demo/laketower.yml web
110
212
 
111
213
  #### Screenshots
112
214
 
113
- ![Laketower UI - Tables Overview](docs/static/tables_overview.png)
114
- ![Laketower UI - Tables View](docs/static/tables_view.png)
115
- ![Laketower UI - Tables Statistics](docs/static/tables_statistics.png)
116
- ![Laketower UI - Tables History](docs/static/tables_history.png)
117
- ![Laketower UI - Tables Query](docs/static/tables_query.png)
118
- ![Laketower UI - Queries View](docs/static/queries_view.png)
215
+ ![Laketower UI - Tables Overview](https://raw.githubusercontent.com/datalpia/laketower/refs/heads/main/docs/static/tables_overview.png)
216
+ ![Laketower UI - Tables View](https://raw.githubusercontent.com/datalpia/laketower/refs/heads/main/docs/static/tables_view.png)
217
+ ![Laketower UI - Tables Statistics](https://raw.githubusercontent.com/datalpia/laketower/refs/heads/main/docs/static/tables_statistics.png)
218
+ ![Laketower UI - Tables History](https://raw.githubusercontent.com/datalpia/laketower/refs/heads/main/docs/static/tables_history.png)
219
+ ![Laketower UI - Tables Import](https://raw.githubusercontent.com/datalpia/laketower/refs/heads/main/docs/static/tables_import.png)
220
+ ![Laketower UI - Tables Query](https://raw.githubusercontent.com/datalpia/laketower/refs/heads/main/docs/static/tables_query.png)
221
+ ![Laketower UI - Queries View](https://raw.githubusercontent.com/datalpia/laketower/refs/heads/main/docs/static/queries_view.png)
119
222
 
120
223
  ### CLI
121
224
 
@@ -283,6 +386,29 @@ $ laketower -c demo/laketower.yml tables statistics --version 0 weather
283
386
  └──────────────────────┴───────┴──────┴──────┴──────┴──────┘
284
387
  ```
285
388
 
389
+ #### Import data into a given table
390
+
391
+ Import a CSV dataset into a table in append mode:
392
+
393
+ ```bash
394
+ $ laketower -c demo/laketower.yml tables import weather --file data.csv --mode append --format csv --delimiter ',' --encoding 'utf-8'
395
+ ```
396
+
397
+ `--mode` argument can be one of:
398
+ - `append`: append rows to the table (default)
399
+ - `overwrite`: replace all rows with the ones from the input file
400
+
401
+ `--format` argument can be one of:
402
+ - `csv`: CSV file format (default)
403
+
404
+ `--delimiter` argument can be:
405
+ - Any single character (only valid for CSV file format)
406
+ - Default is _comma_ (`','`)
407
+
408
+ `--encoding` argument can be:
409
+ - Any [standard Python encoding](https://docs.python.org/3/library/codecs.html#standard-encodings),
410
+ - Default is `'utf-8'`
411
+
286
412
  #### View a given table
287
413
 
288
414
  Using a simple query builder, the content of a table can be displayed.
@@ -362,6 +488,14 @@ $ laketower -c demo/laketower.yml tables query "select date_trunc('day', time) a
362
488
  └───────────────────────────┴────────────────────┘
363
489
  ```
364
490
 
491
+ Export query results to CSV:
492
+
493
+ ```bash
494
+ $ laketower -c demo/laketower.yml tables query --output results.csv "select date_trunc('day', time) as day, avg(temperature_2m) as mean_temperature from weather group by day order by day desc limit 3"
495
+
496
+ Query results written to: results.csv
497
+ ```
498
+
365
499
  #### List saved queries
366
500
 
367
501
  ```bash
@@ -5,6 +5,9 @@ tables:
5
5
  - name: weather
6
6
  uri: demo/weather
7
7
  format: delta
8
+ - name: invalid_uri_table
9
+ uri: demo/invalid_uri_table
10
+ format: delta
8
11
 
9
12
  queries:
10
13
  - name: all_data
@@ -0,0 +1 @@
1
+ __version__ = "0.6.0"