To append data to an existing dataset in Phoenix, you can use the `append_to_dataset` method provided by the Phoenix client. This method allows you to append examples to a dataset on the Phoenix server. You can provide data either as a pandas DataFrame, a CSV file, or as a sequence of dictionaries. The method requires specifying input keys and optionally output and metadata keys if using a DataFrame or CSV file.
For REST API usage, the `/v1/datasets/upload` endpoint supports both creating and appending datasets by specifying the `action` parameter as either "create" or "append" in the request body. This endpoint can handle JSON, CSV, or PyArrow formats for dataset uploads.
Would you like more details on how to use these methods or endpoints?
Sources:
- <https://arize-phoenix.readthedocs.io/en/latest/api/client.html#session.client.Client.__init__|Phoenix Client API>
- <https://github.com/Arize-ai/phoenix/blob/main/src/phoenix/session/client.py|GitHub - Phoenix Client>
- <https://github.com/Arize-ai/phoenix/blob/main/schemas/openapi.json|Phoenix REST API Documentation>