kedro/extras/datasets/spark/spark_dataset.py
def _dbfs_glob(pattern: str, dbutils: Any) -> List[str]:
    """Perform a custom glob search in DBFS using the provided pattern.
    It is assumed that version paths are managed by Kedro only.

    Args:
        pattern: Glob pattern to search for.
        dbutils: dbutils instance to operate with DBFS.

    Returns:
            List of DBFS paths prefixed with '/dbfs' that satisfy the glob pattern.
    """
    pattern = _strip_dbfs_prefix(pattern)
    prefix = _parse_glob_pattern(pattern)
    matched = set()
    filename = pattern.split("/")[-1]

    for file_info in dbutils.fs.ls(prefix):
        if file_info.isDir():
            path = str(
                PurePosixPath(_strip_dbfs_prefix(file_info.path, "dbfs:")) / filename
            )
            if fnmatch(path, pattern):
                path = "/dbfs" + path
                matched.add(path)
    return sorted(matched)
Perform a custom glob search in DBFS using the provided pattern.
    It is assumed that version paths are managed by Kedro only.

    Args:
        pattern: Glob pattern to search for.
        dbutils: dbutils instance to operate with DBFS.

    Returns:
            List of DBFS paths prefixed with '/dbfs' that satisfy the glob pattern.
    
Perform a custom glob search in DBFS using the provided pattern.
It is assumed that version paths are managed by Kedro only.
Perform a custom glob search in DBFS using the provided pattern . It is assumed that version paths are managed by Kedro only .
def _dbfs_glob(pattern: str, dbutils: Any) -> List[str]:
    pattern = _strip_dbfs_prefix(pattern)
    prefix = _parse_glob_pattern(pattern)
    matched = set()
    filename = pattern.split("/")[-1]
    for file_info in dbutils.fs.ls(prefix):
        if file_info.isDir():
            path = str(
                PurePosixPath(_strip_dbfs_prefix(file_info.path, "dbfs:")) / filename
            )
            if fnmatch(path, pattern):
                path = "/dbfs" + path
                matched.add(path)
    return sorted(matched)
def _dbfs_glob ( pattern : str , dbutils : Any ) -> List [ str ] : pattern = _strip_dbfs_prefix ( pattern ) prefix = _parse_glob_pattern ( pattern ) matched = set ( ) filename = pattern . split ( "/" ) [ - 1 ] for file_info in dbutils . fs . ls ( prefix ) : if file_info . isDir ( ) : path = str ( PurePosixPath ( _strip_dbfs_prefix ( file_info . path , "dbfs:" ) ) / filename ) if fnmatch ( path , pattern ) : path = "/dbfs" + path matched . add ( path ) return sorted ( matched )
Perform a custom glob search in DBFS using the provided pattern.
Perform a custom glob search in DBFS using the provided pattern .
"""Perform a custom glob search in DBFS using the provided pattern.
    It is assumed that version paths are managed by Kedro only.

    Args:
        pattern: Glob pattern to search for.
        dbutils: dbutils instance to operate with DBFS.

    Returns:
            List of DBFS paths prefixed with '/dbfs' that satisfy the glob pattern.
    """
List of DBFS paths prefixed with '/dbfs' that satisfy the glob pattern.
List of DBFS paths prefixed with ' / dbfs ' that satisfy the glob pattern .
pattern
str
Glob pattern to search for.
Glob pattern to search for .
dbutils
Any
dbutils instance to operate with DBFS.
dbutils instance to operate with DBFS .