savemode.py 638 B

12345678910111213141516171819202122232425
  1. from enum import Enum
  2. from ray.util.annotations import PublicAPI
  3. @PublicAPI(stability="alpha")
  4. class SaveMode(str, Enum):
  5. """Enum of possible modes for saving/writing data."""
  6. """Add new data without modifying existing data."""
  7. APPEND = "append"
  8. """Replace all existing data with new data."""
  9. OVERWRITE = "overwrite"
  10. """Don't write if data already exists."""
  11. IGNORE = "ignore"
  12. """Raise an error if data already exists."""
  13. ERROR = "error"
  14. """Update existing rows that match on key fields, or insert new rows.
  15. Requires identifier/key fields to be specified.
  16. """
  17. UPSERT = "upsert"