pointblank 0.11.0__py3-none-any.whl → 0.11.2__py3-none-any.whl
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.
- pointblank/assistant.py +14 -3
- pointblank/cli.py +2853 -1686
- pointblank/compare.py +9 -0
- pointblank/datascan.py +25 -3
- pointblank/validate.py +346 -37
- {pointblank-0.11.0.dist-info → pointblank-0.11.2.dist-info}/METADATA +28 -24
- {pointblank-0.11.0.dist-info → pointblank-0.11.2.dist-info}/RECORD +11 -11
- {pointblank-0.11.0.dist-info → pointblank-0.11.2.dist-info}/WHEEL +0 -0
- {pointblank-0.11.0.dist-info → pointblank-0.11.2.dist-info}/entry_points.txt +0 -0
- {pointblank-0.11.0.dist-info → pointblank-0.11.2.dist-info}/licenses/LICENSE +0 -0
- {pointblank-0.11.0.dist-info → pointblank-0.11.2.dist-info}/top_level.txt +0 -0
pointblank/assistant.py
CHANGED
|
@@ -59,8 +59,9 @@ def assistant(
|
|
|
59
59
|
`"ollama"`, and `"bedrock"`.
|
|
60
60
|
data
|
|
61
61
|
An optional data table to focus on during discussion with the PbA, which could be a
|
|
62
|
-
DataFrame object
|
|
63
|
-
|
|
62
|
+
DataFrame object, an Ibis table object, a CSV file path, a Parquet file path, or a database
|
|
63
|
+
connection string. Read the *Supported Input Table Types* section for details on the
|
|
64
|
+
supported table types.
|
|
64
65
|
tbl_name : str, optional
|
|
65
66
|
The name of the data table. This is optional and is only used to provide a more detailed
|
|
66
67
|
prompt to the PbA.
|
|
@@ -142,9 +143,13 @@ def assistant(
|
|
|
142
143
|
- PostgreSQL table (`"postgresql"`)*
|
|
143
144
|
- SQLite table (`"sqlite"`)*
|
|
144
145
|
- Parquet table (`"parquet"`)*
|
|
146
|
+
- CSV files (string path or `pathlib.Path` object with `.csv` extension)
|
|
147
|
+
- Parquet files (string path, `pathlib.Path` object, glob pattern, directory with `.parquet`
|
|
148
|
+
extension, or partitioned dataset)
|
|
149
|
+
- Database connection strings (URI format with optional table specification)
|
|
145
150
|
|
|
146
151
|
The table types marked with an asterisk need to be prepared as Ibis tables (with type of
|
|
147
|
-
`ibis.expr.types.relations.Table`). Furthermore, using `
|
|
152
|
+
`ibis.expr.types.relations.Table`). Furthermore, using `assistant()` with these types of tables
|
|
148
153
|
requires the Ibis library (`v9.5.0` or above) to be installed. If the input table is a Polars or
|
|
149
154
|
Pandas DataFrame, the availability of Ibis is not needed.
|
|
150
155
|
"""
|
|
@@ -174,6 +179,12 @@ def assistant(
|
|
|
174
179
|
|
|
175
180
|
# If a dataset is provided, generate a table summary in JSON format
|
|
176
181
|
if data is not None:
|
|
182
|
+
# Import processing functions from validate module
|
|
183
|
+
from pointblank.validate import _process_data
|
|
184
|
+
|
|
185
|
+
# Process input data to handle different data source types
|
|
186
|
+
data = _process_data(data)
|
|
187
|
+
|
|
177
188
|
scan = DataScan(data=data)
|
|
178
189
|
|
|
179
190
|
tbl_type: str = scan.profile.implementation.name.lower()
|