feat: Add scheduling capabilities for cloud connections
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia dai punti di ingresso CloudWorkspace.deploy_connection() e CloudConnection, quindi esamina PatchConnectionRequest e AirbyteAPIConnectionSchedule. Traccia i punti di ingresso degli strumenti MCP correlati e il comportamento esistente per l'aggiornamento delle connessioni prima di definire i confini dell'interfaccia pubblica. Il lavoro è completo quando creazione, recupero, aggiornamento, pianificazione manuale, validazione ed esempi cron documentati sono coperti in modo coerente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Feature Request: Add Scheduling Capabilities for Cloud Connections
Requested by
@aaronsteers (AJ Steers)
Context
Currently, PyAirbyte's Cloud capabilities allow creating and managing connections, but there's no interface for setting or updating sync schedules. This feature request proposes adding scheduling capabilities that align with Airbyte's API primitives.
Proposed Interface
Based on investigation of the Airbyte API, the scheduling system uses:
schedule_type: EitherCRONorMANUALcron_expression: A standard cron string when usingCRONschedule type
This is compatible with a simple cron string interface. The proposed interface would:
-
During Connection Creation (
CloudWorkspace.deploy_connection()):- Add optional
scheduleparameter accepting either:None(default): Manual sync only- A cron expression string (e.g.,
"0 */6 * * *"for every 6 hours)
- Internally converts cron string to
AirbyteAPIConnectionScheduleobject
- Add optional
-
For Existing Connections (
CloudConnectionclass):- Add
set_schedule(cron_expression: str | None)methodNonesets schedule to MANUAL- String sets schedule to CRON with the provided expression
- Add
get_schedule()method returning current schedule info - These methods are non-destructive (unlike config updates)
- Add
-
MCP Tools:
set_cloud_connection_schedule(connection_id, cron_expression)- marked as non-destructiveget_cloud_connection_schedule(connection_id)- read-only
Example Usage
import airbyte as ab
from airbyte import cloud
workspace = cloud.CloudWorkspace(...)
# Create connection with schedule
connection = workspace.deploy_connection(
name="My Connection",
source=source,
destination=destination,
schedule="0 */6 * * *", # Every 6 hours
)
# Update schedule on existing connection
connection.set_schedule("0 0 * * *") # Daily at midnight
# Disable automatic syncs
connection.set_schedule(None) # Manual only
# View current schedule
schedule_info = connection.get_schedule()
print(f"Type: {schedule_info.schedule_type}")
print(f"Cron: {schedule_info.cron_expression}")
Implementation Notes
- The Airbyte API already supports scheduling via
AirbyteAPIConnectionScheduleinPatchConnectionRequest - Cron expressions should be validated before sending to API
- Consider adding helper constants for common schedules (hourly, daily, weekly)
- Documentation should include cron expression examples and link to cron syntax reference
Related PR
This feature request was created during work on airbytehq/PyAirbyte#841, where an initial update_schedule() method was removed to avoid exposing internal API models in the public interface.
- Lingua principale
- Python
- Stelle
- 343
- Fork
- 77
- Merge medio
- 1g 4h
- PR unite (30g)
- 54
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di airbytehq/PyAirbyte
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Tutte le issue di airbytehq/PyAirbyte
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
PolicyEngine/policyengine-us#9559 ·