Daft icon indicating copy to clipboard operation
Daft copied to clipboard

Add better docstrings for reading from s3

Open universalmind303 opened this issue 8 months ago • 0 comments

Is your feature request related to a problem? Please describe. I was trying to do something simple like read from a public s3 bucket

daft.read_lance('s3://daft-public-data/lance/words-test-dataset').collect()

but it took quite a while to figure out the correct args to pass in, and had to go to the reference guide to find out how to construct a S3 IOConfig

Describe the solution you'd like I'd like to see a simple example in the docstrings of using the io_config

def read_lance(...):
    """
    ...
    Examples:
    ------
    Scan a local lance dataset.

    >>> df = daft.read_lance("s3://my-lancedb-bucket/data/")
    >>> df.show()

    Scan a lance dataset in s3 
    <insert example>
    """

Note: this likely could be applied to all read_X that support object stores.

universalmind303 avatar Jun 18 '24 15:06 universalmind303