Skip to content

Commit

Permalink
Fixes in tox.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
mkranna committed Feb 20, 2023
1 parent 1fce8c4 commit ce10189
Showing 1 changed file with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ class {{ cookiecutter.destination_name }}Sink({{ sinkclass }}):

{% if sinkclass == "RecordSink" -%}
def process_record(self, record: dict, context: dict) -> None:
"""Process the record."""
"""Process the record.
Args:
record: Individual record in the stream.
context: Stream partition or context dictionary.
"""
# Sample:
# ------
# client.write(record)
Expand All @@ -61,6 +66,9 @@ def start_batch(self, context: dict) -> None:
Developers may optionally add additional markers to the `context` dict,
which is unique to this batch.
Args:
context: Stream partition or context dictionary.
"""
# Sample:
# ------
Expand All @@ -72,14 +80,22 @@ def process_record(self, record: dict, context: dict) -> None:
Developers may optionally read or write additional markers within the
passed `context` dict from the current batch.
Args:
record: Individual record in the stream.
context: Stream partition or context dictionary.
"""
# Sample:
# ------
# with open(context["file_path"], "a") as csvfile:
# csvfile.write(record)

def process_batch(self, context: dict) -> None:
"""Write out any prepped records and return once fully written."""
"""Write out any prepped records and return once fully written.
Args:
context: Stream partition or context dictionary.
"""
# Sample:
# ------
# client.upload(context["file_path"]) # Upload file
Expand Down

0 comments on commit ce10189

Please # to comment.