You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/connectivity/custom/_index.en.md
+34-14Lines changed: 34 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,16 @@ description: "Read transform and write files in any format"
8
8
weight: 3
9
9
---
10
10
11
-
-[What is it ?](#what-is-it-)
11
+
-[What is it ?](#definition)
12
12
-[Installation](#installation)
13
13
-[Usage](#usage)
14
14
-[Building an extractor](#building-an-extractor)
15
15
-[Building a transformer](#building-a-transformer)
16
16
-[Building a loader](#building-a-loader)
17
+
-[Usage examples](#usage-examples)
18
+
-[Example of an extractor](#example-of-an-extractor)
19
+
-[Example of a transformer](#example-of-a-transformer)
20
+
-[Example of a loader](#example-of-a-loader)
17
21
---
18
22
19
23
## Definition
@@ -29,42 +33,58 @@ This plugin is already integrated into the Satellite package, so you can’t req
29
33
30
34
Unlike other plugins, the configuration is the same whether it is an extractor, a transformer or a loader.
31
35
32
-
First you need to [determine your services](../../feature/services) in your pipeline or workflow and then use the `use`
33
-
option which allows you to define which service to use.
34
-
35
36
### Building an extractor
36
37
38
+
In the example given, we explain how to configure a custom extractor with the `Bar` class located in the `App\Class` namespace.
39
+
40
+
Here's a more detailed explanation:
41
+
37
42
```yaml
38
43
custom:
39
44
extractor:
40
-
use: 'App\Class\Bar'
45
+
use: 'App\Class\Bar'# This line specifies the extractor class you want to use.
41
46
services:
42
-
App\Class\Bar: ~
47
+
App\Class\Bar: ~# Here, we declare the service associated with the Bar class with the syntax App\Class\Bar: ~. This simply indicates that we want to use the default parameters for this service.
43
48
```
44
49
50
+
For more details about service configurations, please visit the [declaring-services](../../feature/services) documentation.
51
+
45
52
### Building a transformer
46
53
54
+
In the example given, we explain how to configure a custom extractor with the `Bar` class located in the `App\Class` namespace.
55
+
56
+
Here's a more detailed explanation:
57
+
47
58
```yaml
48
59
custom:
49
60
transformer:
50
-
use: 'App\Class\Bar'
61
+
use: 'App\Class\Bar' # This line specifies the extractor class you want to use.
51
62
services:
52
-
App\Class\Bar:
53
-
factory:
63
+
App\Class\Bar: # Here, we declare the service associated with the Bar class.
64
+
factory: # This section indicates that the service must be created by calling the extract method of the App\Class\Bar class.
54
65
class: App\Class\Bar
55
66
method: extract
56
-
arguments:
67
+
arguments: # The arguments to be passed to the extract method. In this example, the @foo symbol indicates that the foo service should be injected as an argument. Make sure that the foo service is configured correctly elsewhere in your pipeline.
57
68
- '@foo'
69
+
foo: ~
58
70
```
59
71
72
+
For more details about service configurations, please visit the [declaring-services](../../feature/services) documentation.
73
+
60
74
### Building a loader
61
75
76
+
In the example given, we explain how to configure a custom extractor with the `Bar` class located in the `App\Class` namespace.
77
+
78
+
Here's a more detailed explanation:
79
+
62
80
```yaml
63
81
custom:
64
82
loader:
65
-
use: 'App\Class\Bar'
83
+
use: 'App\Class\Bar' # This line specifies the extractor class you want to use.
66
84
services:
67
-
App\Class\Bar:
68
-
calls:
69
-
- withUsername: [ 'admin' ]
85
+
App\Class\Bar: # Here, we declare the service associated with the Bar class.
86
+
calls: # This section indicates that specific method calls must be made to the service instance.
87
+
- withUsername: [ 'admin' ] # This means that a method call named withUsername must be made to the instance of the Bar class, with the username "admin" passed as an argument.
70
88
```
89
+
90
+
For more details about service configurations, please visit the [declaring-services](../../feature/services) documentation.
0 commit comments