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

[6/n][dagster-airbyte] Implement AirbyteWorkspaceData to AirbyteConnectionTableProps method #26257

Merged
merged 7 commits into from
Dec 5, 2024

Conversation

maximearmstrong
Copy link
Contributor

@maximearmstrong maximearmstrong commented Dec 3, 2024

Summary & Motivation

This PR implement AirbyteWorkspaceData.to_airbyte_connection_table_props, which creates the props that will be passed to the translator. These props include every detail required to create the asset spec for a given table (Airbyte stream)

How I Tested These Changes

Additional unit tests with BK

@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-6 branch from 9606d1d to 904c458 Compare December 3, 2024 20:59
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-5 branch from 4be30a4 to 61380f0 Compare December 4, 2024 05:29
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-6 branch from 904c458 to 30495b8 Compare December 4, 2024 05:29
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-5 branch from 61380f0 to 726f64a Compare December 4, 2024 15:30
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-6 branch from 30495b8 to 41211ed Compare December 4, 2024 15:30
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-5 branch from 726f64a to 3a8a668 Compare December 4, 2024 19:16
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-6 branch from 41211ed to bfed07f Compare December 4, 2024 19:16
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-5 branch from 3a8a668 to 7b1189b Compare December 4, 2024 19:20
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-6 branch from bfed07f to a99e648 Compare December 4, 2024 19:20
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-5 branch from 7b1189b to f9cf32c Compare December 4, 2024 20:11
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-6 branch from a99e648 to ab61c91 Compare December 4, 2024 20:11
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-5 branch from f9cf32c to d231cae Compare December 4, 2024 20:20
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-6 branch from ab61c91 to c986086 Compare December 4, 2024 20:20

class AirbyteConnectionTableProps(NamedTuple): ...

class AirbyteConnectionTableProps(NamedTuple):
Copy link
Contributor Author

@maximearmstrong maximearmstrong Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also name this AirbyteConnectionStreamProps if we want to keep as close as possible to Airbyte's ontology.

@maximearmstrong maximearmstrong marked this pull request as ready for review December 4, 2024 20:37
@maximearmstrong maximearmstrong self-assigned this Dec 4, 2024
Comment on lines 30 to 39
assert len(table_props_data) == 1
first_table_props = next(iter(table_props_data))
assert first_table_props.table_name == f"{TEST_STREAM_PREFIX}{TEST_STREAM_NAME}"
assert first_table_props.stream_prefix == TEST_STREAM_PREFIX
assert first_table_props.stream_name == TEST_STREAM_NAME
assert first_table_props.connection_id == TEST_CONNECTION_ID
assert first_table_props.connection_name == TEST_CONNECTION_NAME
assert first_table_props.json_schema == TEST_JSON_SCHEMA
assert first_table_props.database == TEST_DESTINATION_DATABASE
assert first_table_props.schema == TEST_DESTINATION_SCHEMA
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit; could just create an "expected table props data" and have a single assertion instead of many (might require making this a record)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 0d1570d

@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-5 branch from d231cae to 4054ff8 Compare December 5, 2024 20:54
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-6 branch from c986086 to 03f3e0b Compare December 5, 2024 20:54
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-5 branch from 4054ff8 to da101d9 Compare December 5, 2024 21:18
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-6 branch from 03f3e0b to 0137ae8 Compare December 5, 2024 21:18
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-5 branch from da101d9 to 874b666 Compare December 5, 2024 22:13
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-6 branch from 0137ae8 to ef486b7 Compare December 5, 2024 22:13
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-5 branch from 874b666 to 3ca1897 Compare December 5, 2024 22:59
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-6 branch from ef486b7 to c575675 Compare December 5, 2024 22:59
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-5 branch from 3ca1897 to 977b2d4 Compare December 5, 2024 23:14
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-6 branch from c575675 to 0d1570d Compare December 5, 2024 23:14
Base automatically changed from maxime/rework-airbyte-cloud-5 to master December 5, 2024 23:32
@maximearmstrong maximearmstrong force-pushed the maxime/rework-airbyte-cloud-6 branch from 0d1570d to b2af23f Compare December 5, 2024 23:36
@maximearmstrong maximearmstrong merged commit 30c1fa0 into master Dec 5, 2024
1 check passed
@maximearmstrong maximearmstrong deleted the maxime/rework-airbyte-cloud-6 branch December 5, 2024 23:50
pskinnerthyme pushed a commit to pskinnerthyme/dagster that referenced this pull request Dec 16, 2024
…ctionTableProps method (dagster-io#26257)

## Summary & Motivation

This PR implement
AirbyteWorkspaceData.to_airbyte_connection_table_props, which creates
the props that will be passed to the translator. These props include
every detail required to create the asset spec for a given table
(Airbyte stream)

## How I Tested These Changes

Additional unit tests with BK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants