hid_data_transfer_lib 0.4.1__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/PKG-INFO +46 -22
  2. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/README.md +44 -21
  3. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/hid_data_transfer_lib/hid_dt_lib.py +435 -12
  4. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/hid_data_transfer_lib/nifi/nifi_client.py +14 -0
  5. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/pyproject.toml +3 -2
  6. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/hid_data_transfer_lib/__init__.py +0 -0
  7. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/hid_data_transfer_lib/conf/__init__.py +0 -0
  8. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/hid_data_transfer_lib/conf/hid_dt.cfg +0 -0
  9. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/hid_data_transfer_lib/conf/hid_dt_configuration.py +0 -0
  10. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/hid_data_transfer_lib/conf/hid_dt_local.cfg +0 -0
  11. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/hid_data_transfer_lib/conf/hid_dt_psnc.cfg +0 -0
  12. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/hid_data_transfer_lib/exceptions/__init__.py +0 -0
  13. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/hid_data_transfer_lib/exceptions/hid_dt_exceptions.py +0 -0
  14. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/hid_data_transfer_lib/keycloak/__init__.py +0 -0
  15. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/hid_data_transfer_lib/keycloak/keycloak_rest.py +0 -0
  16. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/hid_data_transfer_lib/nifi/__init__.py +0 -0
  17. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/hid_data_transfer_lib/nifi/nifi_rest.py +0 -0
  18. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/hid_data_transfer_lib/py.typed +0 -0
  19. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/hid_data_transfer_lib/util/__init__.py +0 -0
  20. {hid_data_transfer_lib-0.4.1 → hid_data_transfer_lib-0.5.0}/hid_data_transfer_lib/util/util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hid_data_transfer_lib
3
- Version: 0.4.1
3
+ Version: 0.5.0
4
4
  Summary: HiDALGO Data Transfer library provides methods to transfer data between different data providers and consumers using NIFI pipelines
5
5
  License: APL-2.0
6
6
  Author: Jesús Gorroñogoitia
@@ -12,16 +12,20 @@ Classifier: Programming Language :: Python :: 3.11
12
12
  Classifier: Programming Language :: Python :: 3.12
13
13
  Classifier: Programming Language :: Python :: 3.13
14
14
  Classifier: Programming Language :: Python :: 3.14
15
+ Classifier: Programming Language :: Python :: 3.15
15
16
  Requires-Dist: paramiko (>=3.3.1)
16
17
  Requires-Dist: requests (>=2.31.0)
17
18
  Requires-Dist: setuptools (>=79.0.0,<80.0.0)
18
19
  Description-Content-Type: text/markdown
19
20
 
20
21
  # Hidalgo2 Data Transfer Lib
