class documentation
class JSONDataSet(JDS): (source)
JSONDataSet saves data to a JSON file using an underlying filesystem (e.g.: local, S3, GCS). It uses native json to handle the JSON file. The JSONDataSet is part of Kedro Experiment Tracking. The dataset is write-only and it is versioned by default.
Example usage for the YAML API:
cars:
type: tracking.JSONDataSet
filepath: data/09_tracking/cars.json
Example usage for the Python API:
>>> from kedro.extras.datasets.tracking import JSONDataSet >>> >>> data = {'col1': 1, 'col2': 0.23, 'col3': 0.002} >>> >>> data_set = JSONDataSet(filepath="test.json") >>> data_set.save(data)
Class Variable | versioned |
Undocumented |
Method | _load |
Undocumented |
Inherited from JSONDataSet
:
Method | __init__ |
Creates a new instance of JSONDataSet pointing to a concrete JSON file on a specific filesystem. |
Constant | DEFAULT |
Undocumented |
Method | _describe |
Undocumented |
Method | _exists |
Undocumented |
Method | _invalidate |
Invalidate underlying filesystem caches. |
Method | _release |
Undocumented |
Method | _save |
Undocumented |
Instance Variable | _fs |
Undocumented |
Instance Variable | _fs |
Undocumented |
Instance Variable | _fs |
Undocumented |
Instance Variable | _protocol |
Undocumented |
Instance Variable | _save |
Undocumented |
Inherited from AbstractVersionedDataSet
(via JSONDataSet
):
Method | exists |
Checks whether a data set's output already exists by calling the provided _exists() method. |
Method | load |
Loads data by delegation to the provided load method. |
Method | resolve |
Compute the version the dataset should be loaded with. |
Method | resolve |
Compute the version the dataset should be saved with. |
Method | save |
Saves data by delegation to the provided save method. |
Method | _fetch |
Undocumented |
Method | _fetch |
Generate and cache the current save version |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Instance Variable | _exists |
Undocumented |
Instance Variable | _filepath |
Undocumented |
Instance Variable | _glob |
Undocumented |
Instance Variable | _version |
Undocumented |
Instance Variable | _version |
Undocumented |
Inherited from AbstractDataSet
(via JSONDataSet
, AbstractVersionedDataSet
):
Class Method | from |
Create a data set instance using the configuration provided. |
Method | __str__ |
Undocumented |
Method | release |
Release any cached data. |
Method | _copy |
Undocumented |
Property | _logger |
Undocumented |