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
logger.info(f"project({project.name}) is not denied as per project_pattern")
974
-
returnFalse
962
+
"""
963
+
Why use an explicit denial check instead of the `AllowDenyPattern.allowed` method?
964
+
965
+
Consider a scenario where a Tableau site contains four projects: A, B, C, and D, with the following hierarchical relationship:
966
+
967
+
- **A**
968
+
- **B** (Child of A)
969
+
- **C** (Child of A)
970
+
- **D**
971
+
972
+
In this setup:
973
+
974
+
- `project_pattern` is configured with `allow: ["A"]` and `deny: ["B"]`.
975
+
- `extract_project_hierarchy` is set to `True`.
976
+
977
+
The goal is to extract assets from project A and its children while explicitly denying the child project B.
978
+
979
+
If we rely solely on the `project_pattern.allowed()` method, project C's assets will not be ingested.
980
+
This happens because project C is not explicitly included in the `allow` list, nor is it part of the `deny` list.
981
+
However, since `extract_project_hierarchy` is enabled, project C should ideally be included in the ingestion process unless explicitly denied.
982
+
983
+
To address this, the function explicitly checks the deny regex to ensure that project C’s assets are ingested if it is not specifically denied in the deny list. This approach ensures that the hierarchy is respected while adhering to the configured allow/deny rules.
984
+
"""
985
+
986
+
# Either project_pattern or project_path_pattern is set in a recipe
987
+
# TableauConfig.projects_backward_compatibility ensures that at least one of these properties is configured.
0 commit comments