-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
base: master
Are you sure you want to change the base?
feat(source-google-sheets): migrate low code #50843
Conversation
…xtractor that matches schema properties with values
…in components resolver in order to get an indexed object of properties where index is the order. - Add partition router to retriver in components resolver so we can slice.
- Remove old SourceClass to temp file to be deleted and - Remove unused transformations - Make extractor ha transform data from component mapping
…anges to discard empty cells in first row
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
/format-fix
|
/format-fix
|
request_headers: | ||
Content-Type: application/x-www-form-urlencoded | ||
request_body_data: >- | ||
grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&assertion=heregoesthetokenassertion |
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.
Link to relevant conversation
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.
Fixed: https://github.com/airbytehq/airbyte-internal-issues/issues/10962
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
['properties']['title']
['data'][0]['rowData'][0]
array (order is important) to match with records (will explains this a few lines below).['properties']['gridProperties']['rowCount']
to continue...
User Impact
Can this PR be safely reverted and rolled back?