laketower 0.5.1__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.
- {laketower-0.5.1 → laketower-0.6.0}/.github/workflows/ci-cd.yml +9 -9
- {laketower-0.5.1 → laketower-0.6.0}/CHANGELOG.md +23 -1
- {laketower-0.5.1 → laketower-0.6.0}/PKG-INFO +137 -2
- {laketower-0.5.1 → laketower-0.6.0}/README.md +135 -1
- {laketower-0.5.1 → laketower-0.6.0}/demo/laketower.yml +3 -0
- laketower-0.6.0/docs/static/queries_view.png +0 -0
- laketower-0.6.0/docs/static/tables_history.png +0 -0
- laketower-0.6.0/docs/static/tables_import.png +0 -0
- laketower-0.6.0/docs/static/tables_overview.png +0 -0
- laketower-0.6.0/docs/static/tables_query.png +0 -0
- laketower-0.6.0/docs/static/tables_statistics.png +0 -0
- laketower-0.6.0/docs/static/tables_view.png +0 -0
- laketower-0.6.0/laketower/__about__.py +1 -0
- {laketower-0.5.1 → laketower-0.6.0}/laketower/cli.py +181 -87
- laketower-0.6.0/laketower/config.py +113 -0
- laketower-0.6.0/laketower/tables.py +295 -0
- {laketower-0.5.1 → laketower-0.6.0}/laketower/templates/queries/view.html +6 -0
- {laketower-0.5.1 → laketower-0.6.0}/laketower/templates/tables/_macros.html +3 -0
- {laketower-0.5.1 → laketower-0.6.0}/laketower/templates/tables/history.html +6 -0
- laketower-0.6.0/laketower/templates/tables/import.html +71 -0
- {laketower-0.5.1 → laketower-0.6.0}/laketower/templates/tables/index.html +6 -0
- {laketower-0.5.1 → laketower-0.6.0}/laketower/templates/tables/query.html +6 -0
- {laketower-0.5.1 → laketower-0.6.0}/laketower/templates/tables/statistics.html +6 -0
- {laketower-0.5.1 → laketower-0.6.0}/laketower/templates/tables/view.html +6 -0
- {laketower-0.5.1 → laketower-0.6.0}/laketower/web.py +144 -29
- {laketower-0.5.1 → laketower-0.6.0}/pyproject.toml +11 -10
- {laketower-0.5.1 → laketower-0.6.0}/tasks.py +13 -4
- {laketower-0.5.1 → laketower-0.6.0}/tests/conftest.py +50 -1
- {laketower-0.5.1 → laketower-0.6.0}/tests/test_cli.py +421 -26
- laketower-0.6.0/tests/test_config.py +228 -0
- laketower-0.6.0/tests/test_tables.py +98 -0
- {laketower-0.5.1 → laketower-0.6.0}/tests/test_web.py +311 -0
- laketower-0.6.0/uv.lock +1745 -0
- laketower-0.5.1/docs/static/queries_view.png +0 -0
- laketower-0.5.1/docs/static/tables_history.png +0 -0
- laketower-0.5.1/docs/static/tables_overview.png +0 -0
- laketower-0.5.1/docs/static/tables_query.png +0 -0
- laketower-0.5.1/docs/static/tables_statistics.png +0 -0
- laketower-0.5.1/docs/static/tables_view.png +0 -0
- laketower-0.5.1/laketower/__about__.py +0 -1
- laketower-0.5.1/laketower/config.py +0 -47
- laketower-0.5.1/laketower/tables.py +0 -141
- laketower-0.5.1/uv.lock +0 -1671
- {laketower-0.5.1 → laketower-0.6.0}/.gitignore +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/.python-version +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/LICENSE +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/demo/generate.py +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/demo/sample_table/_delta_log/00000000000000000000.json +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/demo/sample_table/_delta_log/00000000000000000001.json +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/demo/sample_table/_delta_log/00000000000000000002.json +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/demo/sample_table/_delta_log/00000000000000000003.json +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/demo/sample_table/part-00001-1a31a393-6db6-4d1a-bf4e-81ea061ff8cd-c000.snappy.parquet +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/demo/sample_table/part-00001-5af77102-9207-4c89-aaf6-37e1f815ec26-c000.snappy.parquet +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/demo/sample_table/part-00001-b11bab55-43d0-4d05-ae88-5b9481ae57db-c000.snappy.parquet +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/demo/weather/_delta_log/00000000000000000000.json +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/demo/weather/_delta_log/00000000000000000001.json +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/demo/weather/_delta_log/00000000000000000002.json +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/demo/weather/part-00001-2323b963-be56-44e0-8c10-e237e7e6d4b9-c000.snappy.parquet +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/demo/weather/part-00001-6360cbf8-f8a9-475f-8729-6f20b4ca64a9-c000.snappy.parquet +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/laketower/__init__.py +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/laketower/__main__.py +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/laketower/static/.gitkeep +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/laketower/templates/_base.html +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/laketower/templates/index.html +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/renovate.json +0 -0
- {laketower-0.5.1 → laketower-0.6.0}/tests/__init__.py +0 -0
|
@@ -16,7 +16,7 @@ jobs:
|
|
|
16
16
|
matrix:
|
|
17
17
|
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
18
18
|
steps:
|
|
19
|
-
- uses: actions/checkout@
|
|
19
|
+
- uses: actions/checkout@v5
|
|
20
20
|
- name: Install uv
|
|
21
21
|
uses: astral-sh/setup-uv@v6
|
|
22
22
|
with:
|
|
@@ -47,10 +47,10 @@ jobs:
|
|
|
47
47
|
CODECOV_MD_FILE: "coverage.md"
|
|
48
48
|
CODECOV_REPORT_TITLE: "Code coverage report"
|
|
49
49
|
steps:
|
|
50
|
-
- uses: actions/checkout@
|
|
50
|
+
- uses: actions/checkout@v5
|
|
51
51
|
with:
|
|
52
52
|
ref: main
|
|
53
|
-
- uses: actions/checkout@
|
|
53
|
+
- uses: actions/checkout@v5
|
|
54
54
|
- name: Install uv
|
|
55
55
|
uses: astral-sh/setup-uv@v6
|
|
56
56
|
with:
|
|
@@ -59,7 +59,7 @@ jobs:
|
|
|
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@
|
|
62
|
+
- uses: actions/download-artifact@v5
|
|
63
63
|
with:
|
|
64
64
|
name: coverage
|
|
65
65
|
- name: Generate Markdown code coverage report
|
|
@@ -124,7 +124,7 @@ jobs:
|
|
|
124
124
|
runs-on: ubuntu-latest
|
|
125
125
|
needs: ci
|
|
126
126
|
steps:
|
|
127
|
-
- uses: actions/checkout@
|
|
127
|
+
- uses: actions/checkout@v5
|
|
128
128
|
- name: Install uv
|
|
129
129
|
uses: astral-sh/setup-uv@v6
|
|
130
130
|
with:
|
|
@@ -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@
|
|
157
|
+
uses: actions/download-artifact@v5
|
|
158
158
|
with:
|
|
159
159
|
name: build
|
|
160
160
|
path: dist/
|
|
@@ -180,7 +180,7 @@ jobs:
|
|
|
180
180
|
id-token: write
|
|
181
181
|
steps:
|
|
182
182
|
- name: Download package build artifacts
|
|
183
|
-
uses: actions/download-artifact@
|
|
183
|
+
uses: actions/download-artifact@v5
|
|
184
184
|
with:
|
|
185
185
|
name: build
|
|
186
186
|
path: dist/
|
|
@@ -202,9 +202,9 @@ jobs:
|
|
|
202
202
|
permissions:
|
|
203
203
|
contents: write
|
|
204
204
|
steps:
|
|
205
|
-
- uses: actions/checkout@
|
|
205
|
+
- uses: actions/checkout@v5
|
|
206
206
|
- name: Download package build artifacts
|
|
207
|
-
uses: actions/download-artifact@
|
|
207
|
+
uses: actions/download-artifact@v5
|
|
208
208
|
with:
|
|
209
209
|
name: build
|
|
210
210
|
path: dist/
|
|
@@ -7,6 +7,27 @@ 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
|
+
|
|
10
31
|
## [0.5.1] - 2025-05-30
|
|
11
32
|
Patch release with support for `deltalake` version 1.0.0.
|
|
12
33
|
|
|
@@ -85,7 +106,8 @@ Initial release of `laketower`.
|
|
|
85
106
|
- View a given table with simple query builder
|
|
86
107
|
- Query all registered tables with DuckDB SQL dialect
|
|
87
108
|
|
|
88
|
-
[Unreleased]: https://github.com/datalpia/laketower/compare/0.
|
|
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
|
|
89
111
|
[0.5.1]: https://github.com/datalpia/laketower/compare/0.5.0...0.5.1
|
|
90
112
|
[0.5.0]: https://github.com/datalpia/laketower/compare/0.4.1...0.5.0
|
|
91
113
|
[0.4.1]: https://github.com/datalpia/laketower/compare/0.4.0...0.4.1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: laketower
|
|
3
|
-
Version: 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
|
|
@@ -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`:
|
|
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:
|
|
@@ -152,6 +255,7 @@ $ laketower -c demo/laketower.yml web
|
|
|
152
255
|

|
|
153
256
|

|
|
154
257
|

|
|
258
|
+

|
|
155
259
|

|
|
156
260
|

|
|
157
261
|
|
|
@@ -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`:
|
|
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:
|
|
@@ -114,6 +216,7 @@ $ laketower -c demo/laketower.yml web
|
|
|
114
216
|

|
|
115
217
|

|
|
116
218
|

|
|
219
|
+

|
|
117
220
|

|
|
118
221
|

|
|
119
222
|
|
|
@@ -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
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.6.0"
|