fdc-shared-kernel 0.0.195__tar.gz → 0.0.197__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 (200) hide show
  1. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/PKG-INFO +1 -1
  2. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/fdc_shared_kernel.egg-info/PKG-INFO +1 -1
  3. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/pyproject.toml +1 -1
  4. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/connections/databricks_warehouse_connection.py +6 -6
  5. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/connections/fabric_sql_warehouse_connection.py +29 -12
  6. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/connections/jdbc_warehouse_connection.py +15 -19
  7. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/connections/mssql_warehouse_connection.py +29 -11
  8. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/connections/mysql_warehouse_connection.py +16 -13
  9. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/connections/postgresql_warehouse_connection.py +17 -14
  10. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/connections/redshift_warehouse_connection.py +14 -16
  11. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/connections/snowflake_warehouse_connection.py +6 -6
  12. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/utils.py +11 -1
  13. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/README.md +0 -0
  14. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/README_pypi.md +0 -0
  15. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/fdc_shared_kernel.egg-info/SOURCES.txt +0 -0
  16. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/fdc_shared_kernel.egg-info/dependency_links.txt +0 -0
  17. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/fdc_shared_kernel.egg-info/requires.txt +0 -0
  18. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/fdc_shared_kernel.egg-info/top_level.txt +0 -0
  19. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/requirements.txt +0 -0
  20. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/setup.cfg +0 -0
  21. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/__init__.py +0 -0
  22. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/agent_communication_channel/__init__.py +0 -0
  23. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/agent_communication_channel/agent_channel.py +0 -0
  24. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/agent_communication_channel/contexts.py +0 -0
  25. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/agent_communication_channel/event_channel.py +0 -0
  26. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/ai_audit_log/__init__.py +0 -0
  27. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/ai_chat_persistence/__init__.py +0 -0
  28. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/ai_chat_persistence/chat_persistence.py +0 -0
  29. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/async_task_executor/__init__.py +0 -0
  30. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/async_task_executor/async_task_executor.py +0 -0
  31. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/auth/__init__.py +0 -0
  32. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/auth/jwt_helper.py +0 -0
  33. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/auth/token_handler.py +0 -0
  34. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/auth/workbook_permission_handler.py +0 -0
  35. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/batch_job/__init__.py +0 -0
  36. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/batch_job/batch_job_status_tracker/container_job_status_tracker.py +0 -0
  37. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/batch_job/job_handlers/__init__.py +0 -0
  38. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/batch_job/job_handlers/aws_batch_job_handler.py +0 -0
  39. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/batch_job/job_handlers/azure_apps_job_handler.py +0 -0
  40. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/batch_job/job_handlers/job_handler_factory.py +0 -0
  41. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/batch_job/job_handlers/job_status_mapper.py +0 -0
  42. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/batch_job/job_storage_managers/__init__.py +0 -0
  43. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/batch_job/job_storage_managers/azure_blob_storage_manager.py +0 -0
  44. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/batch_job/job_storage_managers/job_storage_manager_factory.py +0 -0
  45. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/batch_job/job_storage_managers/s3_job_storage_manager.py +0 -0
  46. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/config/__init__.py +0 -0
  47. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/constants/constants.py +0 -0
  48. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/__init__.py +0 -0
  49. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/base_executor.py +0 -0
  50. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/custom_query_builders/databricks_query.py +0 -0
  51. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/databricks_handler.py +0 -0
  52. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/fabric_sql_handler.py +0 -0
  53. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/factory.py +0 -0
  54. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/jdbc_driver_registry.py +0 -0
  55. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/jdbc_handler.py +0 -0
  56. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/mssql_handler.py +0 -0
  57. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/mysql_handler.py +0 -0
  58. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/odbc_handler.py +0 -0
  59. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/postgresql_handler.py +0 -0
  60. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/query_executors/databricks_query_executor.py +0 -0
  61. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/query_executors/fabric_sql_query_executor.py +0 -0
  62. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/query_executors/jdbc_query_executor.py +0 -0
  63. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/query_executors/mssql_query_executor.py +0 -0
  64. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/query_executors/mysql_query_executor.py +0 -0
  65. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/query_executors/postgresql_query_executor.py +0 -0
  66. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/query_executors/redshift_query_executor.py +0 -0
  67. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/query_executors/snowflake_query_executor.py +0 -0
  68. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/redshift_handler.py +0 -0
  69. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/snowflake_handler.py +0 -0
  70. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/warehouse_handlers_map.py +0 -0
  71. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/database/__init__.py +0 -0
  72. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/dataclasses/__init__.py +0 -0
  73. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/dataclasses/aws_batch_job_context.py +0 -0
  74. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/dataclasses/azure_container_app_job_context.py +0 -0
  75. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/dataclasses/event_executor.py +0 -0
  76. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/dataclasses/job_context.py +0 -0
  77. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/dataclasses/job_record_dataclasses.py +0 -0
  78. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/dataclasses/warehouse_configs.py +0 -0
  79. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/__init__.py +0 -0
  80. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/__init__.py +0 -0
  81. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/csv.py +0 -0
  82. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/databricks.py +0 -0
  83. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/db2.py +0 -0
  84. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/jdbc.py +0 -0
  85. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/jira.py +0 -0
  86. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/mssql.py +0 -0
  87. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/mysql.py +0 -0
  88. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/oracle.py +0 -0
  89. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/postgres.py +0 -0
  90. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/redshift.py +0 -0
  91. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/salesforce.py +0 -0
  92. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/snowflake.py +0 -0
  93. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/sqlalchemy.py +0 -0
  94. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/system_to_warehouse/__init__.py +0 -0
  95. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/system_to_warehouse/postgres.py +0 -0
  96. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/system_to_warehouse/redshift.py +0 -0
  97. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/enums/__init__.py +0 -0
  98. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/enums/async_task_executor.py +0 -0
  99. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/enums/connection_engine.py +0 -0
  100. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/enums/status_tracker.py +0 -0
  101. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/event_executor/__init__.py +0 -0
  102. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/event_executor/event_executor.py +0 -0
  103. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/event_executor/job_executor.py +0 -0
  104. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/event_executor/utils.py +0 -0
  105. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/__init__.py +0 -0
  106. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/batch_job_exceptions.py +0 -0
  107. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/configuration_exceptions.py +0 -0
  108. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/custom_exceptions.py +0 -0
  109. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/data_validation_exceptions.py +0 -0
  110. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/http_exceptions.py +0 -0
  111. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/infrastructure_exceptions.py +0 -0
  112. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/operational_exceptions.py +0 -0
  113. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/security_exceptions.py +0 -0
  114. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/user_intervention_exception.py +0 -0
  115. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/http/__init__.py +0 -0
  116. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/http/httpx_http_client.py +0 -0
  117. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/http/request_http_client.py +0 -0
  118. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/__init__.py +0 -0
  119. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/base_job_handler.py +0 -0
  120. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/data_warehouse_handler.py +0 -0
  121. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/databus.py +0 -0
  122. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/encryption.py +0 -0
  123. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/http.py +0 -0
  124. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/keyvault.py +0 -0
  125. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/query_executor.py +0 -0
  126. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/storage_manager.py +0 -0
  127. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/warehouse_connection.py +0 -0
  128. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/logger/__init__.py +0 -0
  129. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/__init__.py +0 -0
  130. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/aws_databus.py +0 -0
  131. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/azure_databus.py +0 -0
  132. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/http_databus.py +0 -0
  133. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/nats_databus.py +0 -0
  134. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/nats_publisher.py +0 -0
  135. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/nats_test.py +0 -0
  136. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/utils/aws_utility.py +0 -0
  137. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/utils/azure_utility.py +0 -0
  138. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/utils/event_messages.py +0 -0
  139. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/metrics/__init__.py +0 -0
  140. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/metrics/status_tracker.py +0 -0
  141. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/models/__init__.py +0 -0
  142. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/registries/__init__.py +0 -0
  143. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/registries/schema_onboarding_event_registry.py +0 -0
  144. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/registries/service_event_registry.py +0 -0
  145. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/__init__.py +0 -0
  146. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/base_tracker.py +0 -0
  147. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/enums.py +0 -0
  148. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/exceptions.py +0 -0
  149. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/run_manager.py +0 -0
  150. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/schema_onboarding_tracker.py +0 -0
  151. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/shared_helpers.py +0 -0
  152. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/task_determination.py +0 -0
  153. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/task_helpers.py +0 -0
  154. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/task_manager.py +0 -0
  155. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/template_manager.py +0 -0
  156. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/utility_manager.py +0 -0
  157. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/security/__init__.py +0 -0
  158. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/security/encryption/__init__.py +0 -0
  159. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/security/encryption/manager.py +0 -0
  160. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/security/encryption/providers.py +0 -0
  161. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/security/key_vault/__init__.py +0 -0
  162. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/security/key_vault/aws_secret_manager.py +0 -0
  163. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/security/key_vault/azure_keyvault.py +0 -0
  164. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/status_tracker/__init__.py +0 -0
  165. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/status_tracker/status_tracker.py +0 -0
  166. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/storage_handlers/__init__.py +0 -0
  167. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/storage_handlers/blob_file_handler.py +0 -0
  168. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/storage_handlers/s3_storage_handler.py +0 -0
  169. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/__init__.py +0 -0
  170. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/config/__init__.py +0 -0
  171. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/config/test_config.py +0 -0
  172. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/logger/__init__.py +0 -0
  173. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/logger/test_logger.py +0 -0
  174. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/messaging/__init__.py +0 -0
  175. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/messaging/test_aws_databus.py +0 -0
  176. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/messaging/test_event_executor.py +0 -0
  177. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/messaging/test_nats_interface.py +0 -0
  178. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/security/test_encryption.py +0 -0
  179. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/utils/__init__.py +0 -0
  180. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/utils/test_data_validators.py +0 -0
  181. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/utils/test_date_format_utils.py +0 -0
  182. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/utils/test_string_utils.py +0 -0
  183. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/traceability/__init__.py +0 -0
  184. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/traceability/traceability_handler.py +0 -0
  185. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/__init__.py +0 -0
  186. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/data_validators_utils.py +0 -0
  187. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/date_format_utils.py +0 -0
  188. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/date_utils.py +0 -0
  189. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/logging_utils.py +0 -0
  190. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/request_id.py +0 -0
  191. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/string_utils.py +0 -0
  192. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/template_renderer.py +0 -0
  193. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/thread_debug_utils.py +0 -0
  194. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/thread_local_storage.py +0 -0
  195. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/thread_log_traker.py +0 -0
  196. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/tests/__init__.py +0 -0
  197. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/tests/messaging/__init__.py +0 -0
  198. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/tests/messaging/utils/__init__.py +0 -0
  199. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/tests/messaging/utils/test_aws_utility.py +0 -0
  200. {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/tests/test_job_executor.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fdc_shared_kernel
3
- Version: 0.0.195
3
+ Version: 0.0.197
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.4
2
2
  Name: fdc_shared_kernel
3
- Version: 0.0.195
3
+ Version: 0.0.197
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "fdc_shared_kernel"
7
- version = "0.0.195"
7
+ version = "0.0.197"
8
8
  requires-python = ">=3.7"
9
9
  readme = "README_pypi.md"
10
10
  description = "Shared library for microservice"
@@ -6,7 +6,7 @@ from databricks import sql
6
6
  from databricks.sql.exc import InterfaceError, OperationalError, ProgrammingError
7
7
 
8
8
  from shared_kernel.dataclasses.warehouse_configs import DatabricksConfig
9
- from shared_kernel.exceptions.http_exceptions import BadRequest
9
+ from shared_kernel.exceptions.http_exceptions import BadRequest, Unauthorized
10
10
  from shared_kernel.interfaces.warehouse_connection import DataWarehouseConnection, cancel_check_connection
11
11
  from shared_kernel.logger import Logger
12
12
  from shared_kernel.config import Config
@@ -134,17 +134,17 @@ class DatabricksWarehouseConnection(DataWarehouseConnection):
134
134
  raise Exception("Databricks connection validation failed.")
135
135
 
136
136
  def test_connection(self) -> bool:
137
- """Verify the connection is reachable."""
137
+ """Verify the connection is reachable. Raises Unauthorized/BadRequest on failure."""
138
138
  try:
139
139
  self._create_connection()
140
140
  self.close_connection()
141
141
  return True
142
142
  except OperationalError as e:
143
143
  if "invalid access token" in str(e).lower() or "authentication" in str(e).lower():
144
- raise ValueError("Invalid access token")
145
- raise ConnectionError(f"Database error: {str(e)}")
144
+ raise Unauthorized("Invalid access token") from e
145
+ raise BadRequest(f"Databricks connection test failed: {str(e)}") from e
146
146
  except InterfaceError as e:
147
- raise ConnectionError(f"Cannot connect to database server: {str(e)}")
147
+ raise BadRequest(f"Cannot connect to database server: {str(e)}") from e
148
148
  except Exception as e:
149
- raise ConnectionError(f"Connection failed: {str(e)}")
149
+ raise BadRequest(f"Databricks connection test failed: {str(e)}") from e
150
150
 
@@ -13,7 +13,7 @@ from sqlalchemy.engine import Engine
13
13
  from sqlalchemy.exc import InterfaceError, OperationalError, ProgrammingError
14
14
 
15
15
  from shared_kernel.dataclasses.warehouse_configs import FabricSQLConfig
16
- from shared_kernel.exceptions.http_exceptions import BadRequest
16
+ from shared_kernel.exceptions.http_exceptions import BadRequest, Unauthorized
17
17
  from shared_kernel.interfaces.warehouse_connection import DataWarehouseConnection, cancel_check_connection
18
18
  from shared_kernel.data_warehouse_handlers.utils import extract_sql_server_error_message
19
19
  from shared_kernel.logger import Logger
@@ -85,12 +85,13 @@ class FabricSQLWarehouseConnection(DataWarehouseConnection):
85
85
  from sqlalchemy import event
86
86
 
87
87
  connection_string = self._get_fabric_connection_params(cfg)
88
+ pool_size = int(Config.get("FABRIC_SQL_POOL_SIZE", 15))
88
89
 
89
90
  engine = create_engine(
90
91
  connection_string,
91
- pool_size=50,
92
+ pool_size=pool_size,
92
93
  max_overflow=5,
93
- pool_timeout=120,
94
+ pool_timeout=300,
94
95
  pool_recycle=1800,
95
96
  pool_pre_ping=True,
96
97
  )
@@ -224,7 +225,7 @@ class FabricSQLWarehouseConnection(DataWarehouseConnection):
224
225
  conn.close()
225
226
 
226
227
  raise BadRequest(
227
- f"Failed to connect to Fabric SQL after {retries} attempts"
228
+ f"Failed to connect to Fabric SQL after {retries} attempts: {extract_sql_server_error_message(str(last_exception))}"
228
229
  ) from last_exception
229
230
 
230
231
  def close_connection(self):
@@ -240,14 +241,30 @@ class FabricSQLWarehouseConnection(DataWarehouseConnection):
240
241
  return True
241
242
 
242
243
  def test_connection(self) -> bool:
243
- """Verify the connection is reachable. Raises on failure."""
244
+ """Verify the connection is reachable. Raises Unauthorized/BadRequest on failure."""
244
245
  try:
245
- with self.get_connection() as conn:
246
+ with self.get_connection(retries=1) as conn:
246
247
  conn.execute(text("SELECT 1"))
247
248
  return True
248
- except OperationalError as e:
249
- if "authentication failed" in str(e).lower():
250
- raise ValueError("Invalid username or password")
251
- raise ConnectionError(f"Database error: {str(e)}")
252
- except InterfaceError:
253
- raise ConnectionError("Cannot connect to database server")
249
+ except Exception as e:
250
+ error_msg = str(e)
251
+ error_message = extract_sql_server_error_message(error_msg)
252
+ if (
253
+ "failed to open the explicitly specified database" in error_msg.lower()
254
+ or "cannot open database" in error_msg.lower()
255
+ or "could not be opened" in error_msg.lower()
256
+ or "database was not found" in error_msg.lower()
257
+ ):
258
+ raise BadRequest("Database does not exist. Please check the database name.") from e
259
+ if "28000" in error_msg or "login error" in error_message.lower() or "login failed" in error_msg.lower():
260
+ raise Unauthorized("Authentication failed. Please check your username and password.") from e
261
+ if "HYT00" in error_msg or "login timeout" in error_message.lower():
262
+ raise BadRequest("Connection timed out. Please check the host and port.") from e
263
+ if (
264
+ "could not open a connection" in error_msg.lower()
265
+ or "connection refused" in error_msg.lower()
266
+ or "42000" in error_msg
267
+ or "08S01" in error_msg
268
+ ):
269
+ raise BadRequest("Connection refused. Please check the host and port.") from e
270
+ raise BadRequest(f"Fabric SQL connection test failed: {error_message}") from e
@@ -8,7 +8,7 @@ from contextlib import contextmanager
8
8
  from typing import Dict, Any, Optional
9
9
 
10
10
  from shared_kernel.dataclasses.warehouse_configs import JDBCConfig
11
- from shared_kernel.exceptions.http_exceptions import BadRequest
11
+ from shared_kernel.exceptions.http_exceptions import BadRequest, Unauthorized
12
12
  from shared_kernel.interfaces.warehouse_connection import DataWarehouseConnection, cancel_check_connection
13
13
  from shared_kernel.logger import Logger
14
14
  from shared_kernel.config import Config
@@ -151,14 +151,11 @@ class JDBCWarehouseConnection(DataWarehouseConnection):
151
151
 
152
152
  if conn is None:
153
153
  error_message = self._extract_jdbc_error_message(str(last_exception))
154
- if error_message in [
155
- "Invalid host name or address",
156
- "Database not found or unauthorized",
157
- "Provided username is not valid",
158
- "Provided password is not valid"
159
- ]:
160
- raise ValueError(error_message)
161
- raise BadRequest(f"Failed to connect to JDBC after {retries} attempts: {error_message}")
154
+ if error_message in ["Provided username is not valid", "Provided password is not valid"]:
155
+ raise Unauthorized(error_message) from last_exception
156
+ if error_message in ["Invalid host name or address", "Database not found or unauthorized"]:
157
+ raise BadRequest(error_message) from last_exception
158
+ raise BadRequest(f"Failed to connect to JDBC after {retries} attempts: {error_message}") from last_exception
162
159
 
163
160
  try:
164
161
  yield conn
@@ -181,9 +178,9 @@ class JDBCWarehouseConnection(DataWarehouseConnection):
181
178
  return False
182
179
 
183
180
  def test_connection(self) -> bool:
184
- """Verify the connection is reachable."""
181
+ """Verify the connection is reachable. Raises Unauthorized/BadRequest on failure."""
185
182
  try:
186
- with self.get_connection() as conn:
183
+ with self.get_connection(retries=1) as conn:
187
184
  # Use a simple generic query for testing
188
185
  cursor = conn.cursor()
189
186
  # Most DBs support SELECT 1, but we might need variations
@@ -194,16 +191,15 @@ class JDBCWarehouseConnection(DataWarehouseConnection):
194
191
  pass
195
192
  cursor.close()
196
193
  return True
194
+ except (Unauthorized, BadRequest):
195
+ raise
197
196
  except Exception as e:
198
197
  error_message = self._extract_jdbc_error_message(str(e))
199
- if error_message in [
200
- "Invalid host name or address",
201
- "Database not found or unauthorized",
202
- "Provided username is not valid",
203
- "Provided password is not valid"
204
- ]:
205
- raise ValueError(error_message)
206
- raise ConnectionError(f"JDBC Connection failed: {error_message}")
198
+ if error_message in ["Provided username is not valid", "Provided password is not valid"]:
199
+ raise Unauthorized(error_message) from e
200
+ if error_message in ["Invalid host name or address", "Database not found or unauthorized"]:
201
+ raise BadRequest(error_message) from e
202
+ raise BadRequest(f"JDBC connection test failed: {error_message}") from e
207
203
 
208
204
  @staticmethod
209
205
  def _extract_jdbc_error_message(error_str: str) -> str:
@@ -11,7 +11,7 @@ from sqlalchemy.engine import Engine
11
11
  from sqlalchemy.exc import InterfaceError, OperationalError, ProgrammingError
12
12
 
13
13
  from shared_kernel.dataclasses.warehouse_configs import MSSQLConfig
14
- from shared_kernel.exceptions.http_exceptions import BadRequest
14
+ from shared_kernel.exceptions.http_exceptions import BadRequest, Unauthorized
15
15
  from shared_kernel.interfaces.warehouse_connection import DataWarehouseConnection, cancel_check_connection
16
16
  from shared_kernel.constants.constants import get_constant
17
17
  from shared_kernel.data_warehouse_handlers.utils import extract_sql_server_error_message
@@ -62,10 +62,12 @@ class MSSQLWarehouseConnection(DataWarehouseConnection):
62
62
  )
