Azure Data Explorer Connector for Apache Spark
This library contains the source code for Azure Data Explorer Data Source and Data Sink Connector for Apache Spark.
Azure Data Explorer (A.K.A. Kusto) is a lightning-fast indexing and querying service.
Spark is a unified analytics engine for large-scale data processing.
Making Azure Data Explorer and Spark work together enables building fast and scalable applications, targeting a variety of Machine Learning, Extract-Transform-Load, Log Analytics and other data driven scenarios.
Starting version 2.3.0 we introduce new artifact Ids:
kusto-spark_3.x_2.12 targeting Spark 3.x and Scala 2.12 and
kusto-spark_2.4_2.11 targeting Spark 2.4.x and scala 2.11. For Scala/Java applications using Maven project definitions, link your application with the artifact below in order to use the Azure Data Explorer connector for Spark.
groupId = com.microsoft.azure.kusto artifactId = kusto-spark_3.0_2.12 version = 2.3.0
Look for the following coordinates:
Or clone this repository and build it locally to add it to your local maven repository, the jar can also be found under the released package
<dependency> <groupId>com.microsoft.azure.kusto</groupId> <artifactId>spark-kusto-connector</artifactId> <version>2.3.0</version> </dependency>
Libraries -> Install New -> Maven -> copy the following coordinates:
Building Samples Module
Samples are packaged as a separate module with the following artifact
In order to build the whole project comprised of the connector module and the samples module, use the following artifact:
In order to use the connector, you need to have:
- Java 1.8 SDK installed
- Maven 3.x installed
- Spark - with the respective version as the reflected by the artifact Id (either 2.4 or 3.0)
Note: when working with 2.3 Spark version or lower, build the jar locally from branch 2.4 and simply change the spark version in the pom file.
// Builds jar and runs all tests mvn clean package // Builds jar, runs all tests, and installs jar to your local maven repository mvn clean install
In order to facilitate ramp-up from local jar on platforms such as Azure Databricks, pre-compiled libraries are published under GitHub Releases. These libraries include:
- Azure Data Explorer connector library
- User may also need to include Kusto Java SDK libraries (kusto-data and kusto-ingest), which are published under GitHub Releases
Spark Azure Data Explorer connector takes dependency on Azure Data Explorer Data Client Library and Azure Data Explorer Ingest Client Library, available on maven repository. When Key Vault based authentication is used, there is an additional dependency on Microsoft Azure SDK For Key Vault.
Note: When working with Databricks, Azure Data Explorer connector requires Azure Data Explorer java client libraries (and azure key-vault library if used) to be installed. This can be done by accessing Databricks Create Library -> Maven and specifying the following coordinates:
Detailed documentation can be found here.
Usage examples can be found here
Available Azure Data Explorer client libraries:
Here is a list of currently available client libraries for Azure Data Explorer:
For the comfort of the user, here is a Pyspark sample for the connector.
- Have a feature request for SDKs? Please post it on User Voice to help us prioritize
- Have a technical question? Ask on Stack Overflow with tag "azure-data-explorer"
- Need Support? Every customer with an active Azure subscription has access to support with guaranteed response time. Consider submitting a ticket and get assistance from Microsoft support team
- Found a bug? Please help us fix it by thoroughly documenting it and filing an issue.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.