22
+
21
23
  This repository contains the implementation of the Hidalgo2 data transfer library. It uses [Apache NIFI](https://nifi.apache.org/) to transfer data from different data sources to specified targets
22
24
 
23
25
  ## Features
26
+
24
27
  This library is planning to support the following features:
28
+
25
29
  - transfer datasets from Cloud Providers to HDFS
26
30
  - transfer datasets from Cloud Providers to CKAN
27
31
  - transfer datasets from/to Hadoop HDFS to/from HPC
@@ -31,39 +35,47 @@ This library is planning to support the following features:
31
35
  - transfer datasets from/to local filesystem to/from CKAN
32
36
 
33
37
  ## Current version
38
+
34
39
  Current version of the library supports the following features:
40
+
41
+ - transfer datasets from Cloud Providers (ECMWF and Meteofrance) to HDFS
42
+ - transfer datasets from Cloud Providers (ECMWF and Meteofrance) to CKAN
35
43
  - transfer datasets from/to Hadoop HDFS to/from HPC
36
44
  - transfer datasets from/to Hadoop HDFS to/from CKAN
37
45
  - transfer datasets from/to a CKAN to/from HPC
38
46
  - transfer datasets from/to local filesystem to/from CKAN
39
47
 
40
-
41
48
  ## Implementation
49
+
42
50
  This is a Python library that offers specialized API methods to transfer data from data sources to targets.
43
- Each API method launches a NIFI pipeline, by instantiating a NIFI process group out of its workflow definition registered in the NIFI registry.
44
- It uses the parameters given within the library method invocation to populate a NIFI parameter context that is asociated to the process group.
51
+ Each API method launches a NIFI pipeline, by instantiating a NIFI process group out of its workflow definition registered in the NIFI registry.
52
+ It uses the parameters given within the library method invocation to populate a NIFI parameter context that is asociated to the process group.
45
53
  Then, processors in the process group are executed once (or forever until the incomining processor's flowfile queue gets empty), one after another, following the group sequence flow, until the flow is completed.
46
- A processor is executed after the previous one has terminated. To check the status of the transfer command, the library offers another check-status command.
47
- Upon termination, the NIFI environment is cleaned up, by removing the created entities (i.e. the process group and its paramenter context).
48
- The Data Transfer Library sends requests to NIFI through its REST API.
54
+ A processor is executed after the previous one has terminated. To check the status of the transfer command, the library offers another check-status command.
55
+ Upon termination, the NIFI environment is cleaned up, by removing the created entities (i.e. the process group and its paramenter context).
56
+ The Data Transfer Library sends requests to NIFI through its REST API.
49
57
 
50
58
  ## Requirements
59
+
51
60
  To use the Data Transfer library, it is required the following requirements:
52
- - **Python3** execution environment
53
- - **Poetry** python package management tool (optional)
54
- - **NIFI** instance, with a NIFI 2.X server SSH account (for keys transfer). Latest NIFI supported version: 2.8
55
- - **Keycloak** instance, with a KEYCLOAK user's account
56
- - **HDFS** instance, with an user's Kerberos principal account
57
- - **CKAN** instance, with an user APIKey
61
+
62
+ - **Python3** execution environment
63
+ - **Poetry** python package management tool (optional)
64
+ - **NIFI** instance, with a NIFI 2.X server SSH account (for keys transfer). Latest NIFI supported version: 2.8
65
+ - **Keycloak** instance, with a KEYCLOAK user's account
66
+ - **HDFS** instance, with an user's Kerberos principal account
67
+ - **CKAN** instance, with an user APIKey
58
68
 
59
69
  Python3 should be installed in the computer where Data Transfer CLI will be used.
60
70
  To install Poetry, follows [this instructions](https://python-poetry.org/docs/#installing-with-the-official-installer)
61
71
 
62
72
  ## Data Transfer lib configuration
73
+
63
74
  ### Configuration file
75
+
64
76
  Before using the Data Transfer library, you should configure it to point at the target NIFI and Keycloak services. The default configuration file is located, by default, at the *data_transfer_cli/conf/hid_dt.cfg* file. However, this default configuration should be complemented (and optionally overriden) with user's specific settings, placed in a configuration file whose location should be also specified (e.g., *~/.dtcli/dtcli.cfg*). Settings in this latter user's configuration will override those in the former default library configuration. The user should not modify the default library configuration, but the the user's specific one, including therein any additional required settings (see below) or modifications to the default ones. The location of this user's specific configuration file is passed as parameter to the library when setting it programmatically.
65
77
 
66
- ```
78
+ ```script
67
79
  [Nifi]
68
80
  nifi_endpoint=https://nifi.hidalgo2.eu:9443
69
81
  nifi_upload_folder=/opt/nifi/data/upload
@@ -82,7 +94,8 @@ logging_level=INFO
82
94
  check_status_sleep_lapse=5
83
95
  ```
84
96
 
85
- Under the NIFI section,
97
+ Under the NIFI section,
98
+
86
99
  - We define the url of the NIFI service (*nifi_endpoint*),
87
100
  - We also specify a folder (*nifi_upload_folder*) in NIFI server where to upload files
88
101
  - And another folder (*nifi_download_folder*) where from to download files. These folder must be accessible by the NIFI service (ask NIFI administrator for details).
@@ -91,6 +104,7 @@ Under the NIFI section,
91
104
  These default library settings works with the HiDALGO2 NIFI, so not additional modifications are required.
92
105
 
93
106
  Under the Keycloak section, you can configure the Keycloak integrated with NIFI, specifying:
107
+
94
108
  - The Keycloak service endpoint (*keycloak_endpoint*)
95
109
  - The NIFI client in Keycloak (*keycloak_client*)
96
110
  - The NIFI secret in Keycloak (*keycloak_client_secret*). This setting must be set in the user's configuration (e.g., *~/.dtcli/dtcli.cfg*).
@@ -113,7 +127,7 @@ HiDALGO2 developers can contact the Keycloak administrator for the *keycloak_cli
113
127
 
114
128
  Additional user's accounts are specified in the user's specific configuration file (e.g., *~/.dtcli/dtcli.cfg*):
115
129
 
116
- ```
130
+ ```script
117
131
  [Nifi]
118
132
  nifi_server_username=<user_name>
119
133
  nifi_server_private_key=<path/to/private/key>
@@ -129,16 +143,19 @@ Under the Keycloak section, you must specify your Keycloak account (username and
129
143
 
130
144
  For HiDALGO2 developers, NIFI (Service, Server) and Keycloak accounts are provided by the HiDALGO2 administrator.
131
145
 
132
-
133
146
  ## Usage
147
+
134
148
  The data transfer library can be invoked following two procedures:
135
149
 
136
150
  ### Using user's configuration (e.g., ~/.dtcli/dtcli.cfg)
151
+
137
152
  In this case, user's configuration will be read from a give file, such as *~/.dtcli/dtcli.cfg*, whose location is programmatically passed as a parameter upon the setup of the library (see procedure below).
138
153
 
139
154
  ### Providing configuration in a dictionary
155
+
140
156
  In this case, the user's configuration is provided in a dictionary, with this structure:
141
- ```
157
+
158
+ ```script
142
159
  {
143
160
  'Nifi':
144
161
  {
@@ -158,6 +175,7 @@ In this case, the user's configuration is provided in a dictionary, with this st
158
175
  }
159
176
  }
160
177
  ```
178
+
161
179
  In this settings' dictionary you should add the user's specific accounts for Nifi and Keycloak, and optionally, other settings, as shown for the logging level or the sleep lapse time for checking the processors status on the Nifi pipeline. This dictionary is programmatically passed as parameter to the library upon its setup (see procedure below).
162
180
 
163
181
  The remaining procedure goes as follows:
@@ -168,7 +186,7 @@ The remaining procedure goes as follows:
168
186
 
169
187
  Example with user's configuration file
170
188
 
171
- ```
189
+ ```script
172
190
  from hid_data_transfer_lib.hid_dt_lib import HIDDataTransfer
173
191
  from hid_data_transfer_lib.conf.hid_dt_configuration import (
174
192
  HidDataTransferConfiguration
@@ -207,7 +225,8 @@ dt_client = HIDDataTransfer(
207
225
  ```
208
226
 
209
227
  Example with user's configuration dictionary:
210
- ```
228
+
229
+ ```script
211
230
  user_config_dict = {...} # See example of dictionary given above
212
231
  config = HidDataTransferConfiguration().configure(
213
232
  user_config_dict=user_config_dict,
@@ -215,9 +234,9 @@ config = HidDataTransferConfiguration().configure(
215
234
  dt_client = HIDDataTransfer(conf=config, secure=True)
216
235
  ```
217
236
 
218
-
219
237
  - Invoke any data transfer library method using the created object to tranfer data
220
- ```
238
+
239
+ ```script
221
240
  pipeline_id, accounting = dt_client.hpc2ckan(
222
241
  hpc_host=<hpc_endpoint>,
223
242
  hpc_username=<hpc_username>,
@@ -232,17 +251,22 @@ pipeline_id, accounting = dt_client.hpc2ckan(
232
251
  recursive=False,
233
252
  )
234
253
  ```
254
+
235
255
  This method returns the id of the data transfer pipeline that NIFI executed and an AccountingInfo object that contains statistics of data transfer, including the *pipeline_timespan* (or total transfer time) and the flowfiles_sizes, a dictionary whose keys are the names of the transferred files and the values are their lengths.
236
256
 
237
257
  ## Data Transfer optimization
258
+
238
259
  You can improve the data transfer rate by setting the optional parameter concurrent_tasks (*integer*) to the number of concurrent tasks that will be used in the NIFI pipeline (default is 1). The maximum number of tasks that improve the transfer throughput depends on the physical resources of the NIFI server (consult its administrator). The parallel transfer is currently supported to/from HPC and HDFS data servers, but not to/from CKAN (under development)
239
260
 
240
261
  ## Support for HPC clusters that require a 2FA token
262
+
241
263
  This library includes methods (suffixed as _2fa) to transfer data to/from HPC clusters that require a 2FA token. These methods offer an optional parameter *callback_2fa* that points to a method that should return (as str) the 2FA token when invoked by the library. If not set by the method caller, these methods call a default implementation that prompts the user (in the standard input) for the token.
242
264
 
243
265
  ## Data transfer process with NIFI
266
+
244
267
  The following UML Sequence Diagram describes the data transfer process for each command, for instance *ckan2hpc*, leveraging the associated NIFI pipeline.
245
268
  The Data Transfer (DT) Consumer (a client of this library) invokes a *ckan2hpc* command by following these steps:
269
+
246
270
  - Creates an instance of HidDataTransferConfiguration, which reads the file and environment configuration (see [Installation Instructions](#data-transfer-lib-configuration)).
247
271
  - Creates an instance of HIDDataTransfer with that configuration object, with secure mode activated, and by passing a dictionary with Keycloak token details. A renewable Keycloak token is required to invoke the remote NIFI REST APIs.
248
272
 
@@ -1,8 +1,11 @@
1
1
  # Hidalgo2 Data Transfer Lib
2
+
2
3
  This repository contains the implementation of the Hidalgo2 data transfer library. It uses [Apache NIFI](https://nifi.apache.org/) to transfer data from different data sources to specified targets
3
4
 
4
5
  ## Features
6
+
5
7
  This library is planning to support the following features:
8
+
6
9
  - transfer datasets from Cloud Providers to HDFS
7
10
  - transfer datasets from Cloud Providers to CKAN
8
11
  - transfer datasets from/to Hadoop HDFS to/from HPC
@@ -12,39 +15,47 @@ This library is planning to support the following features:
12
15
  - transfer datasets from/to local filesystem to/from CKAN
13
16
 
14
17
  ## Current version
18
+
15
19
  Current version of the library supports the following features:
20
+
21
+ - transfer datasets from Cloud Providers (ECMWF and Meteofrance) to HDFS
22
+ - transfer datasets from Cloud Providers (ECMWF and Meteofrance) to CKAN
16
23
  - transfer datasets from/to Hadoop HDFS to/from HPC
17
24
  - transfer datasets from/to Hadoop HDFS to/from CKAN
18
25
  - transfer datasets from/to a CKAN to/from HPC
19
26
  - transfer datasets from/to local filesystem to/from CKAN
20
27
 
21
-
22
28
  ## Implementation
29
+
23
30
  This is a Python library that offers specialized API methods to transfer data from data sources to targets.
24
- Each API method launches a NIFI pipeline, by instantiating a NIFI process group out of its workflow definition registered in the NIFI registry.
25
- It uses the parameters given within the library method invocation to populate a NIFI parameter context that is asociated to the process group.
31
+ Each API method launches a NIFI pipeline, by instantiating a NIFI process group out of its workflow definition registered in the NIFI registry.
32
+ It uses the parameters given within the library method invocation to populate a NIFI parameter context that is asociated to the process group.
26
33
  Then, processors in the process group are executed once (or forever until the incomining processor's flowfile queue gets empty), one after another, following the group sequence flow, until the flow is completed.
27
- A processor is executed after the previous one has terminated. To check the status of the transfer command, the library offers another check-status command.
28
- Upon termination, the NIFI environment is cleaned up, by removing the created entities (i.e. the process group and its paramenter context).
29
- The Data Transfer Library sends requests to NIFI through its REST API.
34
+ A processor is executed after the previous one has terminated. To check the status of the transfer command, the library offers another check-status command.
35
+ Upon termination, the NIFI environment is cleaned up, by removing the created entities (i.e. the process group and its paramenter context).
36
+ The Data Transfer Library sends requests to NIFI through its REST API.
30
37
 
31
38
  ## Requirements
39
+
32
40
  To use the Data Transfer library, it is required the following requirements:
33
- - **Python3** execution environment
34
- - **Poetry** python package management tool (optional)
35
- - **NIFI** instance, with a NIFI 2.X server SSH account (for keys transfer). Latest NIFI supported version: 2.8
36
- - **Keycloak** instance, with a KEYCLOAK user's account
37
- - **HDFS** instance, with an user's Kerberos principal account
38
- - **CKAN** instance, with an user APIKey
41
+
42
+ - **Python3** execution environment
43
+ - **Poetry** python package management tool (optional)
44
+ - **NIFI** instance, with a NIFI 2.X server SSH account (for keys transfer). Latest NIFI supported version: 2.8
45
+ - **Keycloak** instance, with a KEYCLOAK user's account
46
+ - **HDFS** instance, with an user's Kerberos principal account
47
+ - **CKAN** instance, with an user APIKey
39
48
 
40
49
  Python3 should be installed in the computer where Data Transfer CLI will be used.
41
50
  To install Poetry, follows [this instructions](https://python-poetry.org/docs/#installing-with-the-official-installer)
42
51
 
43
52
  ## Data Transfer lib configuration
53
+
44
54
  ### Configuration file
55
+
45
56
  Before using the Data Transfer library, you should configure it to point at the target NIFI and Keycloak services. The default configuration file is located, by default, at the *data_transfer_cli/conf/hid_dt.cfg* file. However, this default configuration should be complemented (and optionally overriden) with user's specific settings, placed in a configuration file whose location should be also specified (e.g., *~/.dtcli/dtcli.cfg*). Settings in this latter user's configuration will override those in the former default library configuration. The user should not modify the default library configuration, but the the user's specific one, including therein any additional required settings (see below) or modifications to the default ones. The location of this user's specific configuration file is passed as parameter to the library when setting it programmatically.
46
57
 
47
- ```
58
+ ```script
48
59
  [Nifi]
49
60
  nifi_endpoint=https://nifi.hidalgo2.eu:9443
50
61
  nifi_upload_folder=/opt/nifi/data/upload
@@ -63,7 +74,8 @@ logging_level=INFO
63
74
  check_status_sleep_lapse=5
64
75
  ```
65
76
 
66
- Under the NIFI section,
77
+ Under the NIFI section,
78
+
67
79
  - We define the url of the NIFI service (*nifi_endpoint*),
68
80
  - We also specify a folder (*nifi_upload_folder*) in NIFI server where to upload files
69
81
  - And another folder (*nifi_download_folder*) where from to download files. These folder must be accessible by the NIFI service (ask NIFI administrator for details).
@@ -72,6 +84,7 @@ Under the NIFI section,
72
84
  These default library settings works with the HiDALGO2 NIFI, so not additional modifications are required.
73
85
 
74
86
  Under the Keycloak section, you can configure the Keycloak integrated with NIFI, specifying:
87
+
75
88
  - The Keycloak service endpoint (*keycloak_endpoint*)
76
89
  - The NIFI client in Keycloak (*keycloak_client*)
77
90
  - The NIFI secret in Keycloak (*keycloak_client_secret*). This setting must be set in the user's configuration (e.g., *~/.dtcli/dtcli.cfg*).
@@ -94,7 +107,7 @@ HiDALGO2 developers can contact the Keycloak administrator for the *keycloak_cli
94
107
 
95
108
  Additional user's accounts are specified in the user's specific configuration file (e.g., *~/.dtcli/dtcli.cfg*):
96
109
 
97
- ```
110
+ ```script
98
111
  [Nifi]
99
112
  nifi_server_username=<user_name>
100
113
  nifi_server_private_key=<path/to/private/key>
@@ -110,16 +123,19 @@ Under the Keycloak section, you must specify your Keycloak account (username and
110
123
 
111
124
  For HiDALGO2 developers, NIFI (Service, Server) and Keycloak accounts are provided by the HiDALGO2 administrator.
112
125
 
113
-
114
126
  ## Usage
127
+
115
128
  The data transfer library can be invoked following two procedures:
116
129
 
117
130
  ### Using user's configuration (e.g., ~/.dtcli/dtcli.cfg)
131
+
118
132
  In this case, user's configuration will be read from a give file, such as *~/.dtcli/dtcli.cfg*, whose location is programmatically passed as a parameter upon the setup of the library (see procedure below).
119
133
 
120
134
  ### Providing configuration in a dictionary
135
+
121
136
  In this case, the user's configuration is provided in a dictionary, with this structure:
122
- ```
137
+
138
+ ```script
123
139
  {
124
140
  'Nifi':
125
141
  {
@@ -139,6 +155,7 @@ In this case, the user's configuration is provided in a dictionary, with this st
139
155
  }
140
156
  }
141
157
  ```
158
+
142
159
  In this settings' dictionary you should add the user's specific accounts for Nifi and Keycloak, and optionally, other settings, as shown for the logging level or the sleep lapse time for checking the processors status on the Nifi pipeline. This dictionary is programmatically passed as parameter to the library upon its setup (see procedure below).
143
160
 
144
161
  The remaining procedure goes as follows:
@@ -149,7 +166,7 @@ The remaining procedure goes as follows:
149
166
 
150
167
  Example with user's configuration file
151
168
 
152
- ```
169
+ ```script
153
170
  from hid_data_transfer_lib.hid_dt_lib import HIDDataTransfer
154
171
  from hid_data_transfer_lib.conf.hid_dt_configuration import (
155
172
  HidDataTransferConfiguration
@@ -188,7 +205,8 @@ dt_client = HIDDataTransfer(
188
205
  ```
189
206
 
190
207
  Example with user's configuration dictionary:
191
- ```
208
+
209
+ ```script
192
210
  user_config_dict = {...} # See example of dictionary given above
193
211
  config = HidDataTransferConfiguration().configure(
194
212
  user_config_dict=user_config_dict,
@@ -196,9 +214,9 @@ config = HidDataTransferConfiguration().configure(
196
214
  dt_client = HIDDataTransfer(conf=config, secure=True)
197
215
  ```
198
216
 
199
-
200
217
  - Invoke any data transfer library method using the created object to tranfer data
201
- ```
218
+
219
+ ```script
202
220
  pipeline_id, accounting = dt_client.hpc2ckan(
203
221
  hpc_host=<hpc_endpoint>,
204
222
  hpc_username=<hpc_username>,
@@ -213,17 +231,22 @@ pipeline_id, accounting = dt_client.hpc2ckan(
213
231
  recursive=False,
214
232
  )
215
233
  ```
234
+
216
235
  This method returns the id of the data transfer pipeline that NIFI executed and an AccountingInfo object that contains statistics of data transfer, including the *pipeline_timespan* (or total transfer time) and the flowfiles_sizes, a dictionary whose keys are the names of the transferred files and the values are their lengths.
217
236
 
218
237
  ## Data Transfer optimization
238
+
219
239
  You can improve the data transfer rate by setting the optional parameter concurrent_tasks (*integer*) to the number of concurrent tasks that will be used in the NIFI pipeline (default is 1). The maximum number of tasks that improve the transfer throughput depends on the physical resources of the NIFI server (consult its administrator). The parallel transfer is currently supported to/from HPC and HDFS data servers, but not to/from CKAN (under development)
220
240
 
221
241
  ## Support for HPC clusters that require a 2FA token
242
+
222
243
  This library includes methods (suffixed as _2fa) to transfer data to/from HPC clusters that require a 2FA token. These methods offer an optional parameter *callback_2fa* that points to a method that should return (as str) the 2FA token when invoked by the library. If not set by the method caller, these methods call a default implementation that prompts the user (in the standard input) for the token.
223
244
 
224
245
  ## Data transfer process with NIFI
246
+
225
247
  The following UML Sequence Diagram describes the data transfer process for each command, for instance *ckan2hpc*, leveraging the associated NIFI pipeline.
226
248
  The Data Transfer (DT) Consumer (a client of this library) invokes a *ckan2hpc* command by following these steps:
249
+
227
250
  - Creates an instance of HidDataTransferConfiguration, which reads the file and environment configuration (see [Installation Instructions](#data-transfer-lib-configuration)).
228
251
  - Creates an instance of HIDDataTransfer with that configuration object, with secure mode activated, and by passing a dictionary with Keycloak token details. A renewable Keycloak token is required to invoke the remote NIFI REST APIs.
229
252
 
@@ -22,7 +22,9 @@ import sys
22
22
  from typing import Any, Dict, Optional, Callable
23
23
  import uuid
24
24
  import os
25
+ import json
25
26
  from types import SimpleNamespace
27
+ from pathlib import Path
26
28
 
27
29
  from hid_data_transfer_lib.conf.hid_dt_configuration import (
28
30
  HidDataTransferConfiguration
@@ -46,6 +48,8 @@ HPC_2FA = "hpc.2fa"
46
48
  NIFI_DOWNLOAD_FOLDER = "nifi.download_folder"
47
49
  RECURSIVE = "recursive"
48
50
 
51
+ PYTHON_PATH_ECMWF = "/opt/nifi/data/scripts/ecmwf/nenv/bin/python"
52
+
49
53
  HPC_ACCOUNT_MSG = "Either hpc_password or hpc_secret_key must be provided"
50
54
 
51
55
 
@@ -70,7 +74,7 @@ class HIDDataTransfer:
70
74
  """
71
75
  self.__conf = conf
72
76
  self.__secure = secure
73
- self.use_keycloak_account = (keycloak_token is None)
77
+ self.use_keycloak_account = keycloak_token is None
74
78
  self.__nifi_client = NIFIClient().configure(
75
79
  conf, secure, use_keycloak_account=self.use_keycloak_account)
76
80
  self.__logger = self.__conf.logger("hid_data_transfer_lib")
@@ -93,21 +97,28 @@ class HIDDataTransfer:
93
97
  name = name.replace("?", ".")
94
98
  return name
95
99
 
96
- def generate_ckan_resource_name(self, args):
100
+ def generate_ckan_resource_name(self, args, prefix_zip:bool = True):
97
101
  '''computes the ckan resource name'''
98
102
  ckan_resource = args.ckan_resource
99
103
  if ckan_resource:
100
- ckan_resource = ckan_resource + ".zip" \
104
+ ckan_resource = self.process_wildcards(ckan_resource)
105
+ if prefix_zip and not ckan_resource.endswith(".zip"):
106
+ ckan_resource = ckan_resource + ".zip" \
101
107
  if not ckan_resource.endswith(".zip") \
102
108
  else ckan_resource
103
109
  else:
104
- ckan_resource = (
105
- args.data_source.replace("/", "_")[1:]
106
- if not args.data_source.endswith("/")
107
- else args.data_source[:-1].replace("/", "_")
110
+ if not hasattr(args, "data_source"):
111
+ ckan_resource = ".*"
112
+ else:
113
+ start_idx = 1 if args.data_source.startswith("/") else 0
114
+ ends_with_slash = args.data_source.endswith("/")
115
+ ckan_resource = (
116
+ args.data_source[start_idx:].replace("/", "_")[0:]
117
+ if not ends_with_slash
118
+ else args.data_source[start_idx:-1].replace("/", "_")
108
119
  )
109
- if not ckan_resource.endswith(".zip"):
110
- ckan_resource += ".zip"
120
+ if prefix_zip and not ckan_resource.endswith(".zip"):
121
+ ckan_resource += ".zip"
111
122
  return ckan_resource
112
123
 
113
124
  # MAIN API methods
@@ -561,6 +572,7 @@ class HIDDataTransfer:
561
572
  )
562
573
  try:
563
574
  hpc_filename = args.data_source[args.data_source.rfind("/") + 1 :]
575
+ hpc_filename = self.process_wildcards(hpc_filename)
564
576
  arguments: Dict[str, Any] = {}
565
577
  self.__nifi_client.add_default_hpc_parameters(arguments, args)
566
578
  arguments[HPC_FILENAME] = hpc_filename if hpc_filename else ".*"
@@ -1070,7 +1082,7 @@ class HIDDataTransfer:
1070
1082
  arguments: Dict[str, Any] = {}
1071
1083
  self.__nifi_client.add_default_ckan_parameters(arguments, args)
1072
1084
  arguments[self.__nifi_client.CKAN_RESOURCE] = \
1073
- self.process_wildcards(args.ckan_resource)
1085
+ self.generate_ckan_resource_name(args, prefix_zip=False)
1074
1086
 
1075
1087
  # If multiple ckan resource files are selected, data_target represents a folder
1076
1088
  # Else If data_target ends with / represents a folder, otherwise a file
@@ -1206,7 +1218,7 @@ class HIDDataTransfer:
1206
1218
  self.__nifi_client.add_default_hpc_parameters(arguments, args)
1207
1219
  self.__nifi_client.add_default_ckan_parameters(arguments, args)
1208
1220
  arguments[self.__nifi_client.CKAN_RESOURCE] = \
1209
- self.process_wildcards(args.ckan_resource)
1221
+ self.generate_ckan_resource_name(args, prefix_zip=False)
1210
1222
 
1211
1223
  # If multiple ckan resource files are selected, data_target represents a folder
1212
1224
  # Else If data_target ends with / represents a folder, otherwise a file
@@ -1405,7 +1417,7 @@ class HIDDataTransfer:
1405
1417
  arguments[HPC_TARGET_FOLDER] = args.data_target
1406
1418
  self.__nifi_client.add_default_ckan_parameters(arguments, args)
1407
1419
  arguments[self.__nifi_client.CKAN_RESOURCE] = \
1408
- self.process_wildcards(args.ckan_resource)
1420
+ self.generate_ckan_resource_name(args, prefix_zip=False)
1409
1421
 
1410
1422
  keys_arguments = {
1411
1423
  self.__nifi_client.HPC_SECRET_KEY_PATH: arguments[
@@ -2247,6 +2259,417 @@ class HIDDataTransfer:
2247
2259
  if download_folder is not None:
2248
2260
  self.__nifi_client.remove_download_folder(download_folder)
2249
2261
 
2262
+ def aggregate(self, accountings: list[AccountingInfo]) -> AccountingInfo:
2263
+ """Aggregate the accounting information from multiple process groups"""
2264
+ aggregated_accounting = AccountingInfo(
2265
+ pipeline_timespan = 0,
2266
+ flowfiles_sizes = {}
2267
+ )
2268
+ for accounting in accountings:
2269
+ aggregated_accounting.pipeline_timespan += accounting.pipeline_timespan
2270
+ aggregated_accounting.flowfiles_sizes.update(accounting.flowfiles_sizes)
2271
+
2272
+ return aggregated_accounting
2273
+
2274
+
2275
+ def meteofrance2ckan(
2276
+ self,
2277
+ meteofrance_config,
2278
+ meteofrance_apikey,
2279
+ ckan_host,
2280
+ ckan_api_key,
2281
+ ckan_organization,
2282
+ ckan_dataset
2283
+ ) -> tuple[str, AccountingInfo]:
2284
+ """
2285
+ transfer data from MeteoFrance service to CKAN
2286
+
2287
+ Args:
2288
+ ckan_host (str): The CKAN host URL.
2289
+ ckan_organization (str): The CKAN organization name.
2290
+ ckan_dataset (str): The CKAN dataset name.
2291
+ # ckan_resource (str): The name of the CKAN resource
2292
+ # to be created with the data.
2293
+ meteofrance_config (str): path to json file with request configuration
2294
+ meteofrance_apikey (str): The apikey for MeteoFrance
2295
+
2296
+ Returns:
2297
+ tuple[str, AccountingInfo]: The result of the process group execution.
2298
+
2299
+ Raises:
2300
+ HidDataTransferException: If an error occurs during
2301
+ the data transfer process.
2302
+
2303
+ """
2304
+
2305
+ args = SimpleNamespace(
2306
+ ckan_host=ckan_host,
2307
+ ckan_api_key=ckan_api_key,
2308
+ ckan_organization=ckan_organization,
2309
+ ckan_dataset=ckan_dataset,
2310
+ meteofrance_config=meteofrance_config,
2311
+ meteofrance_apikey=meteofrance_apikey,
2312
+ )
2313
+
2314
+ self.__logger.info(
2315
+ "executing meteofrance2ckan command with args: %s",
2316
+ self.__nifi_client.format_args_to_string(args),
2317
+ )
2318
+ try:
2319
+ arguments: Dict[str, Any] = {}
2320
+
2321
+ with open(meteofrance_config, encoding="utf-8") as config:
2322
+ mtf_config = json.load(config)
2323
+
2324
+ arguments['meteofrance.url'] = mtf_config['url']
2325
+ coverages = mtf_config['coverages']
2326
+ process_ids = []
2327
+ accountings = []
2328
+ for entry in coverages:
2329
+ arguments['meteofrance.coverageid'] = '&coverageid=' + entry['coverageid']
2330
+ arguments['meteofrance.subsets'] = \
2331
+ ''.join(['&subset=' + i for i in entry['subsets']])
2332
+ time = [i for i in entry['subsets'] if 'time' in i][0].strip('time(').strip(')')
2333
+
2334
+ args.ckan_resource = entry['coverageid'] + '_' + time + '.tif'
2335
+ self.__nifi_client.add_default_ckan_parameters(arguments, args)
2336
+ arguments[self.__nifi_client.CKAN_RESOURCE] = \
2337
+ self.generate_ckan_resource_name(args, False)
2338
+
2339
+ keys_arguments: Dict[str, Any] = {}
2340
+
2341
+ processors_with_meteofrance_sensitive_parameters = ["InvokeHTTP"]
2342
+ sensitive_parameters = \
2343
+ self.__nifi_client.set_sensitive_meteofrance_parameters(
2344
+ processors_with_meteofrance_sensitive_parameters, args
2345
+ )
2346
+
2347
+ processors_with_ckan_sensitive_parameters = ["CKANFileUploader"]
2348
+ sensitive_parameters.update(
2349
+ self.__nifi_client.set_sensitive_ckan_parameters(
2350
+ processors_with_ckan_sensitive_parameters, args
2351
+ )
2352
+ )
2353
+
2354
+ execution_type = {
2355
+ "InvokeHTTP": ExecutionType.ONCE,
2356
+ "UpdateAttribute": ExecutionType.ONCE,
2357
+ "CKANFileUploader": ExecutionType.ONCE,
2358
+ }
2359
+
2360
+ process_id, accounting = self.__nifi_client.run_process_group(
2361
+ "meteofrance2ckan",
2362
+ execution_type,
2363
+ arguments,
2364
+ keys_arguments,
2365
+ sensitive_parameters,
2366
+ keycloak_token=self.__keycloak_token,
2367
+ accounting_target="CKANFileUploader",
2368
+ )
2369
+ process_ids.append(process_id)
2370
+ accountings.append(accounting)
2371
+
2372
+ return '|'.join(process_ids), self.aggregate(accountings)
2373
+
2374
+ except Exception as ex:
2375
+ raise HidDataTransferException(ex) from ex
2376
+
2377
+ def meteofrance2hdfs(
2378
+ self,
2379
+ meteofrance_config,
2380
+ meteofrance_apikey,
2381
+ data_target,
2382
+ kerberos_principal=None,
2383
+ kerberos_password=None
2384
+ ) -> tuple[str, AccountingInfo]:
2385
+ """
2386
+ transfer data from MeteoFrance service to CKAN
2387
+
2388
+ Args:
2389
+ kerberos_principal (str): The kerberos principal.
2390
+ kerberos_password (str): The kerberos password.
2391
+ data_target (str): The target path in HDFS.
2392
+ data_source (str): The filename in HDFS.
2393
+ meteofrance_config (str): path to json file with request configuration
2394
+ meteofrance_apikey (str): The apikey for MeteoFrance
2395
+
2396
+ Returns:
2397
+ tuple[str, AccountingInfo]: The result of the process group execution.
2398
+
2399
+ Raises:
2400
+ HidDataTransferException: If an error occurs during
2401
+ the data transfer process.
2402
+
2403
+ """
2404
+
2405
+ args = SimpleNamespace(
2406
+ meteofrance_config=meteofrance_config,
2407
+ meteofrance_apikey=meteofrance_apikey,
2408
+ data_target=data_target,
2409
+ kerberos_principal=kerberos_principal,
2410
+ kerberos_password=kerberos_password,
2411
+ )
2412
+
2413
+ processors_with_kerberos = ["PutHDFS"]
2414
+ kerberos_account = SimpleNamespace(
2415
+ kerberos_principal=kerberos_principal,
2416
+ kerberos_password=kerberos_password,
2417
+ )
2418
+
2419
+ self.__logger.info(
2420
+ "executing meteofrance2hdfs command with args: %s",
2421
+ self.__nifi_client.format_args_to_string(args),
2422
+ )
2423
+ try:
2424
+ arguments: Dict[str, Any] = {}
2425
+ arguments[HDFS_DATA_FOLDER] = args.data_target
2426
+
2427
+ with open(meteofrance_config, encoding="utf-8") as config:
2428
+ mtf_config = json.load(config)
2429
+
2430
+ arguments['meteofrance.url'] = mtf_config['url']
2431
+ coverages = mtf_config['coverages']
2432
+ process_ids = []
2433
+ accountings = []
2434
+ for entry in coverages:
2435
+ arguments['meteofrance.coverageid'] = '&coverageid=' + entry['coverageid']
2436
+ arguments['meteofrance.subsets'] = \
2437
+ ''.join(['&subset=' + i for i in entry['subsets']])
2438
+ time = [i for i in entry['subsets'] if 'time' in i][0].strip('time(').strip(')')
2439
+ filename = entry['coverageid'] + '_' + time + '.tif'
2440
+ arguments[HDFS_FILENAME] = filename.replace(':', '_')
2441
+
2442
+ keys_arguments: Dict[str, Any] = {}
2443
+
2444
+ processors_with_meteofrance_sensitive_parameters = ["InvokeHTTP"]
2445
+ sensitive_parameters = \
2446
+ self.__nifi_client.set_sensitive_meteofrance_parameters(
2447
+ processors_with_meteofrance_sensitive_parameters, args
2448
+ )
2449
+
2450
+
2451
+ execution_type = {
2452
+ "InvokeHTTP": ExecutionType.ONCE,
2453
+ "UpdateAttribute": ExecutionType.ONCE,
2454
+ "PutHDFS": ExecutionType.FOREVER,
2455
+ }
2456
+
2457
+ process_id, accounting = self.__nifi_client.run_process_group(
2458
+ "meteofrance2hdfs",
2459
+ execution_type,
2460
+ arguments,
2461
+ keys_arguments,
2462
+ sensitive_parameters,
2463
+ keycloak_token=self.__keycloak_token,
2464
+ processors_with_kerberos=processors_with_kerberos,
2465
+ kerberos_account=kerberos_account,
2466
+ accounting_target="PutHDFS",
2467
+ )
2468
+ process_ids.append(process_id)
2469
+ accountings.append(accounting)
2470
+
2471
+ return '|'.join(process_ids), self.aggregate(accountings)
2472
+
2473
+ except Exception as ex:
2474
+ raise HidDataTransferException(ex) from ex
2475
+
2476
+ def ecmwf2ckan(
2477
+ self,
2478
+ data_script,
2479
+ ckan_host,
2480
+ ckan_api_key,
2481
+ ckan_organization,
2482
+ ckan_dataset,
2483
+ ckan_resource
2484
+ ) -> tuple[str, AccountingInfo]:
2485
+ """
2486
+ transfer data from ECMWF open data service to CKAN
2487
+
2488
+ Args:
2489
+ data_script (str): Path to the python script.
2490
+ ckan_host (str): The CKAN host URL.
2491
+ ckan_organization (str): The CKAN organization name.
2492
+ ckan_dataset (str): The CKAN dataset name.
2493
+ ckan_resource (str): The name of the CKAN resource
2494
+ to be created with the data.
2495
+
2496
+ Returns:
2497
+ tuple[str, AccountingInfo]: The result of the process group execution.
2498
+
2499
+ Raises:
2500
+ HidDataTransferException: If an error occurs during
2501
+ the data transfer process.
2502
+
2503
+ """
2504
+
2505
+ args = SimpleNamespace(
2506
+ ckan_host=ckan_host,
2507
+ ckan_api_key=ckan_api_key,
2508
+ ckan_organization=ckan_organization,
2509
+ ckan_dataset=ckan_dataset,
2510
+ data_script=data_script,
2511
+ )
2512
+
2513
+ self.__logger.info(
2514
+ "executing ecmwf2ckan command with args: %s",
2515
+ self.__nifi_client.format_args_to_string(args),
2516
+ )
2517
+
2518
+ upload_folder = None
2519
+ try:
2520
+ arguments: Dict[str, Any] = {}
2521
+
2522
+ local_regexp = \
2523
+ args.data_script[args.data_script.rfind("/") + 1 :]
2524
+ local_folder = args.data_script[: args.data_script.rfind("/")]
2525
+
2526
+ # Transfer files from data source to NIFI upload subfolder
2527
+ # (within user folder)
2528
+ upload_folder, num_files = self.__nifi_client.upload_files(
2529
+ local_folder, local_regexp
2530
+ )
2531
+ if num_files == 0:
2532
+ raise HidDataTransferException(
2533
+ f"File not found in {local_folder}"
2534
+ )
2535
+ arguments["local.folder"] = upload_folder
2536
+ # arguments["local.numfiles"] = num_files
2537
+
2538
+ arguments['nifi.download_folder'] = upload_folder
2539
+ arguments['python.path'] = PYTHON_PATH_ECMWF
2540
+ arguments['python.command'] = str(Path(upload_folder, local_regexp))
2541
+
2542
+ args.ckan_resource = ckan_resource
2543
+ self.__nifi_client.add_default_ckan_parameters(arguments, args)
2544
+ arguments[self.__nifi_client.CKAN_RESOURCE] = \
2545
+ self.generate_ckan_resource_name(args, False)
2546
+
2547
+ keys_arguments: Dict[str, Any] = {}
2548
+
2549
+ processors_with_ckan_sensitive_parameters = ["CKANFileUploader"]
2550
+ sensitive_parameters = \
2551
+ self.__nifi_client.set_sensitive_ckan_parameters(
2552
+ processors_with_ckan_sensitive_parameters, args
2553
+ )
2554
+
2555
+ execution_type = {
2556
+ "GenerateFlowFile": ExecutionType.ONCE,
2557
+ "ExecuteStreamCommand": ExecutionType.ONCE,
2558
+ "FetchFile": ExecutionType.ONCE,
2559
+ "UpdateAttribute": ExecutionType.ONCE,
2560
+ "CKANFileUploader": ExecutionType.ONCE,
2561
+ }
2562
+
2563
+ return self.__nifi_client.run_process_group(
2564
+ "ecmwf2ckan_v1.0",
2565
+ execution_type,
2566
+ arguments,
2567
+ keys_arguments,
2568
+ sensitive_parameters,
2569
+ keycloak_token=self.__keycloak_token,
2570
+ accounting_target="CKANFileUploader",
2571
+ )
2572
+
2573
+ except Exception as ex:
2574
+ raise HidDataTransferException(ex) from ex
2575
+
2576
+ def ecmwf2hdfs(
2577
+ self,
2578
+ data_script,
2579
+ data_target,
2580
+ data_source,
2581
+ kerberos_principal=None,
2582
+ kerberos_password=None
2583
+ ) -> tuple[str, AccountingInfo]:
2584
+ """
2585
+ transfer data from ECMWF open data service to HDFS
2586
+
2587
+ Args:
2588
+ data_target (str): The target path in HDFS.
2589
+ data_source (str): The filename in script.
2590
+ data_script (str): Path to the python script.
2591
+ kerberos_principal (str): The kerberos principal.
2592
+ kerberos_password (str): The kerberos password.
2593
+
2594
+ Returns:
2595
+ tuple[str, AccountingInfo]: The result of the process group execution.
2596
+
2597
+ Raises:
2598
+ HidDataTransferException: If an error occurs during
2599
+ the data transfer process.
2600
+
2601
+ """
2602
+
2603
+ args = SimpleNamespace(
2604
+ data_source=data_source,
2605
+ data_target=data_target,
2606
+ data_script=data_script,
2607
+ kerberos_principal=kerberos_principal,
2608
+ kerberos_password=kerberos_password,
2609
+ )
2610
+
2611
+ processors_with_kerberos = ["PutHDFS"]
2612
+ kerberos_account = SimpleNamespace(
2613
+ kerberos_principal=kerberos_principal,
2614
+ kerberos_password=kerberos_password,
2615
+ )
2616
+
2617
+ self.__logger.info(
2618
+ "executing ecmwf2hdfs command with args: %s",
2619
+ self.__nifi_client.format_args_to_string(args),
2620
+ )
2621
+
2622
+ upload_folder = None
2623
+ try:
2624
+ arguments: Dict[str, Any] = {}
2625
+ arguments[HDFS_DATA_FOLDER] = args.data_target
2626
+ arguments[HDFS_FILENAME] = args.data_source
2627
+
2628
+ local_regexp = \
2629
+ args.data_script[args.data_script.rfind("/") + 1 :]
2630
+ local_folder = args.data_script[: args.data_script.rfind("/")]
2631
+
2632
+ # Transfer script file to NIFI upload subfolder
2633
+ # (within user folder)
2634
+ upload_folder, num_files = self.__nifi_client.upload_files(
2635
+ local_folder, local_regexp
2636
+ )
2637
+ if num_files == 0:
2638
+ raise HidDataTransferException(
2639
+ f"File not found in {local_folder}"
2640
+ )
2641
+ arguments["local.folder"] = upload_folder
2642
+ # arguments["local.numfiles"] = num_files
2643
+
2644
+ arguments['nifi.download_folder'] = upload_folder
2645
+ arguments['python.path'] = PYTHON_PATH_ECMWF
2646
+ arguments['python.command'] = str(Path(upload_folder, local_regexp))
2647
+
2648
+ keys_arguments: Dict[str, Any] = {}
2649
+
2650
+ execution_type = {
2651
+ "GenerateFlowFile": ExecutionType.ONCE,
2652
+ "ExecuteStreamCommand": ExecutionType.ONCE,
2653
+ "FetchFile": ExecutionType.ONCE,
2654
+ "UpdateAttribute": ExecutionType.ONCE,
2655
+ "PutHDFS": ExecutionType.FOREVER,
2656
+ }
2657
+
2658
+ return self.__nifi_client.run_process_group(
2659
+ "ecmwf2hdfs",
2660
+ execution_type,
2661
+ arguments,
2662
+ keys_arguments,
2663
+ keycloak_token=self.__keycloak_token,
2664
+ processors_with_kerberos=processors_with_kerberos,
2665
+ kerberos_account=kerberos_account,
2666
+ accounting_target="PutHDFS",
2667
+ )
2668
+
2669
+ except Exception as ex:
2670
+ raise HidDataTransferException(ex) from ex
2671
+
2672
+
2250
2673
  def check_command_status(self, command_id):
2251
2674
  """
2252
2675
  Checks the status of a NIFI pipeline (process group) by ID
@@ -125,6 +125,7 @@ class NIFIClient:
125
125
  CKAN_RESOURCE = "ckan.resource"
126
126
  CKAN_CONCURRENT_TASKS = "ckan.concurrent_tasks"
127
127
  KERBEROS_PASSWORD = "Kerberos Password"
128
+ APIKEY = "apikey" #Meteofrance APIKEY
128
129
 
129
130
  def __init__(self):
130
131
  """Constructor method"""
@@ -1775,6 +1776,19 @@ class NIFIClient:
1775
1776
  )
1776
1777
  return sensitive_parameters
1777
1778
 
1779
+ def set_sensitive_meteofrance_parameters(
1780
+ self, processors_with_meteofrance_sensitive_parameters, args):
1781
+ """Set sensitive parameters for METEOFRANCE connection"""
1782
+ sensitive_parameters = {}
1783
+ for processor in processors_with_meteofrance_sensitive_parameters:
1784
+ inner_sensitive_parameters = {}
1785
+ sensitive_parameters[processor] = inner_sensitive_parameters
1786
+ if args.meteofrance_apikey:
1787
+ inner_sensitive_parameters[self.APIKEY] = (
1788
+ args.meteofrance_apikey
1789
+ )
1790
+ return sensitive_parameters
1791
+
1778
1792
  def set_kerberos_configuration(self, process_group_id,
1779
1793
  kerberos_account, processors_with_kerberos):
1780
1794
  """Set Kerberos configuration for processors"""
@@ -1,9 +1,10 @@
1
1
  [project]
2
2
  name = "hid_data_transfer_lib"
3
- version = "0.4.1"
3
+ version = "0.5.0"
4
4
  description = "HiDALGO Data Transfer library provides methods to transfer data between different data providers and consumers using NIFI pipelines"
5
5
  authors = [
6
6
  { name = "Jesús Gorroñogoitia", email = "jesus.gorronogoitia@eviden.com" },
7
+ { name = "Angela Rivera", email = "angela@meteogrid.com" },
7
8
  ]
8
9
  license = "APL-2.0"
9
10
  readme = "README.md"
@@ -41,7 +42,7 @@ pytest = "^8.3.5"
41
42
  pytest-cov = "^6.1.0"
42
43
  pytest-env = "^1.1.5"
43
44
  numpy = "^2.3.4"
44
- python-dotenv = "^1.2.3"
45
+ python-dotenv = "^1.2.4"
45
46
 
46
47
  [build-system]
47
48
  requires = ["poetry-core"]