63
63
  connect_args = {}
64
64
 
65
+ pool_size = int(Config.get("MSSQL_POOL_SIZE", 10))
66
+
65
67
  self._engines[key] = create_engine(
66
68
  connection_string,
67
69
  connect_args=connect_args,
68
- pool_size=10,
70
+ pool_size=pool_size,
69
71
  max_overflow=5,
70
72
  pool_timeout=30,
71
73
  pool_recycle=1800,
@@ -114,7 +116,7 @@ class MSSQLWarehouseConnection(DataWarehouseConnection):
114
116
  conn.close()
115
117
 
116
118
  raise BadRequest(
117
- f"Failed to connect to MSSQL after {retries} attempts"
119
+ f"Failed to connect to MSSQL after {retries} attempts: {extract_sql_server_error_message(str(last_exception))}"
118
120
  ) from last_exception
119
121
 
120
122
  def close_connection(self):
@@ -129,14 +131,30 @@ class MSSQLWarehouseConnection(DataWarehouseConnection):
129
131
  return True
130
132
 
131
133
  def test_connection(self) -> bool:
132
- """Verify the connection is reachable. Raises on failure."""
134
+ """Verify the connection is reachable. Raises Unauthorized/BadRequest on failure."""
133
135
  try:
134
- with self.get_connection() as conn:
136
+ with self.get_connection(retries=1) as conn:
135
137
  conn.execute(text("SELECT 1"))
136
138
  return True
137
- except OperationalError as e:
138
- if "authentication failed" in str(e).lower():
139
- raise ValueError("Invalid username or password")
140
- raise ConnectionError(f"Database error: {str(e)}")
141
- except InterfaceError:
142
- raise ConnectionError("Cannot connect to database server")
139
+ except Exception as e:
140
+ error_msg = str(e)
141
+ error_message = extract_sql_server_error_message(error_msg)
142
+ if (
143
+ "failed to open the explicitly specified database" in error_msg.lower()
144
+ or "cannot open database" in error_msg.lower()
145
+ or "could not be opened" in error_msg.lower()
146
+ or "database was not found" in error_msg.lower()
147
+ ):
148
+ raise BadRequest("Database does not exist. Please check the database name.") from e
149
+ if "28000" in error_msg or "login error" in error_message.lower() or "login failed" in error_msg.lower():
150
+ raise Unauthorized("Authentication failed. Please check your username and password.") from e
151
+ if "HYT00" in error_msg or "login timeout" in error_message.lower():
152
+ raise BadRequest("Connection timed out. Please check the host and port.") from e
153
+ if (
154
+ "could not open a connection" in error_msg.lower()
155
+ or "connection refused" in error_msg.lower()
156
+ or "42000" in error_msg
157
+ or "08S01" in error_msg
158
+ ):
159
+ raise BadRequest("Connection refused. Please check the host and port.") from e
160
+ raise BadRequest(f"MSSQL connection test failed: {error_message}") from e
@@ -13,7 +13,7 @@ from sqlalchemy.exc import InterfaceError, OperationalError, ProgrammingError
13
13
 
14
14
  from shared_kernel.constants.constants import get_constant
15
15
  from shared_kernel.dataclasses.warehouse_configs import MySQLConfig
16
- from shared_kernel.exceptions.http_exceptions import BadRequest
16
+ from shared_kernel.exceptions.http_exceptions import BadRequest, Unauthorized
17
17
  from shared_kernel.interfaces.warehouse_connection import DataWarehouseConnection, cancel_check_connection
18
18
  from shared_kernel.logger import Logger
19
19
  from shared_kernel.config import Config
@@ -68,10 +68,11 @@ class MySQLWarehouseConnection(DataWarehouseConnection):
68
68
  connection_string = get_constant("mysql", "CONNECTION_STRING").format(
69
69
  cfg.username, password, cfg.host, int(cfg.port), cfg.database
70
70
  )
71
+ pool_size = int(Config.get("MYSQL_POOL_SIZE", 10))
71
72
  self._engines[key] = create_engine(
72
73
  connection_string,
73
74
  connect_args=self._CONNECT_ARGS,
74
- pool_size=10,
75
+ pool_size=pool_size,
75
76
  max_overflow=5,
76
77
  pool_timeout=30,
77
78
  pool_recycle=1800,
@@ -119,7 +120,7 @@ class MySQLWarehouseConnection(DataWarehouseConnection):
119
120
  conn.close()
120
121
 
121
122
  raise BadRequest(
122
- f"Failed to connect to MySQL after {retries} attempts"
123
+ f"Failed to connect to MySQL after {retries} attempts: {str(last_exception)}"
123
124
  ) from last_exception
124
125
 
125
126
  def close_connection(self):
@@ -134,17 +135,19 @@ class MySQLWarehouseConnection(DataWarehouseConnection):
134
135
  return True
135
136
 
136
137
  def test_connection(self) -> bool:
137
- """Verify the connection is reachable. Raises on failure."""
138
+ """Verify the connection is reachable. Raises Unauthorized/BadRequest on failure."""
138
139
  try:
139
- with self.get_connection() as conn:
140
+ with self.get_connection(retries=1) as conn:
140
141
  conn.execute(text("SELECT 1"))
141
142
  return True
142
- except OperationalError as e:
143
- if "authentication failed" in str(e).lower():
144
- raise ValueError("Invalid username or password")
145
- raise ConnectionError(f"Database error: {str(e)}")
146
- except InterfaceError:
147
- raise ConnectionError("Cannot connect to database server")
148
143
  except Exception as e:
149
- raise ConnectionError(f"Connection failed: {str(e)}")
150
-
144
+ error_msg = str(e)
145
+ if "access denied" in error_msg.lower() or "authentication failed" in error_msg.lower():
146
+ raise Unauthorized("Authentication failed. Please check your username and password.") from e
147
+ if "unknown mysql server host" in error_msg.lower() or "name or service not known" in error_msg.lower():
148
+ raise BadRequest("Host not found. Please check the host address.") from e
149
+ if "can't connect to mysql server" in error_msg.lower() or "connection refused" in error_msg.lower() or "timed out" in error_msg.lower():
150
+ raise BadRequest("Connection refused. Please check the host and port.") from e
151
+ if "unknown database" in error_msg.lower():
152
+ raise BadRequest("Database does not exist. Please check the database name.") from e
153
+ raise BadRequest(f"MySQL connection test failed: {error_msg}") from e
@@ -11,7 +11,7 @@ from sqlalchemy.engine import Engine
11
11
  from sqlalchemy.exc import InterfaceError, OperationalError, ProgrammingError, SQLAlchemyError
12
12
 
13
13
  from shared_kernel.dataclasses.warehouse_configs import PostgreSQLConfig
14
- from shared_kernel.exceptions.http_exceptions import BadRequest
14
+ from shared_kernel.exceptions.http_exceptions import BadRequest, Unauthorized
15
15
  from shared_kernel.interfaces.warehouse_connection import DataWarehouseConnection, cancel_check_connection
16
16
  from shared_kernel.logger import Logger
17
17
  from shared_kernel.config import Config
@@ -61,9 +61,10 @@ class PostgreSQLWarehouseConnection(DataWarehouseConnection):
61
61
  f"postgresql+psycopg2://{cfg.username}:{password}"
62
62
  f"@{cfg.host}:{cfg.port}/{cfg.database}"
63
63
  )
64
+ pool_size = int(Config.get("POSTGRES_POOL_SIZE", 10))
64
65
  self._engines[key] = create_engine(
65
66
  url,
66
- pool_size=10,
67
+ pool_size=pool_size,
67
68
  max_overflow=5,
68
69
  pool_timeout=30,
69
70
  pool_recycle=1800,
@@ -113,7 +114,7 @@ class PostgreSQLWarehouseConnection(DataWarehouseConnection):
113
114
  conn.close()
114
115
 
115
116
  raise BadRequest(
116
- f"Failed to connect to PostgreSQL after {retries} attempts"
117
+ f"Failed to connect to PostgreSQL after {retries} attempts: {str(last_exception)}"
117
118
  ) from last_exception
118
119
 
119
120
  def close_connection(self):
@@ -128,16 +129,18 @@ class PostgreSQLWarehouseConnection(DataWarehouseConnection):
128
129
  return True
129
130
 
130
131
  def test_connection(self) -> bool:
131
- """Verify the connection is reachable. Raises ConnectionError on failure."""
132
+ """Verify the connection is reachable. Raises Unauthorized/BadRequest on failure."""
132
133
  try:
133
- with self.get_connection():
134
+ with self.get_connection(retries=1):
134
135
  return True
135
- except OperationalError as e:
136
- if "password authentication failed" in str(e).lower():
137
- raise ValueError("Invalid username or password")
138
- raise ConnectionError(f"Database error: {str(e)}")
139
- except InterfaceError:
140
- raise ConnectionError("Cannot connect to database server")
141
- except SQLAlchemyError as e:
142
- raise RuntimeError(f"SQLAlchemy error: {e}")
143
-
136
+ except Exception as e:
137
+ error_msg = str(e)
138
+ if "password authentication failed" in error_msg.lower():
139
+ raise Unauthorized("Authentication failed. Please check your username and password.") from e
140
+ if "could not translate host name" in error_msg.lower() or "name or service not known" in error_msg.lower():
141
+ raise BadRequest("Host not found. Please check the host address.") from e
142
+ if "connection refused" in error_msg.lower() or "timeout expired" in error_msg.lower():
143
+ raise BadRequest("Connection refused. Please check the host and port.") from e
144
+ if "does not exist" in error_msg.lower() and "database" in error_msg.lower():
145
+ raise BadRequest("Database does not exist. Please check the database name.") from e
146
+ raise BadRequest(f"PostgreSQL connection test failed: {error_msg}") from e
@@ -11,7 +11,7 @@ from sqlalchemy.engine import Engine
11
11
  from sqlalchemy.exc import InterfaceError, OperationalError, ProgrammingError
12
12
 
13
13
  from shared_kernel.dataclasses.warehouse_configs import RedshiftConfig
14
- from shared_kernel.exceptions.http_exceptions import BadRequest
14
+ from shared_kernel.exceptions.http_exceptions import BadRequest, Unauthorized
15
15
  from shared_kernel.interfaces.warehouse_connection import DataWarehouseConnection, cancel_check_connection
16
16
  from shared_kernel.logger import Logger
17
17
  from shared_kernel.config import Config
@@ -194,9 +194,10 @@ class RedshiftWarehouseConnection(DataWarehouseConnection):
194
194
  f"redshift+redshift_connector://{cfg.username}:{cfg.password}"
195
195
  f"@{cfg.host}:{cfg.port}/{cfg.database}"
196
196
  )
197
+ pool_size = int(Config.get("REDSHIFT_POOL_SIZE", 10))
197
198
  self._engines[key] = create_engine(
198
199
  url,
199
- pool_size=10,
200
+ pool_size=pool_size,
200
201
  max_overflow=5,
201
202
  pool_timeout=30,
202
203
  pool_recycle=1800,
@@ -283,21 +284,18 @@ class RedshiftWarehouseConnection(DataWarehouseConnection):
283
284
  return True
284
285
 
285
286
  def test_connection(self) -> bool:
286
- """Verify the connection is reachable. Raises ConnectionError on failure."""
287
+ """Verify the connection is reachable. Raises Unauthorized/BadRequest on failure."""
287
288
  try:
288
- with self.get_connection():
289
+ with self.get_connection(retries=1):
289
290
  return True
290
291
  except Exception as e:
291
292
  error_msg = str(e)
292
- if "Name or service not known" in error_msg:
293
- user_msg = "Host not found. Please check the host address."
294
- elif "Connection refused" in error_msg:
295
- user_msg = "Connection refused. Please check the host and port."
296
- elif "database" in error_msg.lower() and "does not exist" in error_msg:
297
- user_msg = "Database does not exist. Please check the database name."
298
- elif "password authentication failed" in error_msg.lower():
299
- user_msg = "Authentication failed. Please check your username and password."
300
- else:
301
- user_msg = f"Redshift connection test failed: {error_msg}"
302
-
303
- raise ConnectionError(user_msg) from e
293
+ if "password authentication failed" in error_msg.lower():
294
+ raise Unauthorized("Authentication failed. Please check your username and password.") from e
295
+ if "name or service not known" in error_msg.lower():
296
+ raise BadRequest("Host not found. Please check the host address.") from e
297
+ if "connection refused" in error_msg.lower() or "timeout" in error_msg.lower():
298
+ raise BadRequest("Connection refused. Please check the host and port.") from e
299
+ if "database" in error_msg.lower() and "does not exist" in error_msg.lower():
300
+ raise BadRequest("Database does not exist. Please check the database name.") from e
301
+ raise BadRequest(f"Redshift connection test failed: {error_msg}") from e
@@ -18,7 +18,7 @@ from snowflake.connector.errors import (
18
18
 
19
19
  from shared_kernel.data_warehouse_handlers.utils import extract_snowflake_error_message
20
20
  from shared_kernel.dataclasses.warehouse_configs import SnowflakeConfig
21
- from shared_kernel.exceptions.http_exceptions import BadRequest
21
+ from shared_kernel.exceptions.http_exceptions import BadRequest, Unauthorized
22
22
  from shared_kernel.interfaces.warehouse_connection import DataWarehouseConnection, cancel_check_connection
23
23
  from shared_kernel.logger import Logger
24
24
  from shared_kernel.config import Config
@@ -156,7 +156,7 @@ class SnowflakeWarehouseConnection(DataWarehouseConnection):
156
156
  raise Exception("Snowflake connection validation failed.")
157
157
 
158
158
  def test_connection(self) -> bool:
159
- """Verify the connection is reachable."""
159
+ """Verify the connection is reachable. Raises Unauthorized/BadRequest on failure."""
160
160
  try:
161
161
  self._create_connection()
162
162
  self.close_connection()
@@ -164,10 +164,10 @@ class SnowflakeWarehouseConnection(DataWarehouseConnection):
164
164
  except (OperationalError, DatabaseError, ProgrammingError) as e:
165
165
  error_message = extract_snowflake_error_message(str(e))
166
166
  if "incorrect username or password" in error_message.lower() or "authentication" in error_message.lower():
167
- raise ValueError("Invalid username or password")
168
- raise ConnectionError(f"Database error: {error_message}")
167
+ raise Unauthorized("Invalid username or password") from e
168
+ raise BadRequest(f"Snowflake connection test failed: {error_message}") from e
169
169
  except InterfaceError as e:
170
170
  error_message = extract_snowflake_error_message(str(e))
171
- raise ConnectionError(f"Cannot connect to database server: {error_message}")
171
+ raise BadRequest(f"Cannot connect to database server: {error_message}") from e
172
172
  except Exception as e:
173
- raise ConnectionError(f"Connection failed: {str(e)}")
173
+ raise BadRequest(f"Snowflake connection test failed: {str(e)}") from e
@@ -61,12 +61,22 @@ def extract_sql_server_error_message(error) -> str:
61
61
  """
62
62
  try:
63
63
  if isinstance(error, str):
64
- if "HYT00" in error:
64
+ if (
65
+ "failed to open the explicitly specified database" in error.lower()
66
+ or "cannot open database" in error.lower()
67
+ or "database was not found" in error.lower()
68
+ ):
69
+ message = "the specified database could not be opened. Please verify the database name."
70
+ elif "HYT00" in error:
65
71
  message = "login timeout. Please verify the provided credentials."
66
72
  elif "42000" in error:
67
73
  message = "the target database being unavailable or misconfigured. Please verify the provided credentials."
68
74
  elif "28000" in error:
69
75
  message = "login error. Please ensure the specified SQL Server username & password are correct."
76
+ elif "08S01" in error:
77
+ message = "connection refused. Please check the host and port."
78
+ else:
79
+ message = error
70
80
  return message
71
81
 
72
82
  return str(error)