fdc-shared-kernel 0.0.80__tar.gz → 0.0.83__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.
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/PKG-INFO +1 -1
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/fdc_shared_kernel.egg-info/PKG-INFO +1 -1
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/fdc_shared_kernel.egg-info/SOURCES.txt +15 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/pyproject.toml +1 -1
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/auth/token_handler.py +4 -3
- fdc_shared_kernel-0.0.83/shared_kernel/auth/workbook_permission_handler.py +92 -0
- fdc_shared_kernel-0.0.83/shared_kernel/datatype_mappings/connectors_to_system/__init__.py +1 -0
- fdc_shared_kernel-0.0.83/shared_kernel/datatype_mappings/connectors_to_system/csv.py +1 -0
- fdc_shared_kernel-0.0.83/shared_kernel/datatype_mappings/connectors_to_system/db2.py +1 -0
- fdc_shared_kernel-0.0.83/shared_kernel/datatype_mappings/connectors_to_system/jira.py +1 -0
- fdc_shared_kernel-0.0.83/shared_kernel/datatype_mappings/connectors_to_system/mssql.py +1 -0
- fdc_shared_kernel-0.0.83/shared_kernel/datatype_mappings/connectors_to_system/mysql.py +1 -0
- fdc_shared_kernel-0.0.83/shared_kernel/datatype_mappings/connectors_to_system/oracle.py +1 -0
- fdc_shared_kernel-0.0.83/shared_kernel/datatype_mappings/connectors_to_system/postgres.py +16 -0
- fdc_shared_kernel-0.0.83/shared_kernel/datatype_mappings/connectors_to_system/redshift.py +14 -0
- fdc_shared_kernel-0.0.83/shared_kernel/datatype_mappings/connectors_to_system/salesforce.py +1 -0
- fdc_shared_kernel-0.0.83/shared_kernel/datatype_mappings/system_to_warehouse/__init__.py +1 -0
- fdc_shared_kernel-0.0.83/shared_kernel/datatype_mappings/system_to_warehouse/postgres.py +28 -0
- fdc_shared_kernel-0.0.83/shared_kernel/datatype_mappings/system_to_warehouse/redshift.py +28 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/registries/service_event_registry.py +5 -0
- fdc_shared_kernel-0.0.83/shared_kernel/tests/utils/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/README.md +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/README_pypi.md +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/fdc_shared_kernel.egg-info/dependency_links.txt +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/fdc_shared_kernel.egg-info/requires.txt +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/fdc_shared_kernel.egg-info/top_level.txt +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/requirements.txt +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/setup.cfg +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/async_task_executor/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/async_task_executor/async_task_executor.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/auth/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/auth/jwt_helper.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/config/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/database/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80/shared_kernel/models → fdc_shared_kernel-0.0.83/shared_kernel/datatype_mappings}/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/enums/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/enums/async_task_executor.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/enums/status_tracker.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/event_executor/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/event_executor/event_executor.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/event_executor/utils.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/exceptions/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/exceptions/configuration_exceptions.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/exceptions/custom_exceptions.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/exceptions/data_validation_exceptions.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/exceptions/http_exceptions.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/exceptions/infrastructure_exceptions.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/exceptions/operational_exceptions.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/exceptions/security_exceptions.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/http/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/http/httpx_http_client.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/http/request_http_client.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/interfaces/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/interfaces/databus.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/interfaces/http.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/interfaces/keyvault.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/logger/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/messaging/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/messaging/aws_databus.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/messaging/http_databus.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/messaging/nats_databus.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/messaging/nats_publisher.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/messaging/nats_test.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/messaging/utils/aws_utility.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/messaging/utils/event_messages.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/metrics/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/metrics/status_tracker.py +0 -0
- {fdc_shared_kernel-0.0.80/shared_kernel/tests → fdc_shared_kernel-0.0.83/shared_kernel/models}/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/registries/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/security/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/security/key_vault/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/security/key_vault/aws_secret_manager.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/security/key_vault/azure_keyvault.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/status_tracker/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/status_tracker/status_tracker.py +0 -0
- {fdc_shared_kernel-0.0.80/shared_kernel/tests/config → fdc_shared_kernel-0.0.83/shared_kernel/tests}/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80/shared_kernel/tests/logger → fdc_shared_kernel-0.0.83/shared_kernel/tests/config}/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/tests/config/test_config.py +0 -0
- {fdc_shared_kernel-0.0.80/shared_kernel/tests/messaging → fdc_shared_kernel-0.0.83/shared_kernel/tests/logger}/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/tests/logger/test_logger.py +0 -0
- {fdc_shared_kernel-0.0.80/shared_kernel/tests/utils → fdc_shared_kernel-0.0.83/shared_kernel/tests/messaging}/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/tests/messaging/test_aws_databus.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/tests/messaging/test_event_executor.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/tests/messaging/test_nats_interface.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/tests/utils/test_data_validators.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/tests/utils/test_date_format_utils.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/tests/utils/test_string_utils.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/utils/__init__.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/utils/data_validators_utils.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/utils/date_format_utils.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/utils/string_utils.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/utils/template_renderer.py +0 -0
- {fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/utils/thread_local_util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: fdc_shared_kernel
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.83
|
|
4
4
|
Summary: Shared library for microservice
|
|
5
5
|
Author-email: Shikhil S <shikhil.s@dbizsolution.com>, Ahammed Akdham N <ahammedakdham.n@dbizsolution.com>
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: fdc_shared_kernel
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.83
|
|
4
4
|
Summary: Shared library for microservice
|
|
5
5
|
Author-email: Shikhil S <shikhil.s@dbizsolution.com>, Ahammed Akdham N <ahammedakdham.n@dbizsolution.com>
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/fdc_shared_kernel.egg-info/SOURCES.txt
RENAMED
|
@@ -13,8 +13,23 @@ shared_kernel/async_task_executor/async_task_executor.py
|
|
|
13
13
|
shared_kernel/auth/__init__.py
|
|
14
14
|
shared_kernel/auth/jwt_helper.py
|
|
15
15
|
shared_kernel/auth/token_handler.py
|
|
16
|
+
shared_kernel/auth/workbook_permission_handler.py
|
|
16
17
|
shared_kernel/config/__init__.py
|
|
17
18
|
shared_kernel/database/__init__.py
|
|
19
|
+
shared_kernel/datatype_mappings/__init__.py
|
|
20
|
+
shared_kernel/datatype_mappings/connectors_to_system/__init__.py
|
|
21
|
+
shared_kernel/datatype_mappings/connectors_to_system/csv.py
|
|
22
|
+
shared_kernel/datatype_mappings/connectors_to_system/db2.py
|
|
23
|
+
shared_kernel/datatype_mappings/connectors_to_system/jira.py
|
|
24
|
+
shared_kernel/datatype_mappings/connectors_to_system/mssql.py
|
|
25
|
+
shared_kernel/datatype_mappings/connectors_to_system/mysql.py
|
|
26
|
+
shared_kernel/datatype_mappings/connectors_to_system/oracle.py
|
|
27
|
+
shared_kernel/datatype_mappings/connectors_to_system/postgres.py
|
|
28
|
+
shared_kernel/datatype_mappings/connectors_to_system/redshift.py
|
|
29
|
+
shared_kernel/datatype_mappings/connectors_to_system/salesforce.py
|
|
30
|
+
shared_kernel/datatype_mappings/system_to_warehouse/__init__.py
|
|
31
|
+
shared_kernel/datatype_mappings/system_to_warehouse/postgres.py
|
|
32
|
+
shared_kernel/datatype_mappings/system_to_warehouse/redshift.py
|
|
18
33
|
shared_kernel/enums/__init__.py
|
|
19
34
|
shared_kernel/enums/async_task_executor.py
|
|
20
35
|
shared_kernel/enums/status_tracker.py
|
|
@@ -19,15 +19,16 @@ def token_required(f):
|
|
|
19
19
|
|
|
20
20
|
token = request.authorization.token
|
|
21
21
|
|
|
22
|
-
payload = token_handler.decode_token(token)
|
|
22
|
+
payload: dict = token_handler.decode_token(token)
|
|
23
23
|
|
|
24
24
|
if 'error' in payload:
|
|
25
25
|
raise Unauthorized("Failed to parse token")
|
|
26
26
|
|
|
27
27
|
# Add user information to the request context
|
|
28
28
|
current_user = {
|
|
29
|
-
"user_id": payload
|
|
30
|
-
"organization_id": payload
|
|
29
|
+
"user_id": payload.get('user_id'),
|
|
30
|
+
"organization_id": payload.get('organization_id'),
|
|
31
|
+
"organization_license_type": payload.get('organization_license_type'),
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
# ensure_sync is used to ensure that the decorated function is
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
from functools import wraps
|
|
2
|
+
from flask import request, current_app
|
|
3
|
+
import requests
|
|
4
|
+
from shared_kernel.auth import JWTTokenHandler
|
|
5
|
+
from shared_kernel.config import Config
|
|
6
|
+
from shared_kernel.exceptions import Unauthorized, NotFound
|
|
7
|
+
from shared_kernel.interfaces.databus import DataBus
|
|
8
|
+
from shared_kernel.messaging import DataBusFactory
|
|
9
|
+
from shared_kernel.registries.service_event_registry import ServiceEventRegistry
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
config = Config()
|
|
13
|
+
token_handler = JWTTokenHandler(config.get("JWT_SECRET_KEY"))
|
|
14
|
+
service_event_registry = ServiceEventRegistry()
|
|
15
|
+
databus: DataBus = DataBusFactory.create_data_bus(bus_type="HTTP", config={})
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def get_workbook_share_meta(workbook_id):
|
|
19
|
+
try:
|
|
20
|
+
event = {
|
|
21
|
+
"event_name": "GET_WORKBOOK_SHARE_META",
|
|
22
|
+
"event_payload": {"workbook_id": workbook_id},
|
|
23
|
+
}
|
|
24
|
+
response = databus.request_event(
|
|
25
|
+
getattr(service_event_registry, "GET_WORKBOOK_SHARE_META"), event
|
|
26
|
+
)
|
|
27
|
+
return response.get("data")
|
|
28
|
+
|
|
29
|
+
except requests.RequestException as e:
|
|
30
|
+
current_app.logger.error(f"Error fetching workbook: {e}")
|
|
31
|
+
return None
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def check_user_in_org(user, organization_id):
|
|
35
|
+
return user["organization_id"] == organization_id
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def has_workbook_share(user_id, shared_users):
|
|
39
|
+
return user_id in shared_users
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# Decorator to protect routes based on workbook permissions
|
|
43
|
+
def workbook_permission_required(f):
|
|
44
|
+
@wraps(f)
|
|
45
|
+
def decorator(*args, **kwargs):
|
|
46
|
+
workbook_id = kwargs.get("workbook_id")
|
|
47
|
+
# Fetch the workbook share data from the master service
|
|
48
|
+
workbook_share_data = get_workbook_share_meta(workbook_id)
|
|
49
|
+
if not workbook_share_data:
|
|
50
|
+
raise NotFound("Workbook not found.")
|
|
51
|
+
|
|
52
|
+
# Public Access: No token required for public workbooks
|
|
53
|
+
if workbook_share_data.get("is_public"):
|
|
54
|
+
return current_app.ensure_sync(f)(None, *args, **kwargs)
|
|
55
|
+
|
|
56
|
+
# Non-public requests need token verification
|
|
57
|
+
token = None
|
|
58
|
+
if not request.authorization:
|
|
59
|
+
raise Unauthorized("Token is missing!")
|
|
60
|
+
|
|
61
|
+
token = request.authorization.token
|
|
62
|
+
payload = token_handler.decode_token(token)
|
|
63
|
+
|
|
64
|
+
if "error" in payload:
|
|
65
|
+
raise Unauthorized("Failed to parse token")
|
|
66
|
+
|
|
67
|
+
# Add user information to the request context
|
|
68
|
+
current_user = {
|
|
69
|
+
"user_id": payload["user_id"],
|
|
70
|
+
"organization_id": payload["organization_id"],
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
# Owner Access
|
|
74
|
+
if current_user["user_id"] == workbook_share_data.get("created_by"):
|
|
75
|
+
return current_app.ensure_sync(f)(current_user, *args, **kwargs)
|
|
76
|
+
|
|
77
|
+
# Organization Access
|
|
78
|
+
if workbook_share_data.get("shared_with_org") and check_user_in_org(
|
|
79
|
+
current_user, workbook_share_data["organization_id"]
|
|
80
|
+
):
|
|
81
|
+
return current_app.ensure_sync(f)(current_user, *args, **kwargs)
|
|
82
|
+
|
|
83
|
+
# Specific User Access
|
|
84
|
+
if has_workbook_share(
|
|
85
|
+
current_user["user_id"], workbook_share_data["shared_users"]
|
|
86
|
+
):
|
|
87
|
+
return current_app.ensure_sync(f)(current_user, *args, **kwargs)
|
|
88
|
+
|
|
89
|
+
# If none of the conditions are met, deny access
|
|
90
|
+
raise Unauthorized("You don't have permission to access this workbook.")
|
|
91
|
+
|
|
92
|
+
return decorator
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from shared_kernel.datatype_mappings.connectors_to_system.redshift import redshift_to_system
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
csv_to_system = {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
db2_to_system = {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
jira_to_system = {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
mssql_to_system = {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
mysql_to_system = {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
oracle_to_system = {}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
postgres_to_system = {
|
|
2
|
+
"INTEGER": "integer",
|
|
3
|
+
"REAL": "real",
|
|
4
|
+
"NUMERIC": "numeric",
|
|
5
|
+
"DOUBLE PRECISION": "double",
|
|
6
|
+
"BOOLEAN": "boolean",
|
|
7
|
+
"BYTEA": "binary",
|
|
8
|
+
"BIT": "bit",
|
|
9
|
+
"TEXT": "string",
|
|
10
|
+
"VARCHAR": "varchar",
|
|
11
|
+
"CHAR": "character",
|
|
12
|
+
"DATE": "date",
|
|
13
|
+
"TIMESTAMP": "datetime",
|
|
14
|
+
"TIME": "time",
|
|
15
|
+
"NULL": "null"
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
redshift_to_system = {
|
|
2
|
+
"BIGINT": "integer",
|
|
3
|
+
"INTEGER": "integer",
|
|
4
|
+
"REAL": "real",
|
|
5
|
+
"DECIMAL": "numeric",
|
|
6
|
+
"DOUBLE PRECISION": "double",
|
|
7
|
+
"BOOLEAN": "boolean",
|
|
8
|
+
"VARBYTE": "binary",
|
|
9
|
+
"VARCHAR": "string",
|
|
10
|
+
"CHARACTER VARYING": "string",
|
|
11
|
+
"DATE": "date",
|
|
12
|
+
"TIMESTAMPTZ": "datetime",
|
|
13
|
+
"NULL": "null"
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
salesforce_to_system = {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from shared_kernel.datatype_mappings.system_to_warehouse.redshift import system_to_redshift
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
system_to_postgres = {
|
|
2
|
+
"integer": "INTEGER",
|
|
3
|
+
"int": "INTEGER",
|
|
4
|
+
"real": "REAL",
|
|
5
|
+
"bigint": "BIGINT",
|
|
6
|
+
"long": "BIGINT",
|
|
7
|
+
"numeric": "NUMERIC",
|
|
8
|
+
"number": "NUMERIC",
|
|
9
|
+
"decimal": "NUMERIC",
|
|
10
|
+
"double": "DOUBLE PRECISION",
|
|
11
|
+
"boolean": "BOOLEAN",
|
|
12
|
+
"binary": "BYTEA",
|
|
13
|
+
"bit": "BIT",
|
|
14
|
+
"id": "TEXT",
|
|
15
|
+
"reference": "TEXT",
|
|
16
|
+
"string": "TEXT",
|
|
17
|
+
"text": "TEXT",
|
|
18
|
+
"picklist": "TEXT",
|
|
19
|
+
"character varying": "VARCHAR",
|
|
20
|
+
"character": "CHAR",
|
|
21
|
+
"varchar": "VARCHAR",
|
|
22
|
+
"date": "DATE",
|
|
23
|
+
"timestamp": "TIMESTAMP",
|
|
24
|
+
"datetime": "TIMESTAMP",
|
|
25
|
+
"time": "TIME",
|
|
26
|
+
"none": "NULL",
|
|
27
|
+
"null": "NULL"
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
system_to_redshift = {
|
|
2
|
+
"integer": "BIGINT",
|
|
3
|
+
"int": "BIGINT",
|
|
4
|
+
"real": "REAL",
|
|
5
|
+
"bigint": "BIGINT",
|
|
6
|
+
"long": "BIGINT",
|
|
7
|
+
"numeric": "DECIMAL",
|
|
8
|
+
"number": "DECIMAL",
|
|
9
|
+
"decimal": "DECIMAL",
|
|
10
|
+
"double": "DOUBLE PRECISION",
|
|
11
|
+
"boolean": "BOOLEAN",
|
|
12
|
+
"binary": "VARBYTE",
|
|
13
|
+
"bit": "BOOLEAN",
|
|
14
|
+
"id": "VARCHAR",
|
|
15
|
+
"reference": "VARCHAR(255)",
|
|
16
|
+
"string": "VARCHAR(65535)",
|
|
17
|
+
"text": "VARCHAR(65535)",
|
|
18
|
+
"picklist": "VARCHAR(255)",
|
|
19
|
+
"character varying": "VARCHAR(65535)",
|
|
20
|
+
"character": "VARCHAR(65535)",
|
|
21
|
+
"varchar": "VARCHAR(65535)",
|
|
22
|
+
"date": "DATE",
|
|
23
|
+
"timestamp": "TIMESTAMPTZ",
|
|
24
|
+
"datetime": "TIMESTAMPTZ",
|
|
25
|
+
"time": "VARCHAR(255)",
|
|
26
|
+
"none": "NULL",
|
|
27
|
+
"null": "NULL"
|
|
28
|
+
}
|
|
@@ -39,3 +39,8 @@ class ServiceEventRegistry:
|
|
|
39
39
|
config.get("MASTER_SERVICE_BASE_ENDPOINT")
|
|
40
40
|
+ "/event/subscribe-sync-event/SET_TRACKING_ID/"
|
|
41
41
|
)
|
|
42
|
+
|
|
43
|
+
GET_WORKBOOK_SHARE_META = (
|
|
44
|
+
config.get("MASTER_SERVICE_BASE_ENDPOINT")
|
|
45
|
+
+ "/event/subscribe-sync-event/GET_WORKBOOK_SHARE_META/"
|
|
46
|
+
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/fdc_shared_kernel.egg-info/requires.txt
RENAMED
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/fdc_shared_kernel.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/async_task_executor/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/enums/async_task_executor.py
RENAMED
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/event_executor/__init__.py
RENAMED
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/event_executor/event_executor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/exceptions/custom_exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/exceptions/http_exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/http/httpx_http_client.py
RENAMED
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/http/request_http_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/messaging/aws_databus.py
RENAMED
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/messaging/http_databus.py
RENAMED
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/messaging/nats_databus.py
RENAMED
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/messaging/nats_publisher.py
RENAMED
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/messaging/utils/aws_utility.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/metrics/status_tracker.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/security/key_vault/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/status_tracker/__init__.py
RENAMED
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/status_tracker/status_tracker.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/tests/config/test_config.py
RENAMED
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/tests/logger/test_logger.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/tests/utils/test_string_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/utils/data_validators_utils.py
RENAMED
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/utils/date_format_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/utils/template_renderer.py
RENAMED
|
File without changes
|
{fdc_shared_kernel-0.0.80 → fdc_shared_kernel-0.0.83}/shared_kernel/utils/thread_local_util.py
RENAMED
|
File without changes
|