JDBC vs API: Connection Methods Comparison¶
This page provides a detailed comparison between JDBC and API connection methods for the Privacera Databricks Unity Catalog Connector.
JDBC is the Default and Recommended Approach
JDBC (Java Database Connectivity) is the default and recommended connection method for the Privacera Unity Catalog Connector. JDBC provides optimal performance, reliability, and scalability for production workloads. Only consider switching to API mode if you have specific requirements that cannot be met with JDBC.
Advantages of JDBC (Default and Recommended)¶
JDBC is the default connection method and provides the following advantages:
-
Superior Performance: JDBC connections offer significantly faster data transactions and lower latency compared to API calls, making them ideal for high-throughput operations.
-
No Rate Limiting: Unlike API calls, JDBC connections are not subject to per-second rate limits or throttling restrictions, enabling uninterrupted data transactions even during high-volume operations.
-
Production-Ready: JDBC is designed for production workloads with robust error handling, connection pooling, and transaction management capabilities.
-
Scalability: JDBC can handle large-scale permission syncs, resource loading, and data operations without performance degradation.
-
Reliability: JDBC provides more stable and predictable performance, reducing the risk of failures during critical operations like permission application and data loading.
-
Optimized for Bulk Operations: JDBC excels at bulk operations such as loading large numbers of resources, principals, and permissions efficiently.
Disadvantages of JDBC¶
-
Warehouse Cost: JDBC requires a Databricks SQL warehouse to be provisioned and maintained, which incurs additional costs. The warehouse remains active based on inactivity intervals plus loader intervals (resource/principal/permission sync intervals).
-
Warehouse Management: You need to configure and manage warehouse activity settings to balance cost and performance. See the Setup Guide for recommended warehouse activity interval settings.
Advantages of API Mode¶
API-based connectivity may be suitable in specific scenarios:
-
Reduced Warehouse Costs: API mode can reduce costs by avoiding the need to maintain a continuously running SQL warehouse, though JDBC is still required for audit log collection.
-
Simplified Setup: In some cases, API mode may simplify initial setup by reducing JDBC driver configuration requirements.
-
Lightweight Integrations: API mode may be acceptable for very low-throughput environments or proof-of-concept deployments where performance is not critical.
Disadvantages of API Mode (Critical Limitations)¶
API mode has significant limitations that make it unsuitable for most production workloads:
-
Throttling and Rate Limits:
- Databricks API calls are subject to strict per-second rate limits.
- High-volume operations like permission syncs can trigger throttling, causing operations to fail or be delayed.
- This can lead to incomplete policy synchronization and inconsistent access control.
-
Reduced Performance:
- API-based transactions experience significantly higher latency compared to JDBC.
- Performance bottlenecks become apparent under load, especially during resource and permission synchronization.
- Bulk operations take significantly longer to complete.
-
Limited Production Suitability:
- API mode is not recommended for production workloads due to performance and reliability constraints.
- Not suitable for environments with frequent policy changes or large numbers of resources.
- May cause delays in policy enforcement, impacting security and compliance.
-
Operational Challenges:
- Throttling issues require manual intervention and retry logic.
- Inconsistent performance makes capacity planning difficult.
- Higher risk of synchronization failures during peak usage.
When to Use JDBC (Recommended)¶
JDBC is the recommended approach for:
- All production environments.
- High-throughput operations.
- Environments with frequent policy changes.
- Large-scale deployments with many resources, principals, and permissions.
- Scenarios requiring reliable and consistent performance.
- Organizations prioritizing performance and reliability over cost optimization.
When to Use API Mode¶
Use API Mode with Caution
API mode should only be considered for:
- Non-production environments (development, testing, proof-of-concept).
- Very low-throughput scenarios with minimal policy changes.
- Temporary workarounds when JDBC is unavailable.
- Not recommended for production workloads.
Switching Between Connection Methods¶
If you need to switch from JDBC to API mode, see Switching from JDBC to API for step-by-step instructions.
- Prev topic: Advanced Configuration