Skip to content

Commit c647991

Browse files
committed
update processors documentation to reflect changes in configuration naming conventions
1 parent ca3c4f1 commit c647991

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

docs/content/writing-processors.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,30 +77,33 @@ You can also define your own processor traits by extending the `Processor` trait
7777

7878
## Custom Configuration
7979

80-
You can access custom configuration options directly within your processor code. The custom configuration options defined under the Processing configuration node can be accessed through the `config` member variable in your processor class.
80+
You can access custom configuration options directly within your processor code. The custom configuration options
81+
defined under the `processing` configuration node can be accessed through the `config` member variable in your processor
82+
class.
8183

8284
Here's an example of how to access custom configuration values within your processor:
8385

8486
```scala
8587
case class MyDataProcessor() extends Processor {
8688
override def run(handlers: HandlerAccessor)(implicit spark: SparkSession): Unit = {
8789
// Access custom configuration values
88-
val customValue1 = config.getString("CustomValue1")
89-
val customValue2 = config.getInt("CustomValue2")
90+
val customValue1 = config.getString("custom_value_1")
91+
val customValue2 = config.getInt("custom_value_2")
9092

9193
// Use the custom configuration values in your data transformation logic
9294
// ...
9395
}
9496
}
9597
```
9698

97-
In the above example, `CustomValue1` and `CustomValue2` are custom configuration values defined under the Processing configuration node in your configuration file:
99+
In the above example, `custom_value_1` and `custom_value_1` are custom configuration values defined under
100+
the `processing` configuration node in your configuration file:
98101

99-
```scala
100-
Processing {
101-
Type = com.mycompany.MyDataProcessor
102-
CustomValue1 = "june"
103-
CustomValue2 = "2023"
102+
```hocon
103+
processing {
104+
type = com.mycompany.MyDataProcessor
105+
custom_value_1 = "june"
106+
custom_value_2 = "2023"
104107
}
105108
```
106109

0 commit comments

Comments
 (0)