Skip to content

Docstring for add_dataframe_asset references missing dataframe argument #11284

@leftkats

Description

@leftkats

Describe the bug
The docstring for the add_dataframe_asset method in great_expectations/datasource/fluent/spark_datasource.py references a dataframe argument, but the function signature does not include a dataframe parameter. This creates confusion about how the method should be used.

To Reproduce

  1. View the add_dataframe_asset method definition.
  2. Observe that the docstring includes:
    Args:
        name: The name of the DataFrame asset. This can be any arbitrary string.
        dataframe: The Spark Dataframe containing the data for this DataFrame data asset.
        batch_metadata: An arbitrary user defined dictionary with string keys which will get inherited by any
                        batches created from the asset.
  3. The actual function signature is:
    def add_dataframe_asset(
        self,
        name: str,
        batch_metadata: Optional[BatchMetadata] = None,
    ) -> DataFrameAsset:
  4. There is no dataframe parameter.

Expected behavior
The docstring should accurately reflect the function signature, or the function should accept a dataframe argument if that is the intended usage.

Environment (please complete the following information):

  • Operating System: N/A (documentation issue)
  • Great Expectations Version: [please fill in, if relevant]
  • Data Source: Spark
  • Cloud environment: N/A

Additional context
This appears to be a documentation oversight. Please clarify the intended API for adding a DataFrame asset and update the docstring or method signature accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions