-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
🎉 New Source: Harvest #3709
🎉 New Source: Harvest #3709
Conversation
Add Clients, Contacts, Company, Invoices, InvoiceMessages, InvoicePayments streams full_refresh support.
Add config and schema files for all the streams.
Add config and schemas.
Fix ExpensesBase request_params method. Add source docs and definitions.
/test connector=source-harvest
|
Update config files. Update incremental streams mixin.
…ental stream support
/test connector=source-harvest
|
/test connector=source-harvest
|
airbyte-integrations/connectors/source-harvest/acceptance-test-config.yml
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-harvest/source_harvest/streams.py
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-harvest/source_harvest/streams.py
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-harvest/source_harvest/streams.py
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-harvest/source_harvest/streams.py
Show resolved
Hide resolved
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.
see my comments
Update HarvestTokenAuthenticator class definition.
airbyte-integrations/connectors/source-harvest/source_harvest/auth.py
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-harvest/source_harvest/streams.py
Outdated
Show resolved
Hide resolved
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.
lgtm, just small comments, up to you
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.
Looks great, nicely done Vadym 🎉 one blocking question about reports and a few smaller questions
airbyte-integrations/connectors/source-harvest/source_harvest/source.py
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-harvest/source_harvest/spec.json
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-harvest/source_harvest/streams.py
Outdated
Show resolved
Hide resolved
current_date = pendulum.now() | ||
# `from` and `to` params are required for reports calls | ||
# min `from` value is current_date - 1 year | ||
params.update({"from": self._from_date.strftime("%Y%m%d"), "to": current_date.strftime("%Y%m%d")}) |
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.
any reason not to make this incremental by manipulating the from
and to
params?
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.
Yes, we have a reason for that. Discussed there.
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.
we can enrich the record returned from the API with this info by doing the following:
- inside
parse_response
we can access the originalrequest
object that was made then parse thefrom
andto
parameters. - put those properties in the record response i.e:
record['from'] = ...
- parse inside the
get_updated_state
method - profit
WDYT?
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 would require changing the schema too
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.
It makes sense for me. I'll try to do it.
airbyte-integrations/connectors/source-harvest/source_harvest/schemas/company.json
Show resolved
Hide resolved
airbyte-integrations/connectors/source-harvest/source_harvest/schemas/contacts.json
Show resolved
Hide resolved
Fix sub streams slicing. Update spec and schemas. Update md docs.
/test connector=source-harvest
|
Update report schemas.
/test connector=source-harvest
|
Fix configs and configured catalog.
/test connector=source-harvest
|
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.
LGTM with one question about cursor field. Nicely done Vadym! Incremental reports is great to have
airbyte-integrations/connectors/source-harvest/source_harvest/streams.py
Outdated
Show resolved
Hide resolved
Update IncrementalReportsBase request_params. Update schemas and config.
/test connector=source-harvest
|
…vest # Conflicts: # airbyte-config/init/src/main/resources/seed/source_definitions.yaml
/publish connector=connectors/source-harvest
|
What
Closes #2134
How
Pre-merge Checklist
Recommended reading order
source_harvest/schemas/
andintegration_tests/
source_harvest
python modules.