castor-extractor 0.24.40__py3-none-any.whl → 0.24.42__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 castor-extractor might be problematic. Click here for more details.

CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.24.42 - 2025-08-19
4
+
5
+ * Strategy: exclude COLUMNS from extraction
6
+
7
+ ## 0.24.41 - 2025-08-19
8
+
9
+ * Sigma: retry on 429 errors when fetching connection paths
10
+
3
11
  ## 0.24.40 - 2025-08-18
4
12
 
5
13
  * SQLServer: fix database allowlist/blocklist filtering
@@ -1,6 +1,8 @@
1
1
  import logging
2
+ from http import HTTPStatus
2
3
  from typing import TYPE_CHECKING, Callable, Iterator
3
4
 
5
+ from ....utils import retry_request
4
6
  from .endpoints import SigmaEndpointFactory
5
7
 
6
8
  if TYPE_CHECKING:
@@ -8,6 +10,9 @@ if TYPE_CHECKING:
8
10
 
9
11
  logger = logging.getLogger(__name__)
10
12
 
13
+ SIGMA_CONNECTION_PATH_MAX_RETRY = 1
14
+ SIGMA_CONNECTION_PATH_SLEEP_MS = 30_000 # 30 seconds
15
+
11
16
 
12
17
  class SigmaSourcesTransformer:
13
18
  """Retrieves asset sources and enhances them with additional information."""
@@ -15,6 +20,17 @@ class SigmaSourcesTransformer:
15
20
  def __init__(self, api_client: "SigmaClient"):
16
21
  self.api_client = api_client
17
22
 
23
+ @retry_request(
24
+ status_codes=(HTTPStatus.TOO_MANY_REQUESTS,),
25
+ max_retries=SIGMA_CONNECTION_PATH_MAX_RETRY,
26
+ base_ms=SIGMA_CONNECTION_PATH_SLEEP_MS,
27
+ )
28
+ def _get_connection_path(self, table_id: str) -> dict:
29
+ """Retrieves the connection path for a given table id"""
30
+ return self.api_client._get(
31
+ endpoint=SigmaEndpointFactory.connection_path(table_id)
32
+ )
33
+
18
34
  def _map_table_id_to_connection_path(
19
35
  self, all_sources: list
20
36
  ) -> dict[str, dict]:
@@ -29,9 +45,7 @@ class SigmaSourcesTransformer:
29
45
  }
30
46
 
31
47
  return {
32
- table_id: self.api_client._get(
33
- endpoint=SigmaEndpointFactory.connection_path(table_id)
34
- )
48
+ table_id: self._get_connection_path(table_id)
35
49
  for table_id in unique_table_ids
36
50
  }
37
51
 
@@ -22,7 +22,7 @@ def iterate_all_data(
22
22
  ) -> Iterable[tuple[str, Union[list, dict]]]:
23
23
  """Iterate over the extracted data from Strategy"""
24
24
 
25
- for asset in StrategyAsset:
25
+ for asset in StrategyAsset.mandatory:
26
26
  logger.info(f"Extracting {asset.value.upper()} from REST API")
27
27
  data = client.fetch(asset)
28
28
  yield asset.name.lower(), list(deep_serialize(data))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: castor-extractor
3
- Version: 0.24.40
3
+ Version: 0.24.42
4
4
  Summary: Extract your metadata assets.
5
5
  Home-page: https://www.castordoc.com/
6
6
  License: EULA
