outerproduct 0.2.1__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of outerproduct might be problematic. Click here for more details.
- {outerproduct-0.2.1 → outerproduct-0.2.3}/PKG-INFO +1 -1
- {outerproduct-0.2.1 → outerproduct-0.2.3}/pyproject.toml +1 -1
- {outerproduct-0.2.1 → outerproduct-0.2.3}/src/outerproduct/__init__.py +17 -4
- {outerproduct-0.2.1 → outerproduct-0.2.3}/src/outerproduct/agentic/documents.py +14 -11
- {outerproduct-0.2.1 → outerproduct-0.2.3}/src/outerproduct/client/apis.py +26 -0
- {outerproduct-0.2.1 → outerproduct-0.2.3}/src/outerproduct/client/client.py +7 -0
- {outerproduct-0.2.1 → outerproduct-0.2.3}/src/outerproduct/client/endpoints.py +24 -0
- {outerproduct-0.2.1 → outerproduct-0.2.3}/src/outerproduct/connector.py +28 -31
- outerproduct-0.2.3/src/outerproduct/dataset.py +460 -0
- {outerproduct-0.2.1 → outerproduct-0.2.3}/src/outerproduct/model.py +93 -72
- {outerproduct-0.2.1 → outerproduct-0.2.3}/src/outerproduct/reasoning/__init__.py +24 -37
- {outerproduct-0.2.1 → outerproduct-0.2.3}/src/outerproduct/reasoning/pattern_tracker.py +21 -75
- {outerproduct-0.2.1 → outerproduct-0.2.3}/src/outerproduct/trainer.py +45 -77
- outerproduct-0.2.1/src/outerproduct/dataset.py +0 -469
- {outerproduct-0.2.1 → outerproduct-0.2.3}/.gitignore +0 -0
- {outerproduct-0.2.1 → outerproduct-0.2.3}/LICENSE +0 -0
- {outerproduct-0.2.1 → outerproduct-0.2.3}/README.md +0 -0
- {outerproduct-0.2.1 → outerproduct-0.2.3}/src/outerproduct/agentic/__init__.py +0 -0
- {outerproduct-0.2.1 → outerproduct-0.2.3}/src/outerproduct/client/__init__.py +0 -0
- {outerproduct-0.2.1 → outerproduct-0.2.3}/src/outerproduct/client/_http.py +0 -0
- {outerproduct-0.2.1 → outerproduct-0.2.3}/src/outerproduct/client/exceptions.py +0 -0
- {outerproduct-0.2.1 → outerproduct-0.2.3}/src/outerproduct/job.py +0 -0
- {outerproduct-0.2.1 → outerproduct-0.2.3}/src/outerproduct/py.typed +0 -0
- {outerproduct-0.2.1 → outerproduct-0.2.3}/src/outerproduct/utils.py +0 -0
|
@@ -33,10 +33,11 @@ Quickstart
|
|
|
33
33
|
|
|
34
34
|
op.init(api_key="...")
|
|
35
35
|
connector = op.FileUploadConnector()
|
|
36
|
-
dataset = connector.upload("customers.csv"
|
|
37
|
-
reasoning_model = op.reasoning.fit(dataset)
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
dataset = connector.upload("customers.csv")
|
|
37
|
+
reasoning_model = op.reasoning.fit(dataset, label_column="churn")
|
|
38
|
+
test_dataset = op.Dataset(X_new)
|
|
39
|
+
predictions = reasoning_model.predict(test_dataset)
|
|
40
|
+
reasoning = reasoning_model.explain(test_dataset)
|
|
40
41
|
"""
|
|
41
42
|
|
|
42
43
|
from __future__ import annotations
|
|
@@ -124,9 +125,21 @@ def init(
|
|
|
124
125
|
_state.hardware = hardware
|
|
125
126
|
|
|
126
127
|
|
|
128
|
+
def get_datasets() -> list[Dataset]:
|
|
129
|
+
"""List datasets owned by the configured API key."""
|
|
130
|
+
from outerproduct.client import OuterProductClient
|
|
131
|
+
|
|
132
|
+
with OuterProductClient.from_credentials(_state.base_url, _state.api_key) as client:
|
|
133
|
+
response = client.datasets_api.list()
|
|
134
|
+
return [
|
|
135
|
+
Dataset._from_id(dataset.id, response=dataset) for dataset in response.datasets
|
|
136
|
+
]
|
|
137
|
+
|
|
138
|
+
|
|
127
139
|
__all__ = [
|
|
128
140
|
# Bootstrap
|
|
129
141
|
"init",
|
|
142
|
+
"get_datasets",
|
|
130
143
|
"__version__",
|
|
131
144
|
# Dataset
|
|
132
145
|
"Dataset",
|
|
@@ -16,7 +16,7 @@ Typical flow::
|
|
|
16
16
|
refs = upload(docs) # one-time upload
|
|
17
17
|
schema = induce_schema(refs, use_case="audit", skill="invoice")
|
|
18
18
|
ds = tabularize(refs, schema) # remote DocumentDataset
|
|
19
|
-
trainer.run(ds) #
|
|
19
|
+
trainer.run(ds) # sends dataset_id
|
|
20
20
|
|
|
21
21
|
``upload`` is explicit so the same documents can feed both
|
|
22
22
|
:func:`induce_schema` and :func:`tabularize` without re-uploading.
|
|
@@ -288,11 +288,8 @@ class DocumentDataset(Dataset):
|
|
|
288
288
|
"""A remote-handle :class:`Dataset` whose rows are tabularized
|
|
289
289
|
documents and columns are :class:`DocumentSchema` questions.
|
|
290
290
|
|
|
291
|
-
Holds no rows locally. The tabularized table
|
|
292
|
-
OuterProduct backend under ``dataset_id
|
|
293
|
-
pre-uploaded datasets), and the trainer/reasoning APIs fetch from
|
|
294
|
-
that location server-side via the standard ``data_uploaded=True``
|
|
295
|
-
wire mode.
|
|
291
|
+
Holds no rows locally. The tabularized table already exists on the
|
|
292
|
+
OuterProduct backend under ``dataset_id``.
|
|
296
293
|
|
|
297
294
|
Construct directly when you already have a tabularize ``dataset_id``,
|
|
298
295
|
or — more commonly — let :func:`tabularize` build one for you.
|
|
@@ -310,8 +307,15 @@ class DocumentDataset(Dataset):
|
|
|
310
307
|
import pandas as pd
|
|
311
308
|
|
|
312
309
|
empty = pd.DataFrame(columns=pd.Index([q.id for q in schema.questions]))
|
|
313
|
-
|
|
314
|
-
self.
|
|
310
|
+
self._df = empty
|
|
311
|
+
self._label_column = label_column
|
|
312
|
+
self._explicit_columns = columns or [
|
|
313
|
+
Column(name=q.id) for q in schema.questions
|
|
314
|
+
]
|
|
315
|
+
self._id = dataset_id
|
|
316
|
+
self._connector_id = None
|
|
317
|
+
self._table_name = None
|
|
318
|
+
self._remote_only = True
|
|
315
319
|
self._schema = schema
|
|
316
320
|
self._document_ids = list(document_ids)
|
|
317
321
|
|
|
@@ -326,8 +330,7 @@ class DocumentDataset(Dataset):
|
|
|
326
330
|
@property
|
|
327
331
|
def dataset_id(self) -> str:
|
|
328
332
|
"""The tabularize-job ``dataset_id`` that backs this dataset on the server."""
|
|
329
|
-
|
|
330
|
-
return self._upload_id
|
|
333
|
+
return self.id
|
|
331
334
|
|
|
332
335
|
@property
|
|
333
336
|
def n_samples(self) -> int:
|
|
@@ -476,7 +479,7 @@ def tabularize(
|
|
|
476
479
|
The tabularized rows are written to object storage on the backend;
|
|
477
480
|
the returned :class:`DocumentDataset` is a remote handle that
|
|
478
481
|
:class:`~outerproduct.Trainer` and :func:`~outerproduct.reasoning.fit`
|
|
479
|
-
consume directly via the standard ``
|
|
482
|
+
consume directly via the standard ``dataset_id`` wire mode.
|
|
480
483
|
No rows are downloaded to the client.
|
|
481
484
|
"""
|
|
482
485
|
op = _resolve_client(client)
|
|
@@ -18,6 +18,8 @@ from outerproduct_http_types import (
|
|
|
18
18
|
CreateDocumentUploadResponse,
|
|
19
19
|
CreateUploadRequest,
|
|
20
20
|
CreateUploadResponse,
|
|
21
|
+
Dataset,
|
|
22
|
+
DatasetResponse,
|
|
21
23
|
DeleteConnectorResponse,
|
|
22
24
|
ExplainRequest,
|
|
23
25
|
ExplainResponse,
|
|
@@ -26,6 +28,7 @@ from outerproduct_http_types import (
|
|
|
26
28
|
InduceSchemaJobResponse,
|
|
27
29
|
InduceSchemaRequest,
|
|
28
30
|
ListConnectorsResponse,
|
|
31
|
+
ListDatasetsResponse,
|
|
29
32
|
ListTablesRequest,
|
|
30
33
|
ListTablesResponse,
|
|
31
34
|
PatternTrackerApplyRequest,
|
|
@@ -54,16 +57,19 @@ from outerproduct_http_types import (
|
|
|
54
57
|
|
|
55
58
|
from outerproduct.client.endpoints import (
|
|
56
59
|
CREATE_CONNECTOR,
|
|
60
|
+
CREATE_DATASET,
|
|
57
61
|
CREATE_DOCUMENT_UPLOAD,
|
|
58
62
|
CREATE_UPLOAD,
|
|
59
63
|
DELETE_CONNECTOR,
|
|
60
64
|
EXPLAIN,
|
|
61
65
|
GET_CONNECTOR,
|
|
66
|
+
GET_DATASET,
|
|
62
67
|
GET_DOCUMENT_SCHEMA,
|
|
63
68
|
GET_DOCUMENT_TABLE,
|
|
64
69
|
GLOBAL_DRIVERS,
|
|
65
70
|
INDUCE_DOCUMENT_SCHEMA,
|
|
66
71
|
LIST_CONNECTORS,
|
|
72
|
+
LIST_DATASETS,
|
|
67
73
|
LIST_TABLES,
|
|
68
74
|
PATTERN_TRACKER_DISTRIBUTION,
|
|
69
75
|
PATTERN_TRACKER_FIT,
|
|
@@ -145,6 +151,25 @@ class ReasoningAPI:
|
|
|
145
151
|
return self._client._post(REASONING_FIT, request)
|
|
146
152
|
|
|
147
153
|
|
|
154
|
+
class DatasetsAPI:
|
|
155
|
+
"""CRUD for first-class datasets."""
|
|
156
|
+
|
|
157
|
+
def __init__(self, client: OuterProductClient) -> None:
|
|
158
|
+
self._client = client
|
|
159
|
+
|
|
160
|
+
def create(self, request: Dataset) -> DatasetResponse:
|
|
161
|
+
return self._client._post( # ty: ignore[invalid-return-type]
|
|
162
|
+
CREATE_DATASET, # ty: ignore[invalid-argument-type]
|
|
163
|
+
request,
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
def list(self) -> ListDatasetsResponse:
|
|
167
|
+
return self._client._get(LIST_DATASETS)
|
|
168
|
+
|
|
169
|
+
def get(self, dataset_id: str) -> DatasetResponse:
|
|
170
|
+
return self._client._get(GET_DATASET, dataset_id=dataset_id)
|
|
171
|
+
|
|
172
|
+
|
|
148
173
|
class InferenceAPI:
|
|
149
174
|
"""Synchronous inference on ``/v1/models/{model_id}/...``."""
|
|
150
175
|
|
|
@@ -285,6 +310,7 @@ class ConnectorsAPI:
|
|
|
285
310
|
__all__ = [
|
|
286
311
|
"AgenticDocumentsAPI",
|
|
287
312
|
"ConnectorsAPI",
|
|
313
|
+
"DatasetsAPI",
|
|
288
314
|
"InferenceAPI",
|
|
289
315
|
"PatternTrackerAPI",
|
|
290
316
|
"ReasoningAPI",
|
|
@@ -30,6 +30,7 @@ if TYPE_CHECKING:
|
|
|
30
30
|
from outerproduct.client.apis import (
|
|
31
31
|
AgenticDocumentsAPI,
|
|
32
32
|
ConnectorsAPI,
|
|
33
|
+
DatasetsAPI,
|
|
33
34
|
InferenceAPI,
|
|
34
35
|
PatternTrackerAPI,
|
|
35
36
|
ReasoningAPI,
|
|
@@ -180,6 +181,12 @@ class OuterProductClient:
|
|
|
180
181
|
|
|
181
182
|
return ConnectorsAPI(self)
|
|
182
183
|
|
|
184
|
+
@property
|
|
185
|
+
def datasets_api(self) -> DatasetsAPI:
|
|
186
|
+
from outerproduct.client.apis import DatasetsAPI
|
|
187
|
+
|
|
188
|
+
return DatasetsAPI(self)
|
|
189
|
+
|
|
183
190
|
@property
|
|
184
191
|
def agentic_documents_api(self) -> AgenticDocumentsAPI:
|
|
185
192
|
from outerproduct.client.apis import AgenticDocumentsAPI
|
|
@@ -24,6 +24,8 @@ from outerproduct_http_types import (
|
|
|
24
24
|
CreateDocumentUploadResponse,
|
|
25
25
|
CreateUploadRequest,
|
|
26
26
|
CreateUploadResponse,
|
|
27
|
+
Dataset,
|
|
28
|
+
DatasetResponse,
|
|
27
29
|
DeleteConnectorResponse,
|
|
28
30
|
ExplainRequest,
|
|
29
31
|
ExplainResponse,
|
|
@@ -32,6 +34,7 @@ from outerproduct_http_types import (
|
|
|
32
34
|
InduceSchemaJobResponse,
|
|
33
35
|
InduceSchemaRequest,
|
|
34
36
|
ListConnectorsResponse,
|
|
37
|
+
ListDatasetsResponse,
|
|
35
38
|
ListTablesRequest,
|
|
36
39
|
ListTablesResponse,
|
|
37
40
|
PatternTrackerApplyRequest,
|
|
@@ -151,6 +154,24 @@ REASONING_FIT = PostEndpoint(
|
|
|
151
154
|
response_type=ReasoningFitResponse,
|
|
152
155
|
)
|
|
153
156
|
|
|
157
|
+
# --------------------------------------------------------------------------- #
|
|
158
|
+
# Datasets #
|
|
159
|
+
# --------------------------------------------------------------------------- #
|
|
160
|
+
|
|
161
|
+
CREATE_DATASET = PostEndpoint(
|
|
162
|
+
path="datasets",
|
|
163
|
+
request_type=Dataset, # ty: ignore[invalid-argument-type]
|
|
164
|
+
response_type=DatasetResponse,
|
|
165
|
+
)
|
|
166
|
+
LIST_DATASETS = GetEndpoint(
|
|
167
|
+
path="datasets",
|
|
168
|
+
response_type=ListDatasetsResponse,
|
|
169
|
+
)
|
|
170
|
+
GET_DATASET = GetEndpoint(
|
|
171
|
+
path="datasets/{dataset_id}",
|
|
172
|
+
response_type=DatasetResponse,
|
|
173
|
+
)
|
|
174
|
+
|
|
154
175
|
# --------------------------------------------------------------------------- #
|
|
155
176
|
# Status (cross-cutting; covers fit / fit-distill / segment) #
|
|
156
177
|
# --------------------------------------------------------------------------- #
|
|
@@ -257,18 +278,21 @@ VALIDATE_CONNECTOR = PostEndpoint(
|
|
|
257
278
|
|
|
258
279
|
__all__ = [
|
|
259
280
|
"CREATE_CONNECTOR",
|
|
281
|
+
"CREATE_DATASET",
|
|
260
282
|
"CREATE_DOCUMENT_UPLOAD",
|
|
261
283
|
"CREATE_UPLOAD",
|
|
262
284
|
"DELETE_CONNECTOR",
|
|
263
285
|
"DeleteEndpoint",
|
|
264
286
|
"EXPLAIN",
|
|
265
287
|
"GET_CONNECTOR",
|
|
288
|
+
"GET_DATASET",
|
|
266
289
|
"GET_DOCUMENT_SCHEMA",
|
|
267
290
|
"GET_DOCUMENT_TABLE",
|
|
268
291
|
"GLOBAL_DRIVERS",
|
|
269
292
|
"GetEndpoint",
|
|
270
293
|
"INDUCE_DOCUMENT_SCHEMA",
|
|
271
294
|
"LIST_CONNECTORS",
|
|
295
|
+
"LIST_DATASETS",
|
|
272
296
|
"LIST_TABLES",
|
|
273
297
|
"PATTERN_TRACKER_DISTRIBUTION",
|
|
274
298
|
"PATTERN_TRACKER_FIT",
|
|
@@ -17,11 +17,11 @@ Examples
|
|
|
17
17
|
|
|
18
18
|
# File upload (local files):
|
|
19
19
|
connector = op.FileUploadConnector()
|
|
20
|
-
dataset = connector.upload("data.csv"
|
|
20
|
+
dataset = connector.upload("data.csv")
|
|
21
21
|
|
|
22
22
|
# S3 connector (registered with backend):
|
|
23
23
|
s3 = op.S3Connector("my-s3", root_dir="s3://bucket/prefix")
|
|
24
|
-
dataset = s3.table("customers.csv"
|
|
24
|
+
dataset = s3.table("customers.csv")
|
|
25
25
|
|
|
26
26
|
# Snowflake connector:
|
|
27
27
|
sf = op.SnowflakeConnector(
|
|
@@ -32,7 +32,7 @@ Examples
|
|
|
32
32
|
schema_name="PUBLIC",
|
|
33
33
|
credentials={"user": "admin", "password": "secret"},
|
|
34
34
|
)
|
|
35
|
-
dataset = sf.table("customers"
|
|
35
|
+
dataset = sf.table("customers")
|
|
36
36
|
|
|
37
37
|
# Databricks connector:
|
|
38
38
|
db = op.DatabricksConnector(
|
|
@@ -43,7 +43,7 @@ Examples
|
|
|
43
43
|
schema="default",
|
|
44
44
|
credentials={"access_token": "dapi-..."},
|
|
45
45
|
)
|
|
46
|
-
dataset = db.table("customers"
|
|
46
|
+
dataset = db.table("customers")
|
|
47
47
|
|
|
48
48
|
Credentials handling
|
|
49
49
|
--------------------
|
|
@@ -177,24 +177,18 @@ class Connector(ABC):
|
|
|
177
177
|
"""
|
|
178
178
|
return name in self.table_names()
|
|
179
179
|
|
|
180
|
-
def table(self, name: str
|
|
181
|
-
"""
|
|
180
|
+
def table(self, name: str) -> Dataset:
|
|
181
|
+
"""Build a connector-backed :class:`~outerproduct.dataset.Dataset` spec.
|
|
182
182
|
|
|
183
|
-
The
|
|
184
|
-
|
|
183
|
+
The dataset rides inline on fit/predict requests; the target
|
|
184
|
+
column is selected at fit time via the ``label_column`` parameter
|
|
185
|
+
on :func:`~outerproduct.reasoning.fit` /
|
|
186
|
+
:meth:`~outerproduct.trainer.Trainer.configure`, not on the dataset.
|
|
185
187
|
|
|
186
188
|
Parameters
|
|
187
189
|
----------
|
|
188
190
|
name : str
|
|
189
191
|
Table name or object path within the connector.
|
|
190
|
-
label_column : str, optional
|
|
191
|
-
Name of the target column for supervised training.
|
|
192
|
-
|
|
193
|
-
Returns
|
|
194
|
-
-------
|
|
195
|
-
:class:`~outerproduct.dataset.Dataset`
|
|
196
|
-
A connector-backed dataset ready for :class:`~outerproduct.trainer.Trainer`
|
|
197
|
-
or :func:`~outerproduct.reasoning.fit`.
|
|
198
192
|
"""
|
|
199
193
|
from outerproduct.dataset import Dataset
|
|
200
194
|
|
|
@@ -204,7 +198,6 @@ class Connector(ABC):
|
|
|
204
198
|
return Dataset._from_connector_ref(
|
|
205
199
|
connector_id=self._connector_id,
|
|
206
200
|
table_name=name,
|
|
207
|
-
label_column=label_column,
|
|
208
201
|
)
|
|
209
202
|
|
|
210
203
|
def validate(self) -> bool:
|
|
@@ -352,7 +345,7 @@ class Connector(ABC):
|
|
|
352
345
|
|
|
353
346
|
|
|
354
347
|
# ---------------------------------------------------------------------------
|
|
355
|
-
# File upload connector (
|
|
348
|
+
# File upload connector (local file -> uploaded dataset)
|
|
356
349
|
# ---------------------------------------------------------------------------
|
|
357
350
|
|
|
358
351
|
|
|
@@ -363,10 +356,11 @@ class FileUploadConnector:
|
|
|
363
356
|
|
|
364
357
|
1. Request a presigned upload URL from the server.
|
|
365
358
|
2. ``PUT`` the raw file bytes to that URL.
|
|
366
|
-
3.
|
|
359
|
+
3. Register the uploaded object as a first-class dataset row.
|
|
360
|
+
4. Return a :class:`~outerproduct.dataset.Dataset` referring to that row.
|
|
367
361
|
|
|
368
|
-
This connector does
|
|
369
|
-
|
|
362
|
+
This connector itself does not create a persistent connector config; it is
|
|
363
|
+
a local-file helper that produces dataset rows.
|
|
370
364
|
|
|
371
365
|
Examples
|
|
372
366
|
--------
|
|
@@ -374,7 +368,7 @@ class FileUploadConnector:
|
|
|
374
368
|
|
|
375
369
|
import outerproduct as op
|
|
376
370
|
connector = op.FileUploadConnector()
|
|
377
|
-
dataset = connector.upload("data.csv"
|
|
371
|
+
dataset = connector.upload("data.csv")
|
|
378
372
|
"""
|
|
379
373
|
|
|
380
374
|
_FORMAT_MAP: dict[str, str] = {
|
|
@@ -389,7 +383,6 @@ class FileUploadConnector:
|
|
|
389
383
|
self,
|
|
390
384
|
path: str | Path,
|
|
391
385
|
*,
|
|
392
|
-
label_column: str | None = None,
|
|
393
386
|
name: str | None = None,
|
|
394
387
|
) -> Dataset:
|
|
395
388
|
"""Upload a local data file and return a :class:`~outerproduct.dataset.Dataset`.
|
|
@@ -399,8 +392,6 @@ class FileUploadConnector:
|
|
|
399
392
|
path : str or pathlib.Path
|
|
400
393
|
Path to a local file. Supported formats: ``.csv``,
|
|
401
394
|
``.parquet``, ``.pkl``.
|
|
402
|
-
label_column : str, optional
|
|
403
|
-
Name of the target column, if any.
|
|
404
395
|
name : str, optional
|
|
405
396
|
Caller-supplied label, retained for display.
|
|
406
397
|
|
|
@@ -488,6 +479,7 @@ class FileUploadConnector:
|
|
|
488
479
|
put_resp.raise_for_status()
|
|
489
480
|
|
|
490
481
|
# 4. Parse the same bytes into a DataFrame for the local Dataset.
|
|
482
|
+
# The spec rides inline on fit/predict requests; no POST /v1/datasets.
|
|
491
483
|
if file_format == "csv":
|
|
492
484
|
df = pd.read_csv(io.BytesIO(file_bytes))
|
|
493
485
|
elif file_format == "parquet":
|
|
@@ -496,9 +488,14 @@ class FileUploadConnector:
|
|
|
496
488
|
raw = pd.read_pickle(io.BytesIO(file_bytes))
|
|
497
489
|
df = pd.DataFrame(raw) if not isinstance(raw, pd.DataFrame) else raw
|
|
498
490
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
491
|
+
wire_columns = Dataset._http_columns_from_dataframe(df)
|
|
492
|
+
return Dataset._from_registered_dataframe(
|
|
493
|
+
df,
|
|
494
|
+
dataset_id=None,
|
|
495
|
+
columns=Dataset._columns_from_http(wire_columns),
|
|
496
|
+
data_uri=upload_resp.data_uri,
|
|
497
|
+
file_format=file_format,
|
|
498
|
+
)
|
|
502
499
|
|
|
503
500
|
|
|
504
501
|
# ---------------------------------------------------------------------------
|
|
@@ -530,7 +527,7 @@ class S3Connector(Connector):
|
|
|
530
527
|
import outerproduct as op
|
|
531
528
|
connector = op.S3Connector("my-s3", root_dir="s3://bucket/prefix")
|
|
532
529
|
print(connector.table_names())
|
|
533
|
-
dataset = connector.table("customers.csv"
|
|
530
|
+
dataset = connector.table("customers.csv")
|
|
534
531
|
|
|
535
532
|
Parameters
|
|
536
533
|
----------
|
|
@@ -592,7 +589,7 @@ class SnowflakeConnector(Connector):
|
|
|
592
589
|
credentials={"user": "admin", "password": "secret"},
|
|
593
590
|
)
|
|
594
591
|
print(connector.table_names())
|
|
595
|
-
dataset = connector.table("customers"
|
|
592
|
+
dataset = connector.table("customers")
|
|
596
593
|
|
|
597
594
|
Parameters
|
|
598
595
|
----------
|
|
@@ -682,7 +679,7 @@ class DatabricksConnector(Connector):
|
|
|
682
679
|
http_path="/sql/1.0/warehouses/abc",
|
|
683
680
|
credentials={"access_token": "dapi..."},
|
|
684
681
|
)
|
|
685
|
-
dataset = connector.table("customers"
|
|
682
|
+
dataset = connector.table("customers")
|
|
686
683
|
|
|
687
684
|
Parameters
|
|
688
685
|
----------
|