|
1 | 1 | # Databricks C++ SDK |
2 | 2 |
|
| 3 | +[](https://github.com/calvinjmin/databricks-sdk-cpp/releases/latest) |
| 4 | +[](https://opensource.org/licenses/MIT) |
| 5 | + |
3 | 6 | A C++ SDK for Databricks, providing an interface for interacting with Databricks services. |
4 | 7 |
|
5 | | -**Author **: Calvin Min ( [email protected]) |
| 8 | +**Latest Release **: [v0.1.0 ](https://github.com/calvinjmin/databricks-sdk-cpp/releases/tag/v0.1.0) | **Author **: Calvin Min ( [email protected]) |
| 9 | + |
| 10 | +## Table of Contents |
| 11 | + |
| 12 | +- [Requirements](#requirements) |
| 13 | + - [ODBC Driver Setup](#odbc-driver-setup) |
| 14 | + - [Automated Setup Check](#automated-setup-check) |
| 15 | +- [Installation](#installation) |
| 16 | + - [Option 1: CMake FetchContent (Recommended)](#option-1-cmake-fetchcontent-recommended---direct-from-github) |
| 17 | + - [Option 2: vcpkg](#option-2-vcpkg) |
| 18 | + - [Option 3: Manual Build and Install](#option-3-manual-build-and-install) |
| 19 | +- [Building from Source](#building-from-source) |
| 20 | +- [Quick Start](#quick-start) |
| 21 | +- [Configuration](#configuration) |
| 22 | +- [Running Examples](#running-examples) |
| 23 | +- [Performance Considerations](#performance-considerations) |
| 24 | +- [Advanced Usage](#advanced-usage) |
| 25 | +- [Documentation](#documentation) |
| 26 | +- [License](#license) |
| 27 | +- [Contributing](#contributing) |
6 | 28 |
|
7 | 29 | ## Requirements |
8 | 30 |
|
@@ -78,7 +100,65 @@ This will verify: |
78 | 100 | - Installed ODBC drivers (including Simba Spark) |
79 | 101 | - Library paths |
80 | 102 |
|
81 | | -## Building |
| 103 | +## Installation |
| 104 | + |
| 105 | +### Option 1: CMake FetchContent (Recommended - Direct from GitHub) |
| 106 | + |
| 107 | +Add to your `CMakeLists.txt`: |
| 108 | + |
| 109 | +```cmake |
| 110 | +include(FetchContent) |
| 111 | +
|
| 112 | +FetchContent_Declare( |
| 113 | + databricks_sdk |
| 114 | + GIT_REPOSITORY https://github.com/calvinjmin/databricks-sdk-cpp.git |
| 115 | + GIT_TAG v0.1.0 # or use 'main' for latest |
| 116 | +) |
| 117 | +
|
| 118 | +FetchContent_MakeAvailable(databricks_sdk) |
| 119 | +target_link_libraries(my_app PRIVATE databricks_sdk::databricks_sdk) |
| 120 | +``` |
| 121 | + |
| 122 | +**Advantages**: No separate installation step, always gets the exact version you specify. |
| 123 | + |
| 124 | +### Option 2: vcpkg |
| 125 | + |
| 126 | +Once published to vcpkg (submission in progress), install with: |
| 127 | + |
| 128 | +```bash |
| 129 | +vcpkg install databricks-sdk-cpp |
| 130 | +``` |
| 131 | + |
| 132 | +Then use in your CMake project: |
| 133 | +```cmake |
| 134 | +find_package(databricks_sdk CONFIG REQUIRED) |
| 135 | +target_link_libraries(my_app PRIVATE databricks_sdk::databricks_sdk) |
| 136 | +``` |
| 137 | + |
| 138 | +For maintainers: See [dev-docs/VCPKG_SUBMISSION.md](dev-docs/VCPKG_SUBMISSION.md) for the complete submission guide. |
| 139 | + |
| 140 | +### Option 3: Manual Build and Install |
| 141 | + |
| 142 | +```bash |
| 143 | +# Clone and build |
| 144 | +git clone https://github.com/calvinjmin/databricks-sdk-cpp.git |
| 145 | +cd databricks-sdk-cpp |
| 146 | +mkdir build && cd build |
| 147 | +cmake .. |
| 148 | +cmake --build . |
| 149 | + |
| 150 | +# Install (requires sudo on Linux/macOS) |
| 151 | +sudo cmake --install . |
| 152 | +``` |
| 153 | + |
| 154 | +Then use in your project: |
| 155 | + |
| 156 | +```cmake |
| 157 | +find_package(databricks_sdk REQUIRED) |
| 158 | +target_link_libraries(my_app PRIVATE databricks_sdk::databricks_sdk) |
| 159 | +``` |
| 160 | + |
| 161 | +## Building from Source |
82 | 162 |
|
83 | 163 | ```bash |
84 | 164 | # Create build directory |
@@ -374,75 +454,6 @@ std::cout << "Using warehouse: " << sql.http_path << std::endl; |
374 | 454 |
|
375 | 455 | For a complete example, see `examples/basic/modular_config_example.cpp`. |
376 | 456 |
|
377 | | -## Installation |
378 | | - |
379 | | -### Option 1: CMake FetchContent (Recommended - Direct from GitHub) |
380 | | - |
381 | | -Add to your `CMakeLists.txt`: |
382 | | - |
383 | | -```cmake |
384 | | -include(FetchContent) |
385 | | -
|
386 | | -FetchContent_Declare( |
387 | | - databricks_sdk |
388 | | - GIT_REPOSITORY https://github.com/calvinjmin/databricks-sdk-cpp.git |
389 | | - GIT_TAG v0.1.0 # or use 'main' for latest |
390 | | -) |
391 | | -
|
392 | | -FetchContent_MakeAvailable(databricks_sdk) |
393 | | -target_link_libraries(my_app PRIVATE databricks_sdk::databricks_sdk) |
394 | | -``` |
395 | | - |
396 | | -**Advantages**: No separate installation step, always gets the exact version you specify. |
397 | | - |
398 | | -### Option 2: vcpkg |
399 | | - |
400 | | -Once published to vcpkg (submission in progress), install with: |
401 | | - |
402 | | -```bash |
403 | | -vcpkg install databricks-sdk-cpp |
404 | | -``` |
405 | | - |
406 | | -Then use in your CMake project: |
407 | | -```cmake |
408 | | -find_package(databricks_sdk CONFIG REQUIRED) |
409 | | -target_link_libraries(my_app PRIVATE databricks_sdk::databricks_sdk) |
410 | | -``` |
411 | | - |
412 | | -For maintainers: See [dev-docs/VCPKG_SUBMISSION.md](dev-docs/VCPKG_SUBMISSION.md) for the complete submission guide. |
413 | | - |
414 | | -### Option 3: Manual Build and Install |
415 | | - |
416 | | -```bash |
417 | | -# Clone and build |
418 | | -git clone https://github.com/calvinjmin/databricks-sdk-cpp.git |
419 | | -cd databricks-sdk-cpp |
420 | | -mkdir build && cd build |
421 | | -cmake .. |
422 | | -cmake --build . |
423 | | - |
424 | | -# Install (requires sudo on Linux/macOS) |
425 | | -sudo cmake --install . |
426 | | -``` |
427 | | - |
428 | | -Then use in your project: |
429 | | - |
430 | | -```cmake |
431 | | -find_package(databricks_sdk REQUIRED) |
432 | | -target_link_libraries(my_app PRIVATE databricks_sdk::databricks_sdk) |
433 | | -``` |
434 | | - |
435 | | -## Using in Your Project |
436 | | - |
437 | | -After installation (via any method above), the SDK is available as a CMake target: |
438 | | - |
439 | | -```cmake |
440 | | -find_package(databricks_sdk REQUIRED) |
441 | | -
|
442 | | -add_executable(my_app main.cpp) |
443 | | -target_link_libraries(my_app PRIVATE databricks_sdk::databricks_sdk) |
444 | | -``` |
445 | | - |
446 | 457 | ## Running Examples |
447 | 458 |
|
448 | 459 | ### Setup Configuration |
|
0 commit comments