-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[8/n][dagster-airbyte] Implement load_airbyte_cloud_asset_specs #26269
Conversation
661cd0c
to
02a9165
Compare
d81b894
to
bd93c69
Compare
02a9165
to
f5d6a1f
Compare
bd93c69
to
1e2fea5
Compare
f5d6a1f
to
b849b85
Compare
1e2fea5
to
9154fc9
Compare
b849b85
to
b49c6ef
Compare
9154fc9
to
97d2b5a
Compare
|
||
|
||
airbyte_cloud_specs = load_airbyte_cloud_asset_specs(airbyte_cloud_workspace) | ||
defs = dg.Definitions(assets=airbyte_cloud_specs, resources={"airbyte": airbyte_cloud_workspace} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need the resource just to load asset specs right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, good catch
# 4 tables for the connector | ||
assert len(all_assets) == 1 | ||
assert len(all_assets_keys) == 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this comment seems completely unrelated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed - will fix
# Sanity check outputs, translator tests cover details here | ||
first_asset_key = next(key for key in all_assets_keys) | ||
assert first_asset_key.path == ["test_prefix_test_stream"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name the actual tests in question please
assert len(all_assets_keys) == 1 | ||
|
||
# Sanity check outputs, translator tests cover details here | ||
first_asset_key = next(key for key in all_assets_keys) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should just call this the_asset_key
since we expect one
b49c6ef
to
b3fd504
Compare
97d2b5a
to
929f117
Compare
b3fd504
to
ca76f95
Compare
929f117
to
0a494a8
Compare
ca76f95
to
9831074
Compare
0a494a8
to
8c0d00a
Compare
9831074
to
5f467c2
Compare
8c0d00a
to
045ac16
Compare
5f467c2
to
2007ef8
Compare
045ac16
to
cdb5323
Compare
2007ef8
to
3630f44
Compare
6f56cce
to
f578813
Compare
d48ba20
to
4648e5c
Compare
f578813
to
cd95ca5
Compare
cd95ca5
to
72c6a47
Compare
…ter-io#26269) ## Summary & Motivation This PR implements the `load_airbyte_cloud_asset_specs` function: ```python from dagster_airbyte import AirbyteCloudWorkspace, load_airbyte_cloud_asset_specs import dagster as dg airbyte_cloud_workspace = AirbyteCloudWorkspace( workspace_id=dg.EnvVar("AIRBYTE_CLOUD_WORKSPACE_ID"), client_id=dg.EnvVar("AIRBYTE_CLOUD_CLIENT_ID"), client_secret=dg.EnvVar("AIRBYTE_CLOUD_CLIENT_SECRET"), ) airbyte_cloud_specs = load_airbyte_cloud_asset_specs(airbyte_cloud_workspace) defs = dg.Definitions(assets=airbyte_cloud_specs, resources={"airbyte": airbyte_cloud_workspace} ``` ## How I Tested These Changes Additional unit test ## Changelog [dagster-airbyte] The `load_airbyte_cloud_asset_specs` function is added. It can be used with the `AirbyteCloudWorkspace` resource and `DagsterAirbyteTranslator` translator to load your Airbyte Cloud connection streams as external assets in Dagster.
Summary & Motivation
This PR implements the
load_airbyte_cloud_asset_specs
function:How I Tested These Changes
Additional unit test
Changelog
[dagster-airbyte] The
load_airbyte_cloud_asset_specs
function is added. It can be used with theAirbyteCloudWorkspace
resource andDagsterAirbyteTranslator
translator to load your Airbyte Cloud connection streams as external assets in Dagster.