@@ -215,6 +215,14 @@ For any questions or bug report, contact us at [support@coalesce.io](mailto:supp
215
215
 
216
216
  # Changelog
217
217
 
218
+ ## 0.24.42 - 2025-08-19
219
+
220
+ * Strategy: exclude COLUMNS from extraction
221
+
222
+ ## 0.24.41 - 2025-08-19
223
+
224
+ * Sigma: retry on 429 errors when fetching connection paths
225
+
218
226
  ## 0.24.40 - 2025-08-18
219
227
 
220
228
  * SQLServer: fix database allowlist/blocklist filtering
@@ -1,4 +1,4 @@
1
- CHANGELOG.md,sha256=tgZkN-SNTMCro37DG0nW91MaD6ZnHM9VWWZG2-7TP68,19406
1
+ CHANGELOG.md,sha256=wBOldpLx6AkuwA9zq0ZeOo7J2kvO8OA7mboqb3449PI,19562
2
2
  Dockerfile,sha256=xQ05-CFfGShT3oUqaiumaldwA288dj9Yb_pxofQpufg,301
3
3
  DockerfileUsage.md,sha256=2hkJQF-5JuuzfPZ7IOxgM6QgIQW7l-9oRMFVwyXC4gE,998
4
4
  LICENCE,sha256=sL-IGa4hweyya1HgzMskrRdybbIa2cktzxb5qmUgDg8,8254
@@ -277,7 +277,7 @@ castor_extractor/visualization/sigma/client/client_test.py,sha256=ae0ZOvKutCm44j
277
277
  castor_extractor/visualization/sigma/client/credentials.py,sha256=XddAuQSmCKpxJ70TQgRnOj0vMPYVtiStk_lMMQ1AiNM,693
278
278
  castor_extractor/visualization/sigma/client/endpoints.py,sha256=i7KTKnl2Os6752CdtJl0vPSC_Z6JxmacodV_saOnce0,1662
279
279
  castor_extractor/visualization/sigma/client/pagination.py,sha256=2bFA7GiBUUasFtHJKA90516d283p7Pg50-4zw6Fwt8I,726
280
- castor_extractor/visualization/sigma/client/sources_transformer.py,sha256=mRupzxjtjDqELIouHF0egBkgslDmn5Y4uqO_sbUGCNs,3244
280
+ castor_extractor/visualization/sigma/client/sources_transformer.py,sha256=n-5mZWSvzfTwpM5VP_bwlcxcaAwCKEEbpMCG_1KRVP4,3748
281
281
  castor_extractor/visualization/sigma/client/sources_transformer_test.py,sha256=06yUHXyv65amXLKXhix6K3kkVc1kpBqSjIYcxbyMI4Y,2766
282
282
  castor_extractor/visualization/sigma/extract.py,sha256=poTh70Xm2D6BwbdGApLkjXy6-t4iZnOoMB5DPfaTLEI,2929
283
283
  castor_extractor/visualization/strategy/__init__.py,sha256=HOMv4JxqF5ZmViWi-pDE-PSXJRLTdXal_jtpHG_rlR8,123
@@ -286,7 +286,7 @@ castor_extractor/visualization/strategy/client/__init__.py,sha256=XWP0yF5j6JefDJ
286
286
  castor_extractor/visualization/strategy/client/client.py,sha256=6DJO0Fh67FXxmwY5h_X9cu5sEq3GhM19b9hwn_fvhSE,9460
287
287
  castor_extractor/visualization/strategy/client/credentials.py,sha256=urFfNxWX1JG6wwFMYImufQzHa5g-sgjdlVGzi63owwg,1113
288
288
  castor_extractor/visualization/strategy/client/properties.py,sha256=66oBm8Kz6HEQW_jNR5_fAI_O921R2F5yH2Ff3zjtJOk,4500
289
- castor_extractor/visualization/strategy/extract.py,sha256=2fBuvS2xiOGXRpxXnZsE_C3en6t1-BlM5TbusjHyEkg,1166
289
+ castor_extractor/visualization/strategy/extract.py,sha256=9Ec48BwiA-5nykhcQiqkSiL_RB034_Ci-ck89YK5Nic,1176
290
290
  castor_extractor/visualization/tableau/__init__.py,sha256=eFI_1hjdkxyUiAYiy3szwyuwn3yJ5C_KbpBU0ySJDcQ,138
291
291
  castor_extractor/visualization/tableau/assets.py,sha256=HbCRd8VCj1WBEeqg9jwnygnT7xOFJ6PQD7Lq7sV-XR0,635
292
292
  castor_extractor/visualization/tableau/client/__init__.py,sha256=P8RKFKOC63WkH5hdEytJOwHS9vzQ8GXreLfXZetmMP8,78
@@ -431,8 +431,8 @@ castor_extractor/warehouse/sqlserver/queries/table.sql,sha256=YwFhHc6rGbszqQt7Iz
431
431
  castor_extractor/warehouse/sqlserver/queries/user.sql,sha256=gOrZsMVypusR2dc4vwVs4E1a-CliRsr_UjnD2EbXs-A,94
432
432
  castor_extractor/warehouse/sqlserver/query.py,sha256=7sW8cK3JzxPt6faTJ7e4lk9tE4fo_AeCymI-LqsSols,1276
433
433
  castor_extractor/warehouse/synapse/queries/column.sql,sha256=lNcFoIW3Y0PFOqoOzJEXmPvZvfAsY0AP63Mu2LuPzPo,1351
434
- castor_extractor-0.24.40.dist-info/LICENCE,sha256=sL-IGa4hweyya1HgzMskrRdybbIa2cktzxb5qmUgDg8,8254
435
- castor_extractor-0.24.40.dist-info/METADATA,sha256=ONg1SCc3gcrOJqBE92EtyfQctf-hRxI_u2VUbBpvgVA,26859
436
- castor_extractor-0.24.40.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
437
- castor_extractor-0.24.40.dist-info/entry_points.txt,sha256=_F-qeZCybjoMkNb9ErEhnyqXuG6afHIFQhakdBHZsr4,1803
438
- castor_extractor-0.24.40.dist-info/RECORD,,
434
+ castor_extractor-0.24.42.dist-info/LICENCE,sha256=sL-IGa4hweyya1HgzMskrRdybbIa2cktzxb5qmUgDg8,8254
435
+ castor_extractor-0.24.42.dist-info/METADATA,sha256=yzhHBGi8q9y-Au6LpFDemdYkmNQ2v0HNXZrlEaRO_60,27015
436
+ castor_extractor-0.24.42.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
437
+ castor_extractor-0.24.42.dist-info/entry_points.txt,sha256=_F-qeZCybjoMkNb9ErEhnyqXuG6afHIFQhakdBHZsr4,1803
438
+ castor_extractor-0.24.42.dist-info/RECORD,,