KaggleDatasetSource
Dataset source that fetches public datasets from Kaggle.
Uses the official kaggle library (module level kaggle.api). Public
datasets can be searched and downloaded without authentication; a stored
KaggleCredential is applied when downloading so private or consent gated
datasets work too.
Methods
download_dataset(self, dataset_id: str, temp_path: str) -> str
KaggleDatasetSourceDownload a Kaggle dataset's files into temp_path.
Parameters
- dataset_id : str
- Kaggle dataset identifier (e.g.
"uciml/iris"). - temp_path : str
- Local directory to download into.
Returns
- str
- Path to the directory containing the downloaded files.
get_info(self, dataset_id: str) -> 'DatasetEntry | None'
KaggleDatasetSourceReturn full metadata for a single Kaggle dataset.
Parameters
- dataset_id : str
- Kaggle dataset identifier in
"owner/dataset-name"form.
Returns
- DatasetEntry or None
- Full metadata entry, or None on error.
search(self, query: str, limit: int = 20, cursor: str | None = None, **filters: Any) -> DashAI.back.dataset_sources.base_dataset_source.SearchPage
KaggleDatasetSourceReturn Kaggle datasets matching a query.
Parameters
- query : str
- Free text search string.
- limit : int, optional
- Requested page size, by default 20. Passed to Kaggle, which today serves
_KAGGLE_PAGE_SIZEdatasets a page whatever is asked. - cursor : str or None, optional
- Page number returned by the previous call as
next_cursor.Nonefetches the first page. - **filters : Any
- Supported keys: sort_by (str): Kaggle dataset sort (e.g.
"hottest"). tags (list[str]): Comma-joined into Kaggletag_ids. file_type (str): Filter by file type. license_name (str): Filter by license. user (str): Only datasets owned by this username.
Returns
- SearchPage
- Matching datasets and a cursor for the next page (or
None).
get_credential(self, name: str)
ConfigObjectResolve a registered credential component by name.
Parameters
- name : str
- Credential component class name (e.g. "HuggingFaceCredential").
Returns
- BaseCredential
- An instance of the requested credential component.
get_schema(cls) -> dict
ConfigObjectGenerates the component related Json Schema.
Returns
- dict
- Dictionary representing the Json Schema of the component.
validate_and_transform(self, raw_data: dict) -> dict
ConfigObjectIt takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.
Parameters
- raw_data : dict
- A dictionary with the data provided by the user to initialize the model.
Returns
- dict
- A validated dictionary with the necessary objects.