gooddata-pipelines 1.48.1.dev2__py3-none-any.whl → 1.48.1.dev3__py3-none-any.whl
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.
Potentially problematic release.
This version of gooddata-pipelines might be problematic. Click here for more details.
- gooddata_pipelines/backup_and_restore/backup_input_processor.py +13 -5
- gooddata_pipelines/backup_and_restore/backup_manager.py +23 -10
- {gooddata_pipelines-1.48.1.dev2.dist-info → gooddata_pipelines-1.48.1.dev3.dist-info}/METADATA +2 -2
- {gooddata_pipelines-1.48.1.dev2.dist-info → gooddata_pipelines-1.48.1.dev3.dist-info}/RECORD +6 -6
- {gooddata_pipelines-1.48.1.dev2.dist-info → gooddata_pipelines-1.48.1.dev3.dist-info}/WHEEL +0 -0
- {gooddata_pipelines-1.48.1.dev2.dist-info → gooddata_pipelines-1.48.1.dev3.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -158,25 +158,33 @@ class BackupInputProcessor:
|
|
|
158
158
|
return all_workspaces
|
|
159
159
|
|
|
160
160
|
def get_ids_to_backup(
|
|
161
|
-
self,
|
|
161
|
+
self,
|
|
162
|
+
input_type: InputType,
|
|
163
|
+
path_to_csv: str | None = None,
|
|
164
|
+
workspace_ids: list[str] | None = None,
|
|
162
165
|
) -> list[str]:
|
|
163
166
|
"""Returns the list of workspace IDs to back up based on the input type."""
|
|
164
167
|
|
|
165
168
|
if input_type in (InputType.LIST_OF_WORKSPACES, InputType.HIERARCHY):
|
|
166
|
-
if path_to_csv is None:
|
|
169
|
+
if (path_to_csv is None) == (workspace_ids is None):
|
|
167
170
|
raise ValueError(
|
|
168
|
-
f"Path to CSV
|
|
171
|
+
f"Path to CSV and list of workspace IDs must be specified exclusively for this input type: {input_type.value}"
|
|
169
172
|
)
|
|
170
173
|
|
|
171
174
|
# If we're backing up based on the list, simply read it from the CSV
|
|
175
|
+
list_of_parents = []
|
|
176
|
+
if path_to_csv is not None:
|
|
177
|
+
list_of_parents = self.csv_reader.read_backup_csv(path_to_csv)
|
|
178
|
+
if workspace_ids is not None:
|
|
179
|
+
list_of_parents = workspace_ids
|
|
180
|
+
|
|
172
181
|
if input_type == InputType.LIST_OF_WORKSPACES:
|
|
173
|
-
return
|
|
182
|
+
return list_of_parents
|
|
174
183
|
else:
|
|
175
184
|
# For hierarchy backup, we read the CSV and treat it as a list of
|
|
176
185
|
# parent workspace IDs. Then we retrieve the children of each parent,
|
|
177
186
|
# including their children, and so on. The parent workspaces are
|
|
178
187
|
# also included in the backup.
|
|
179
|
-
list_of_parents = self.csv_reader.read_backup_csv(path_to_csv)
|
|
180
188
|
list_of_children: list[str] = []
|
|
181
189
|
|
|
182
190
|
for parent in list_of_parents:
|
|
@@ -373,29 +373,37 @@ class BackupManager:
|
|
|
373
373
|
|
|
374
374
|
raise
|
|
375
375
|
|
|
376
|
-
def backup_workspaces(
|
|
376
|
+
def backup_workspaces(
|
|
377
|
+
self, path_to_csv: str | None, workspace_ids: list[str] | None
|
|
378
|
+
) -> None:
|
|
377
379
|
"""Runs the backup process for a list of workspace IDs.
|
|
378
380
|
|
|
379
|
-
Will
|
|
380
|
-
|
|
381
|
+
Will take the list of workspace IDs or read the list of
|
|
382
|
+
workspace IDs from a CSV file and create backup for each
|
|
383
|
+
workspace in storage specified in the configuration.
|
|
381
384
|
|
|
382
385
|
Args:
|
|
383
386
|
path_to_csv (str): Path to a CSV file containing a list of workspace IDs.
|
|
387
|
+
workspace_ids (list[str]): List of workspace IDs
|
|
384
388
|
"""
|
|
385
|
-
self.backup(InputType.LIST_OF_WORKSPACES, path_to_csv)
|
|
389
|
+
self.backup(InputType.LIST_OF_WORKSPACES, path_to_csv, workspace_ids)
|
|
386
390
|
|
|
387
|
-
def backup_hierarchies(
|
|
391
|
+
def backup_hierarchies(
|
|
392
|
+
self, path_to_csv: str | None, workspace_ids: list[str] | None
|
|
393
|
+
) -> None:
|
|
388
394
|
"""Runs the backup process for a list of hierarchies.
|
|
389
395
|
|
|
390
|
-
Will
|
|
391
|
-
|
|
396
|
+
Will take the list of workspace IDs or read the list of workspace IDs
|
|
397
|
+
from a CSV file and create backup for each those workspaces' hierarchies
|
|
398
|
+
in storage specified in the configuration.
|
|
392
399
|
Workspace hierarchy means the workspace itself and all its direct and
|
|
393
400
|
indirect children.
|
|
394
401
|
|
|
395
402
|
Args:
|
|
396
403
|
path_to_csv (str): Path to a CSV file containing a list of workspace IDs.
|
|
404
|
+
workspace_ids (list[str]): List of workspace IDs
|
|
397
405
|
"""
|
|
398
|
-
self.backup(InputType.HIERARCHY, path_to_csv)
|
|
406
|
+
self.backup(InputType.HIERARCHY, path_to_csv, workspace_ids)
|
|
399
407
|
|
|
400
408
|
def backup_entire_organization(self) -> None:
|
|
401
409
|
"""Runs the backup process for the entire organization.
|
|
@@ -406,12 +414,17 @@ class BackupManager:
|
|
|
406
414
|
self.backup(InputType.ORGANIZATION)
|
|
407
415
|
|
|
408
416
|
def backup(
|
|
409
|
-
self,
|
|
417
|
+
self,
|
|
418
|
+
input_type: InputType,
|
|
419
|
+
path_to_csv: str | None = None,
|
|
420
|
+
workspace_ids: list[str] | None = None,
|
|
410
421
|
) -> None:
|
|
411
422
|
"""Runs the backup process with selected input type."""
|
|
412
423
|
try:
|
|
413
424
|
workspaces_to_export: list[str] = self.loader.get_ids_to_backup(
|
|
414
|
-
input_type,
|
|
425
|
+
input_type,
|
|
426
|
+
path_to_csv,
|
|
427
|
+
workspace_ids,
|
|
415
428
|
)
|
|
416
429
|
batches = self.split_to_batches(
|
|
417
430
|
workspaces_to_export, self.config.batch_size
|
{gooddata_pipelines-1.48.1.dev2.dist-info → gooddata_pipelines-1.48.1.dev3.dist-info}/METADATA
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gooddata-pipelines
|
|
3
|
-
Version: 1.48.1.
|
|
3
|
+
Version: 1.48.1.dev3
|
|
4
4
|
Author-email: GoodData <support@gooddata.com>
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE.txt
|
|
7
7
|
Requires-Python: >=3.10
|
|
8
8
|
Requires-Dist: boto3-stubs<2.0.0,>=1.39.3
|
|
9
9
|
Requires-Dist: boto3<2.0.0,>=1.39.3
|
|
10
|
-
Requires-Dist: gooddata-sdk~=1.48.1.
|
|
10
|
+
Requires-Dist: gooddata-sdk~=1.48.1.dev3
|
|
11
11
|
Requires-Dist: pydantic<3.0.0,>=2.11.3
|
|
12
12
|
Requires-Dist: requests<3.0.0,>=2.32.3
|
|
13
13
|
Requires-Dist: types-pyyaml<7.0.0,>=6.0.12.20250326
|
{gooddata_pipelines-1.48.1.dev2.dist-info → gooddata_pipelines-1.48.1.dev3.dist-info}/RECORD
RENAMED
|
@@ -8,8 +8,8 @@ gooddata_pipelines/api/gooddata_api_wrapper.py,sha256=t7dFrXJ6X4yXS9XDthOmvd2Cyz
|
|
|
8
8
|
gooddata_pipelines/api/gooddata_sdk.py,sha256=wd5O4e9BQLWUawt6odrs5a51nqFGthBkvqh9WOiW36Q,13734
|
|
9
9
|
gooddata_pipelines/api/utils.py,sha256=3QY_aYH17I9THoCINE3l-n5oj52k-gNeT1wv6Z_VxN8,1433
|
|
10
10
|
gooddata_pipelines/backup_and_restore/__init__.py,sha256=-BG28PGDbalLyZGQjpFG0pjdIvtf25ut0r8ZwZVbi4s,32
|
|
11
|
-
gooddata_pipelines/backup_and_restore/backup_input_processor.py,sha256=
|
|
12
|
-
gooddata_pipelines/backup_and_restore/backup_manager.py,sha256=
|
|
11
|
+
gooddata_pipelines/backup_and_restore/backup_input_processor.py,sha256=ex1tGwETdHDDBRJ_DGKZsZbH6uoRuOrbGbKOC976H5s,7940
|
|
12
|
+
gooddata_pipelines/backup_and_restore/backup_manager.py,sha256=MZJIdaWp3KlhUFv0V0lh495X-LHGUsNSEsrxKfvuHgE,15898
|
|
13
13
|
gooddata_pipelines/backup_and_restore/constants.py,sha256=AO4H6ngsLMs4bCV-RcT7xIi-VZu3smgZWA_3P7lVsQc,907
|
|
14
14
|
gooddata_pipelines/backup_and_restore/csv_reader.py,sha256=0Kw7mJT7REj3Gjqfsc6YT9MbhcqfCGNB_SKBwzTI1rk,1268
|
|
15
15
|
gooddata_pipelines/backup_and_restore/models/__init__.py,sha256=-BG28PGDbalLyZGQjpFG0pjdIvtf25ut0r8ZwZVbi4s,32
|
|
@@ -48,7 +48,7 @@ gooddata_pipelines/provisioning/utils/__init__.py,sha256=-BG28PGDbalLyZGQjpFG0pj
|
|
|
48
48
|
gooddata_pipelines/provisioning/utils/context_objects.py,sha256=sM22hMsxE0XLI1TU0Vs-2kK0vf4YrB1musoAg__4bjc,936
|
|
49
49
|
gooddata_pipelines/provisioning/utils/exceptions.py,sha256=1WnAOlPhqOf0xRcvn70lxAlLb8Oo6m6WCYS4hj9uzDU,3630
|
|
50
50
|
gooddata_pipelines/provisioning/utils/utils.py,sha256=_Tk-mFgbIGpCixDCF9e-3ZYd-g5Jb3SJiLSH465k4jY,2846
|
|
51
|
-
gooddata_pipelines-1.48.1.
|
|
52
|
-
gooddata_pipelines-1.48.1.
|
|
53
|
-
gooddata_pipelines-1.48.1.
|
|
54
|
-
gooddata_pipelines-1.48.1.
|
|
51
|
+
gooddata_pipelines-1.48.1.dev3.dist-info/METADATA,sha256=OFkLoPEtFhiA8JmlGqSt3PXEwMTCTiknrgm0ym47flA,3750
|
|
52
|
+
gooddata_pipelines-1.48.1.dev3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
53
|
+
gooddata_pipelines-1.48.1.dev3.dist-info/licenses/LICENSE.txt,sha256=PNC7WXGIo6OKkNoPLRxlVrw6jaLcjSTUsSxy9Xcu9Jo,560365
|
|
54
|
+
gooddata_pipelines-1.48.1.dev3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|