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

feat(source-google-sheets): migrate low code #50843

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

aldogonzalez8
Copy link
Contributor

@aldogonzalez8 aldogonzalez8 commented Dec 31, 2024

What

We want to migrate google-sheets connector relying on google-api-python-client/google-auth-httplib2 to communicate with API to manifest using our HttpRequester and latest CDK features.

How

We removed helper and client file dependencies to use new CDK features like ComponentResolver, DynamicSchema and DynamicStreams.

Review guide

I will use this section to give a quick walkthrough of the manifest components, relations and custom components used in this connector.

Dynamic Streams

The dynamic_streams section is a list of DynamicDeclarativeStream that depends on stream_template and components_resolver we will start with components_resolver.

Components Resolver

The component resolver has its own SimpleRetriever retriever with a partition_router that depends on a static stream get_spreadsheet_info_and_sheets, this stream is in charge of requesting spreadsheet info to get all the sheets.
req: {{ config["spreadsheet_id"] }}?includeGridData=false&alt=json

Now, with the sheet IDs we use the component resolver retriever/requester to obtain information, mainly the first row of data and rows_count

req: {{ config["spreadsheet_id"] }}?includeGridData=true&ranges={{ stream_partition.sheet_id }}!1:1&alt=json

With the response, we can start to pass information using the component_mapping like

  • title (sheet_id) ['properties']['title']
  • The first row of data ['data'][0]['rowData'][0] array (order is important) to match with records (will explains this a few lines below).
  • Sheet rows count ['properties']['gridProperties']['rowCount']
  • Batch size from config

to continue...

User Impact

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

@aldogonzalez8 aldogonzalez8 self-assigned this Dec 31, 2024
Copy link

vercel bot commented Dec 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 5:04pm

@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label Jan 2, 2025
@aldogonzalez8
Copy link
Contributor Author

aldogonzalez8 commented Jan 2, 2025

/format-fix

Format-fix job started... Check job output.

✅ Changes applied successfully. (5876dc9)

@aldogonzalez8
Copy link
Contributor Author

aldogonzalez8 commented Jan 3, 2025

/format-fix

Format-fix job started... Check job output.

🟦 Job completed successfully (no changes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/google-sheets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants