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.
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/PKG-INFO +1 -1
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/fdc_shared_kernel.egg-info/PKG-INFO +1 -1
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/pyproject.toml +1 -1
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/connections/databricks_warehouse_connection.py +6 -6
- {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
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/connections/jdbc_warehouse_connection.py +15 -19
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/connections/mssql_warehouse_connection.py +29 -11
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/connections/mysql_warehouse_connection.py +16 -13
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/connections/postgresql_warehouse_connection.py +17 -14
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/connections/redshift_warehouse_connection.py +14 -16
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/connections/snowflake_warehouse_connection.py +6 -6
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/utils.py +11 -1
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/README.md +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/README_pypi.md +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/fdc_shared_kernel.egg-info/SOURCES.txt +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/fdc_shared_kernel.egg-info/dependency_links.txt +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/fdc_shared_kernel.egg-info/requires.txt +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/fdc_shared_kernel.egg-info/top_level.txt +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/requirements.txt +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/setup.cfg +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/agent_communication_channel/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/agent_communication_channel/agent_channel.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/agent_communication_channel/contexts.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/agent_communication_channel/event_channel.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/ai_audit_log/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/ai_chat_persistence/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/ai_chat_persistence/chat_persistence.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/async_task_executor/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/async_task_executor/async_task_executor.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/auth/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/auth/jwt_helper.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/auth/token_handler.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/auth/workbook_permission_handler.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/batch_job/__init__.py +0 -0
- {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
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/batch_job/job_handlers/__init__.py +0 -0
- {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
- {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
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/batch_job/job_handlers/job_handler_factory.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/batch_job/job_handlers/job_status_mapper.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/batch_job/job_storage_managers/__init__.py +0 -0
- {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
- {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
- {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
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/config/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/constants/constants.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/base_executor.py +0 -0
- {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
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/databricks_handler.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/fabric_sql_handler.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/factory.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/jdbc_driver_registry.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/jdbc_handler.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/mssql_handler.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/mysql_handler.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/odbc_handler.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/postgresql_handler.py +0 -0
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/redshift_handler.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/snowflake_handler.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/data_warehouse_handlers/warehouse_handlers_map.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/database/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/dataclasses/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/dataclasses/aws_batch_job_context.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/dataclasses/azure_container_app_job_context.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/dataclasses/event_executor.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/dataclasses/job_context.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/dataclasses/job_record_dataclasses.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/dataclasses/warehouse_configs.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/csv.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/databricks.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/db2.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/jdbc.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/jira.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/mssql.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/mysql.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/oracle.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/postgres.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/redshift.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/salesforce.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/snowflake.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/connectors_to_system/sqlalchemy.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/system_to_warehouse/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/system_to_warehouse/postgres.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/datatype_mappings/system_to_warehouse/redshift.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/enums/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/enums/async_task_executor.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/enums/connection_engine.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/enums/status_tracker.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/event_executor/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/event_executor/event_executor.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/event_executor/job_executor.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/event_executor/utils.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/batch_job_exceptions.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/configuration_exceptions.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/custom_exceptions.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/data_validation_exceptions.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/http_exceptions.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/infrastructure_exceptions.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/operational_exceptions.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/security_exceptions.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/exceptions/user_intervention_exception.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/http/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/http/httpx_http_client.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/http/request_http_client.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/base_job_handler.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/data_warehouse_handler.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/databus.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/encryption.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/http.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/keyvault.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/query_executor.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/storage_manager.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/interfaces/warehouse_connection.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/logger/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/aws_databus.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/azure_databus.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/http_databus.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/nats_databus.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/nats_publisher.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/nats_test.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/utils/aws_utility.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/utils/azure_utility.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/messaging/utils/event_messages.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/metrics/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/metrics/status_tracker.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/models/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/registries/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/registries/schema_onboarding_event_registry.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/registries/service_event_registry.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/base_tracker.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/enums.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/exceptions.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/run_manager.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/schema_onboarding_tracker.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/shared_helpers.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/task_determination.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/task_helpers.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/task_manager.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/template_manager.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/schema_onboarding_tracker/utility_manager.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/security/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/security/encryption/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/security/encryption/manager.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/security/encryption/providers.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/security/key_vault/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/security/key_vault/aws_secret_manager.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/security/key_vault/azure_keyvault.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/status_tracker/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/status_tracker/status_tracker.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/storage_handlers/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/storage_handlers/blob_file_handler.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/storage_handlers/s3_storage_handler.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/config/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/config/test_config.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/logger/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/logger/test_logger.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/messaging/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/messaging/test_aws_databus.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/messaging/test_event_executor.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/messaging/test_nats_interface.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/security/test_encryption.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/utils/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/utils/test_data_validators.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/utils/test_date_format_utils.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/tests/utils/test_string_utils.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/traceability/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/traceability/traceability_handler.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/data_validators_utils.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/date_format_utils.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/date_utils.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/logging_utils.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/request_id.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/string_utils.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/template_renderer.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/thread_debug_utils.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/thread_local_storage.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/shared_kernel/utils/thread_log_traker.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/tests/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/tests/messaging/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/tests/messaging/utils/__init__.py +0 -0
- {fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/tests/messaging/utils/test_aws_utility.py +0 -0
- {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.
|
|
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.
|
|
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
|
|
@@ -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
|
|
145
|
-
raise
|
|
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
|
|
147
|
+
raise BadRequest(f"Cannot connect to database server: {str(e)}") from e
|
|
148
148
|
except Exception as e:
|
|
149
|
-
raise
|
|
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=
|
|
92
|
+
pool_size=pool_size,
|
|
92
93
|
max_overflow=5,
|
|
93
|
-
pool_timeout=
|
|
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
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
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
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
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=
|
|
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
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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=
|
|
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
|
-
|
|
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=
|
|
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
|
|
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
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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=
|
|
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
|
|
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 "
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
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
|
|
168
|
-
raise
|
|
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
|
|
171
|
+
raise BadRequest(f"Cannot connect to database server: {error_message}") from e
|
|
172
172
|
except Exception as e:
|
|
173
|
-
raise
|
|
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
|
|
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)
|
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/fdc_shared_kernel.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/fdc_shared_kernel.egg-info/requires.txt
RENAMED
|
File without changes
|
{fdc_shared_kernel-0.0.195 → fdc_shared_kernel-0.0.197}/fdc_shared_kernel.egg-info/top_level.txt
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.195 → fdc_shared_kernel-0.0.197}/shared_kernel/ai_audit_log/__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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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.195 → fdc_shared_kernel-0.0.197}/shared_kernel/constants/constants.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
|
|
File without changes
|
|
File without changes
|