-
Notifications
You must be signed in to change notification settings - Fork 4.5k
🎉 New Source: RKI (Robert Koch-Institut) Covid Public API #11732
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: RKI (Robert Koch-Institut) Covid Public API #11732
Conversation
…urce with check and discover method added germany.json.
… parameters, updated streams, added cursor field for incremental streams.
…ec, source, schemas updated, added class GermanHistoryIncidence added.
…streams for deaths/:days, recovered/:days, frozen-incidence/:days, hospitalization/:days. Updated source.py methods. Updated sepc.json properties key. Updated configured_catalogue.json with required streams. Updated config.json
… cases and german history incidence.
…ence, germanhistoryhospitalization, germanhistoryrecovered. Fixing other test cases.
…rementalMixin will be implemented to all incremental classes.
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.
Thanks for the contribution @Zawar92, I left some comments let me know what do you think of.
self, stream_state: Mapping[str, Any] = None, stream_slice: Mapping[str, Any] = None, next_page_token: Mapping[str, Any] = None | ||
) -> str: | ||
if self.config.get('cases_in_days'): | ||
return "germany/history/cases/"+str(self.config.get('cases_in_days')) |
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're creating a dependency here for optional parameters and stream. This is not good. Maybe change the cases_in_day
to start_date
and use to all streams and create a function to convert date to integer days.
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.
added start_date and added a function that converts date to integer days.
"cases_in_days": { | ||
"type": "integer", | ||
"description": "Number of cases days in the past from today." | ||
}, | ||
"incidence_in_days": { | ||
"type": "integer", | ||
"description": "Number of incidence days in the past from today." | ||
}, | ||
"deaths_in_days": { | ||
"type": "integer", | ||
"description": "Number of deaths days in the past from today." | ||
}, | ||
"recovered_in_days": { | ||
"type": "integer", | ||
"description": "Number of recovered days in the past from today." | ||
}, | ||
"frozen_incidence_in_days": { | ||
"type": "integer", | ||
"description": "Number of frozen-incidence days in the past from today." | ||
}, | ||
"hospitalization_in_days": { | ||
"type": "integer", | ||
"description": "Number of hospitalization days in the past from today." |
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.
Change those parameters to start_date
and let users select the stream and receive data based on that.
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.
changed the parameters to start_date so that user can select the stream and receive data based on that.
"documentationUrl": "https://docsurl.com", | ||
"connectionSpecification": { | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Rki Covid Spec", |
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.
Today the correct name of this connector is Rki Covid Germany
. Why not create a parameter to select the country Germany and US, if in the future there is a new one would be easy to implement 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.
Well the reason is RKI means Robert Koch-Institut COVID-19 API - von Marlon Lückert. Its an institute of Germany, that only deals with data for Germany. So adding a parameter is not a problem.
In future if they choose to give data for other countries then it would be easily implemented
Thanks for the comments @marcosmarxm. Can I get an updated on my PR. |
/test connector=connectors/source-rki-covid
Build FailedTest summary info:
|
/test connector=connectors/source-rki-covid
Build FailedTest summary info:
|
/test connector=connectors/source-rki-covid
Build FailedTest summary info:
|
/test connector=connectors/source-rki-covid
Build PassedTest summary info:
|
/publish connector=connectors/source-rki-covid
|
/publish connector=connectors/source-rki-covid
|
/publish connector=connectors/source-rki-covid
|
…11732) * Added source for RKI-covid-germany, updated spec.json, implemented source with check and discover method added germany.json. * implemented incremental method for germany history cases with date as parameters, updated streams, added cursor field for incremental streams. * main file added. * added Incidence source with date as parameter. Incremental stream. spec, source, schemas updated, added class GermanHistoryIncidence added. * Added a full-refresh stream for germany/age-group .Added incremental streams for deaths/:days, recovered/:days, frozen-incidence/:days, hospitalization/:days. Updated source.py methods. Updated sepc.json properties key. Updated configured_catalogue.json with required streams. Updated config.json * writting test unit test cases for incremental streams: german history cases and german history incidence. * Incremental streams for germanhistorydeaths, germanhistoryfrozenIncidence, germanhistoryhospitalization, germanhistoryrecovered. Fixing other test cases. * Added test stream for age group and germany. * changes in Readme and source.py. * IncrementalMixin added to class GermanyHistoryCases. AFter review IncrementalMixin will be implemented to all incremental classes. * Implemented Incremental mixin or GermanHistory Cases connector. * corrected changes. * adding integration test * comment acceptence test. * On path with master * updated the changes for PR request. * changed file source-rki-covid/integration_tests/configured_catalog.json * corrected flake and blackformatting. Build gradel. * Worked on the suggestions. * source_rki_covid/schemas/germany_age_groups.json * uodated abnormal_state.json * updated the schemas for german age groups and history hospitalization. * correct dockerfile and update airbyte_cdk version * run format * update python version * correct dockerfile build * add source in seed * update uuid for rki-covid source * change docker * add bash * auto-bump connector version * run seed file * correct doc * auto-bump connector version Co-authored-by: Marcos Marx Millnitz <[email protected]> Co-authored-by: Octavia Squidington III <[email protected]>
What
Implemented (Robert Koch-Institut - von Marlon Lückert) Covid-19 connector.
The base endpoint in Germany. All other as extension of Germany endpoint.
How
Use the open-source [https://github.com/marlon360/rki-covid-api].
Can also be found at [https://api.corona-zahlen.org/docs/#%E2%98%95%EF%B8%8F-donation]
Recommended reading order
x.java
y.python
🚨 User Impact 🚨
Are there any breaking changes? What is the end result perceived by the user? If yes, please merge this PR with the 🚨🚨 emoji so changelog authors can further highlight this if needed.
Pre-merge Checklist
Expand the relevant checklist and delete the others.
New Connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/SUMMARY.md
docs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampledocs/integrations/README.md
airbyte-integrations/builds.md
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing/publish
command described hereUpdating a connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampleAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing/publish
command described hereConnector Generator
-scaffold
in their name) have been updated with the latest scaffold by running./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates
then checking in your changesTests
Unit
Results (2.28s):
48 passed
Integration
Put your integration tests output here.
Results (0.01s):
Acceptance
Results (11.49s):
11 passed