Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

☁ Cloud Interop: Basic run_sync() interop with Airbyte Cloud/OSS/Enterprise #33

Closed
Tracked by #111
aaronsteers opened this issue Feb 12, 2024 · 1 comment · Fixed by #143
Closed
Tracked by #111
Assignees

Comments

@aaronsteers
Copy link
Contributor

aaronsteers commented Feb 12, 2024

This would add the following interfaces for interacting with a hosted Airbyte REST API (Cloud/OSS/Enterprise):

  1. get_cloud_connection() - Get a handle for a remotely-hosted connection.
  2. get_latest_read_result() - Get the latest result from a cloud connection sync. Should have properties like success (true/false), executed_at, completed_at, etc.
  3. run_sync() - Remotely execute a sync operation.

Pseudocode mockup:

Locally Executed Executed via Hosted Airbyte
github_source = get_source(
    "source-github",
    # ...
)
sql_cache = SnowflakeCache(
    # ...
)

# Sync data to the cache
read_result = github_source.read(
    cache=sql_cache,
)









# Get the repos dataset
repos_data = read_result.cache.streams["repos"]

# Iterate through records
for repo in repos_data:
	print(repo["name"])
# Get the Cloud connection object
conn = get_cloud_connection(
    workspace_id="...",
    connection_id="...",
    api_key="...",
)


# Get the latest run result
read_result = conn.get_latest_read_result()

# We can check basic properties of the sync:
if not read_result.success:
    # We can invoke a Cloud sync from Python:
    read_result = conn.run_sync()


# After the follow-on feature ships, you'd be also 
# be able to read from remote destinations.
# https://github.com/airbytehq/PyAirbyte/issues/110

# Get the repos dataset
repos_data = read_result.cache.streams["repos"]

# Iterate through records
for repo in repos_data:
	print(repo["name"])
@aaronsteers
Copy link
Contributor Author

aaronsteers commented Feb 23, 2024

Deprioritized (for initial launch) in favor of:

@aaronsteers aaronsteers changed the title Add basic interop with Airbyte Cloud and ability to run cloud jobs Add basic interop with Airbyte Cloud and ability to orchestrate hosted sync jobs Mar 1, 2024
@aaronsteers aaronsteers changed the title Add basic interop with Airbyte Cloud and ability to orchestrate hosted sync jobs Feature Request: Basic run_sync() interop with Airbyte Cloud/OSS/Enterprise Mar 6, 2024
@aaronsteers aaronsteers changed the title Feature Request: Basic run_sync() interop with Airbyte Cloud/OSS/Enterprise ☁ Cloud Interop: Basic run_sync() interop with Airbyte Cloud/OSS/Enterprise Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant