Skip to content

Commit

Permalink
Fix CDK speedrun stream stub (airbytehq#5778)
Browse files Browse the repository at this point in the history
* Fix CDK speedrun stream stub

* Add start_date back

Co-authored-by: Abhi Vaidyanatha <abhivaidyanatha@Abhis-MacBook-Pro.local>
  • Loading branch information
avaidyanatha and Abhi Vaidyanatha committed Sep 8, 2021
1 parent c97798a commit 8fcaba4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/connector-development/tutorials/cdk-speedrun.md
Expand Up @@ -90,8 +90,13 @@ class SourcePythonHttpExample(AbstractSource):
return True, None

def streams(self, config: Mapping[str, Any]) -> List[Stream]:
# Parse the date from a string into a datetime object
# Parse the date from a string into a datetime object.
start_date = datetime.strptime(config["start_date"], "%Y-%m-%d")

# NoAuth just means there is no authentication required for this API and is included for completeness.
# Skip passing an authenticator if no authentication is required.
# Other authenticators are available for API token-based auth and Oauth2.
auth = NoAuth()
return [ExchangeRates(authenticator=auth, base=config["base"], start_date=start_date)]
```

Expand Down

0 comments on commit 8fcaba4

Please sign in to comment.