Skip to content

Commit

Permalink
Update developing-a-transformer.md
Browse files Browse the repository at this point in the history
update transformer example
  • Loading branch information
acrylJonny committed Jul 29, 2024
1 parent d85da39 commit 5fc0124
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/actions/guides/developing-a-transformer.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ print the configuration that is provided when it is created, and print any Event
```python
# custom_transformer.py
from datahub_actions.transform.transformer import Transformer
from datahub_actions.event.event import EventEnvelope
from datahub_actions.event.event_envelope import EventEnvelope
from datahub_actions.pipeline.pipeline_context import PipelineContext
from typing import Optional

Expand Down Expand Up @@ -75,7 +75,7 @@ Next, install the package
pip install -e .
```

inside the module. (alt.`python setup.py`).
inside the module. (alt.`python setup.py`).

Once we have done this, our class will be referencable via `custom_transformer_example.custom_transformer:CustomTransformer`.

Expand All @@ -96,7 +96,7 @@ source:
connection:
bootstrap: ${KAFKA_BOOTSTRAP_SERVER:-localhost:9092}
schema_registry_url: ${SCHEMA_REGISTRY_URL:-http://localhost:8081}
transform:
transform:
- type: "custom_transformer_example.custom_transformer:CustomTransformer"
config:
# Some sample configuration which should be printed on create.
Expand Down Expand Up @@ -130,4 +130,4 @@ it without defining the full module path.
Prerequisites to consideration for inclusion in the core Transformer library include

- **Testing** Define unit tests for your Transformer
- **Deduplication** Confirm that no existing Transformer serves the same purpose, or can be easily extended to serve the same purpose
- **Deduplication** Confirm that no existing Transformer serves the same purpose, or can be easily extended to serve the same purpose

0 comments on commit 5fc0124

Please sign in to comment.