Skip to content

Commit

Permalink
Python sample and strings for python users (#135)
Browse files Browse the repository at this point in the history
* sample

* docs with strings

* Change authentication naming to app id and secret

* Change authentication naming to app id and secret

* Change authentication naming to app id and secret

* Change authentication naming to app id and secret

Co-authored-by: Ohad Bitton <[email protected]>
  • Loading branch information
ohadbitt and ohbitton authored Jun 29, 2020
1 parent 394f2e3 commit 498f86f
Show file tree
Hide file tree
Showing 17 changed files with 177 additions and 158 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ trait KustoOptions {


// AAD application identifier of the client
val KUSTO_AAD_CLIENT_ID: String = newOption("kustoAADClientID")
val KUSTO_AAD_APP_ID: String = newOption("kustoAadAppId")
// AAD authentication authority
val KUSTO_AAD_AUTHORITY_ID: String = newOption("kustoAADAuthorityID")
val KUSTO_AAD_AUTHORITY_ID: String = newOption("kustoAadAuthorityID")
// AAD application key for the client
val KUSTO_AAD_CLIENT_PASSWORD: String = newOption("kustoClientAADClientPassword")
val KUSTO_AAD_APP_SECRET: String = newOption("kustoAadAppSecret")

val KUSTO_ACCESS_TOKEN: String = newOption("accessToken")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ object KustoDataSourceUtils {
val table = parameters.get(KustoSinkOptions.KUSTO_TABLE)

// Parse KustoAuthentication
val applicationId = parameters.getOrElse(KustoSourceOptions.KUSTO_AAD_CLIENT_ID, "")
val applicationKey = parameters.getOrElse(KustoSourceOptions.KUSTO_AAD_CLIENT_PASSWORD, "")
val applicationId = parameters.getOrElse(KustoSourceOptions.KUSTO_AAD_APP_ID, "")
val applicationKey = parameters.getOrElse(KustoSourceOptions.KUSTO_AAD_APP_SECRET, "")
var authentication: KustoAuthentication = null
val keyVaultUri: String = parameters.getOrElse(KustoSourceOptions.KEY_VAULT_URI, "")
var accessToken: String = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ class KustoAuthenticationTestE2E extends FlatSpec {
val cluster: String = System.getProperty(KustoSinkOptions.KUSTO_CLUSTER)
val database: String = System.getProperty(KustoSinkOptions.KUSTO_DATABASE)

val appId: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_CLIENT_ID)
val appKey: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_CLIENT_PASSWORD)
val appId: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_APP_ID)
val appKey: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_APP_SECRET)
val authority: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_AUTHORITY_ID, "microsoft.com")

val keyVaultClientID: String = System.getProperty(KustoSinkOptions.KEY_VAULT_APP_ID)
val keyVaultClientPassword: String = System.getProperty(KustoSinkOptions.KEY_VAULT_APP_KEY)
val keyVaultAppId: String = System.getProperty(KustoSinkOptions.KEY_VAULT_APP_ID)
val keyVaultAppKey: String = System.getProperty(KustoSinkOptions.KEY_VAULT_APP_KEY)
val keyVaultUri: String = System.getProperty(KustoSinkOptions.KEY_VAULT_URI)

"keyVaultAuthentication" should "use key vault for authentication and retracting kusto app auth params" taggedAs KustoE2E in {
Expand All @@ -45,8 +45,8 @@ class KustoAuthenticationTestE2E extends FlatSpec {
val df = rows.toDF("name", "value")
val conf: Map[String, String] = Map(
KustoSinkOptions.KEY_VAULT_URI -> keyVaultUri,
KustoSinkOptions.KEY_VAULT_APP_ID -> (if(keyVaultClientID == null) appId else keyVaultClientID),
KustoSinkOptions.KEY_VAULT_APP_KEY -> (if(keyVaultClientPassword == null) appKey else keyVaultClientPassword),
KustoSinkOptions.KEY_VAULT_APP_ID -> (if(keyVaultAppId == null) appId else keyVaultAppId),
KustoSinkOptions.KEY_VAULT_APP_KEY -> (if(keyVaultAppKey == null) appKey else keyVaultAppKey),
KustoSinkOptions.KUSTO_TABLE_CREATE_OPTIONS -> SinkTableCreationMode.CreateIfNotExist.toString
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class KustoBlobAccessE2E extends FlatSpec with BeforeAndAfterAll {
sc.stop()
}

val appId: String = System.getProperty(KustoSourceOptions.KUSTO_AAD_CLIENT_ID)
val appKey: String = System.getProperty(KustoSourceOptions.KUSTO_AAD_CLIENT_PASSWORD)
val appId: String = System.getProperty(KustoSourceOptions.KUSTO_AAD_APP_ID)
val appKey: String = System.getProperty(KustoSourceOptions.KUSTO_AAD_APP_SECRET)
val authority: String = System.getProperty(KustoSourceOptions.KUSTO_AAD_AUTHORITY_ID)
val cluster: String = System.getProperty(KustoSourceOptions.KUSTO_CLUSTER)
val database: String = System.getProperty(KustoSourceOptions.KUSTO_DATABASE)
Expand Down Expand Up @@ -73,8 +73,8 @@ class KustoBlobAccessE2E extends FlatSpec with BeforeAndAfterAll {
val df = rows.toDF("name", "value")

val conf = Map(
KustoSinkOptions.KUSTO_AAD_CLIENT_ID -> appId,
KustoSinkOptions.KUSTO_AAD_CLIENT_PASSWORD -> appKey,
KustoSinkOptions.KUSTO_AAD_APP_ID -> appId,
KustoSinkOptions.KUSTO_AAD_APP_SECRET -> appKey,
KustoSinkOptions.KUSTO_AAD_AUTHORITY_ID -> authority,
KustoSinkOptions.KUSTO_TABLE_CREATE_OPTIONS -> "CreateIfNotExist"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class KustoPruneAndFilterE2E extends FlatSpec with BeforeAndAfterAll {
sc.stop()
}

val appId: String = System.getProperty(KustoSourceOptions.KUSTO_AAD_CLIENT_ID)
val appKey: String = System.getProperty(KustoSourceOptions.KUSTO_AAD_CLIENT_PASSWORD)
val appId: String = System.getProperty(KustoSourceOptions.KUSTO_AAD_APP_ID)
val appKey: String = System.getProperty(KustoSourceOptions.KUSTO_AAD_APP_SECRET)
val authority: String = System.getProperty(KustoSourceOptions.KUSTO_AAD_AUTHORITY_ID, "microsoft.com")
val cluster: String = System.getProperty(KustoSourceOptions.KUSTO_CLUSTER)
val database: String = System.getProperty(KustoSourceOptions.KUSTO_DATABASE)
Expand All @@ -56,8 +56,8 @@ class KustoPruneAndFilterE2E extends FlatSpec with BeforeAndAfterAll {
val query: String = System.getProperty(KustoSourceOptions.KUSTO_QUERY, s"$table | where (toint(ColB) % 1000 == 0) ")

val conf = Map(
KustoSourceOptions.KUSTO_AAD_CLIENT_ID -> appId,
KustoSourceOptions.KUSTO_AAD_CLIENT_PASSWORD -> appKey,
KustoSourceOptions.KUSTO_AAD_APP_ID -> appId,
KustoSourceOptions.KUSTO_AAD_APP_SECRET -> appKey,
KustoSourceOptions.KUSTO_READ_MODE -> ReadMode.ForceSingleMode.toString
)

Expand All @@ -75,15 +75,15 @@ class KustoPruneAndFilterE2E extends FlatSpec with BeforeAndAfterAll {
val blobSas: String = System.getProperty("blobSas")

val conf = if (blobSas == null) {
Map(KustoSourceOptions.KUSTO_AAD_CLIENT_ID -> appId,
KustoSourceOptions.KUSTO_AAD_CLIENT_PASSWORD -> appKey,
Map(KustoSourceOptions.KUSTO_AAD_APP_ID -> appId,
KustoSourceOptions.KUSTO_AAD_APP_SECRET -> appKey,
KustoSourceOptions.KUSTO_BLOB_STORAGE_ACCOUNT_NAME -> storageAccount,
KustoSourceOptions.KUSTO_BLOB_STORAGE_ACCOUNT_KEY -> blobKey,
KustoSourceOptions.KUSTO_BLOB_CONTAINER -> container)
}
else {
Map(KustoSourceOptions.KUSTO_AAD_CLIENT_ID -> appId,
KustoSourceOptions.KUSTO_AAD_CLIENT_PASSWORD -> appKey,
Map(KustoSourceOptions.KUSTO_AAD_APP_ID -> appId,
KustoSourceOptions.KUSTO_AAD_APP_SECRET -> appKey,
KustoSourceOptions.KUSTO_BLOB_STORAGE_SAS_URL -> blobSas
// , KustoDebugOptions.KUSTO_DBG_BLOB_FORCE_KEEP -> "true"
)
Expand Down Expand Up @@ -120,23 +120,23 @@ class KustoPruneAndFilterE2E extends FlatSpec with BeforeAndAfterAll {
.option(KustoSinkOptions.KUSTO_CLUSTER, cluster)
.option(KustoSinkOptions.KUSTO_DATABASE, database)
.option(KustoSinkOptions.KUSTO_TABLE, query)
.option(KustoSinkOptions.KUSTO_AAD_CLIENT_ID, appId)
.option(KustoSinkOptions.KUSTO_AAD_CLIENT_PASSWORD, appKey)
.option(KustoSinkOptions.KUSTO_AAD_APP_ID, appId)
.option(KustoSinkOptions.KUSTO_AAD_APP_SECRET, appKey)
.option(KustoSinkOptions.KUSTO_AAD_AUTHORITY_ID, authority)
.mode(SaveMode.Append)
.save()

val conf = if (blobSas != null) {
Map(KustoSourceOptions.KUSTO_AAD_CLIENT_ID -> appId,
KustoSourceOptions.KUSTO_AAD_CLIENT_PASSWORD -> appKey,
Map(KustoSourceOptions.KUSTO_AAD_APP_ID -> appId,
KustoSourceOptions.KUSTO_AAD_APP_SECRET -> appKey,
KustoSourceOptions.KUSTO_BLOB_STORAGE_ACCOUNT_NAME -> storageAccount,
KustoSourceOptions.KUSTO_BLOB_STORAGE_ACCOUNT_KEY -> blobKey,
KustoSourceOptions.KUSTO_BLOB_CONTAINER -> container,
KustoDebugOptions.KUSTO_DBG_BLOB_COMPRESS_ON_EXPORT -> "false") // Just to test this option
}
else {
Map(KustoSourceOptions.KUSTO_AAD_CLIENT_ID -> appId,
KustoSourceOptions.KUSTO_AAD_CLIENT_PASSWORD -> appKey,
Map(KustoSourceOptions.KUSTO_AAD_APP_ID -> appId,
KustoSourceOptions.KUSTO_AAD_APP_SECRET -> appKey,
KustoSourceOptions.KUSTO_BLOB_STORAGE_SAS_URL -> blobSas,
KustoDebugOptions.KUSTO_DBG_BLOB_COMPRESS_ON_EXPORT -> "false") // Just to test this option
}
Expand Down Expand Up @@ -191,22 +191,22 @@ class KustoPruneAndFilterE2E extends FlatSpec with BeforeAndAfterAll {
.option(KustoSinkOptions.KUSTO_CLUSTER, cluster)
.option(KustoSinkOptions.KUSTO_DATABASE, database)
.option(KustoSinkOptions.KUSTO_TABLE, query)
.option(KustoSinkOptions.KUSTO_AAD_CLIENT_ID, appId)
.option(KustoSinkOptions.KUSTO_AAD_CLIENT_PASSWORD, appKey)
.option(KustoSinkOptions.KUSTO_AAD_APP_ID, appId)
.option(KustoSinkOptions.KUSTO_AAD_APP_SECRET, appKey)
.option(KustoSinkOptions.KUSTO_AAD_AUTHORITY_ID, authority)
.mode(SaveMode.Append)
.save()

val conf = if (blobSas == null) {
Map(KustoSourceOptions.KUSTO_AAD_CLIENT_ID -> appId,
KustoSourceOptions.KUSTO_AAD_CLIENT_PASSWORD -> appKey,
Map(KustoSourceOptions.KUSTO_AAD_APP_ID -> appId,
KustoSourceOptions.KUSTO_AAD_APP_SECRET -> appKey,
KustoSourceOptions.KUSTO_BLOB_STORAGE_ACCOUNT_NAME -> storageAccount,
KustoSourceOptions.KUSTO_BLOB_STORAGE_ACCOUNT_KEY -> blobKey,
KustoSourceOptions.KUSTO_BLOB_CONTAINER -> container)
}
else {
Map(KustoSourceOptions.KUSTO_AAD_CLIENT_ID -> appId,
KustoSourceOptions.KUSTO_AAD_CLIENT_PASSWORD -> appKey,
Map(KustoSourceOptions.KUSTO_AAD_APP_ID -> appId,
KustoSourceOptions.KUSTO_AAD_APP_SECRET -> appKey,
KustoSourceOptions.KUSTO_BLOB_STORAGE_SAS_URL -> blobSas)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ class KustoSinkBatchE2E extends FlatSpec with BeforeAndAfterAll{
sc.stop()
}

val appId: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_CLIENT_ID)
val appKey: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_CLIENT_PASSWORD)
val appId: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_APP_ID)
val appKey: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_APP_SECRET)
val authority: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_AUTHORITY_ID, "microsoft.com")
val cluster: String = System.getProperty(KustoSinkOptions.KUSTO_CLUSTER)
val database: String = System.getProperty(KustoSinkOptions.KUSTO_DATABASE)
Expand Down Expand Up @@ -89,23 +89,23 @@ class KustoSinkBatchE2E extends FlatSpec with BeforeAndAfterAll{
.option(KustoSinkOptions.KUSTO_CLUSTER, cluster)
.option(KustoSinkOptions.KUSTO_DATABASE, database)
.option(KustoSinkOptions.KUSTO_TABLE, table)
.option(KustoSinkOptions.KUSTO_AAD_CLIENT_ID, appId)
.option(KustoSinkOptions.KUSTO_AAD_CLIENT_PASSWORD, appKey)
.option(KustoSinkOptions.KUSTO_AAD_APP_ID, appId)
.option(KustoSinkOptions.KUSTO_AAD_APP_SECRET, appKey)
.option(KustoSinkOptions.KUSTO_AAD_AUTHORITY_ID, authority)
.option(DateTimeUtils.TIMEZONE_OPTION, "GMT+4")
.option(KustoSinkOptions.KUSTO_TABLE_CREATE_OPTIONS, SinkTableCreationMode.CreateIfNotExist.toString)
.mode(SaveMode.Append)
.save()

val conf: Map[String, String] = Map(
KustoSinkOptions.KUSTO_AAD_CLIENT_ID -> appId,
KustoSinkOptions.KUSTO_AAD_CLIENT_PASSWORD -> appKey,
KustoSinkOptions.KUSTO_AAD_APP_ID -> appId,
KustoSinkOptions.KUSTO_AAD_APP_SECRET -> appKey,
KustoSourceOptions.KUSTO_READ_MODE -> ReadMode.ForceDistributedMode.toString
)

val conf2: Map[String, String] = Map(
KustoSinkOptions.KUSTO_AAD_CLIENT_ID -> appId,
KustoSinkOptions.KUSTO_AAD_CLIENT_PASSWORD -> appKey,
KustoSinkOptions.KUSTO_AAD_APP_ID -> appId,
KustoSinkOptions.KUSTO_AAD_APP_SECRET -> appKey,
KustoSourceOptions.KUSTO_READ_MODE -> ReadMode.ForceSingleMode.toString
)

Expand Down Expand Up @@ -174,8 +174,8 @@ class KustoSinkBatchE2E extends FlatSpec with BeforeAndAfterAll{
.option(KustoSinkOptions.KUSTO_CLUSTER, cluster)
.option(KustoSinkOptions.KUSTO_DATABASE, database)
.option(KustoSinkOptions.KUSTO_TABLE, table)
.option(KustoSinkOptions.KUSTO_AAD_CLIENT_ID, appId)
.option(KustoSinkOptions.KUSTO_AAD_CLIENT_PASSWORD, appKey)
.option(KustoSinkOptions.KUSTO_AAD_APP_ID, appId)
.option(KustoSinkOptions.KUSTO_AAD_APP_SECRET, appKey)
.option(KustoSinkOptions.KUSTO_AAD_AUTHORITY_ID, authority)
.option(KustoSinkOptions.KUSTO_TIMEOUT_LIMIT, (8 * 60).toString)
.mode(SaveMode.Append)
Expand All @@ -200,8 +200,8 @@ class KustoSinkBatchE2E extends FlatSpec with BeforeAndAfterAll{
.option(KustoSinkOptions.KUSTO_CLUSTER, cluster)
.option(KustoSinkOptions.KUSTO_DATABASE, database)
.option(KustoSinkOptions.KUSTO_TABLE, table)
.option(KustoSinkOptions.KUSTO_AAD_CLIENT_ID, appId)
.option(KustoSinkOptions.KUSTO_AAD_CLIENT_PASSWORD, appKey)
.option(KustoSinkOptions.KUSTO_AAD_APP_ID, appId)
.option(KustoSinkOptions.KUSTO_AAD_APP_SECRET, appKey)
.option(KustoSinkOptions.KUSTO_AAD_AUTHORITY_ID, authority)
.option(KustoSinkOptions.KUSTO_WRITE_ENABLE_ASYNC, "true")
.mode(SaveMode.Append)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class KustoSinkStreamingE2E extends FlatSpec with BeforeAndAfterAll {
sc.stop()
}

val appId: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_CLIENT_ID)
val appKey: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_CLIENT_PASSWORD)
val appId: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_APP_ID)
val appKey: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_APP_SECRET)
val authority: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_AUTHORITY_ID, "microsoft.com")
val cluster: String = System.getProperty(KustoSinkOptions.KUSTO_CLUSTER)
val database: String = System.getProperty(KustoSinkOptions.KUSTO_DATABASE)
Expand Down Expand Up @@ -80,8 +80,8 @@ class KustoSinkStreamingE2E extends FlatSpec with BeforeAndAfterAll {
KustoSinkOptions.KUSTO_CLUSTER -> cluster,
KustoSinkOptions.KUSTO_TABLE -> table,
KustoSinkOptions.KUSTO_DATABASE -> database,
KustoSinkOptions.KUSTO_AAD_CLIENT_ID -> appId,
KustoSinkOptions.KUSTO_AAD_CLIENT_PASSWORD -> appKey,
KustoSinkOptions.KUSTO_AAD_APP_ID -> appId,
KustoSinkOptions.KUSTO_AAD_APP_SECRET -> appKey,
KustoSinkOptions.KUSTO_AAD_AUTHORITY_ID -> authority,
KustoSinkOptions.KUSTO_TABLE_CREATE_OPTIONS -> SinkTableCreationMode.CreateIfNotExist.toString))
.trigger(Trigger.Once)
Expand Down Expand Up @@ -127,8 +127,8 @@ class KustoSinkStreamingE2E extends FlatSpec with BeforeAndAfterAll {
KustoSinkOptions.KUSTO_CLUSTER -> cluster,
KustoSinkOptions.KUSTO_TABLE -> table,
KustoSinkOptions.KUSTO_DATABASE -> database,
KustoSinkOptions.KUSTO_AAD_CLIENT_ID -> appId,
KustoSinkOptions.KUSTO_AAD_CLIENT_PASSWORD -> appKey,
KustoSinkOptions.KUSTO_AAD_APP_ID -> appId,
KustoSinkOptions.KUSTO_AAD_APP_SECRET -> appKey,
KustoSinkOptions.KUSTO_AAD_AUTHORITY_ID -> authority,
KustoSinkOptions.KUSTO_WRITE_ENABLE_ASYNC -> "true"))
.trigger(Trigger.Once)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class KustoSourceE2E extends FlatSpec with BeforeAndAfterAll {
sc.stop()
}

val appId: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_CLIENT_ID)
val appKey: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_CLIENT_PASSWORD)
val appId: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_APP_ID)
val appKey: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_APP_SECRET)
val authority: String = System.getProperty(KustoSinkOptions.KUSTO_AAD_AUTHORITY_ID, "microsoft.com")
val cluster: String = System.getProperty(KustoSinkOptions.KUSTO_CLUSTER)
val database: String = System.getProperty(KustoSinkOptions.KUSTO_DATABASE)
Expand All @@ -57,8 +57,8 @@ class KustoSourceE2E extends FlatSpec with BeforeAndAfterAll {

val conf: Map[String, String] = Map(
KustoSourceOptions.KUSTO_READ_MODE -> ReadMode.ForceSingleMode.toString,
KustoSourceOptions.KUSTO_AAD_CLIENT_ID -> appId,
KustoSourceOptions.KUSTO_AAD_CLIENT_PASSWORD -> appKey
KustoSourceOptions.KUSTO_AAD_APP_ID -> appId,
KustoSourceOptions.KUSTO_AAD_APP_SECRET -> appKey
)

val df = spark.read.kusto(cluster, database, query, conf)
Expand All @@ -76,8 +76,8 @@ class KustoSourceE2E extends FlatSpec with BeforeAndAfterAll {
val blobSasConnectionString: String = System.getProperty("blobSasQuery")

val conf: Map[String, String] = Map(
KustoSourceOptions.KUSTO_AAD_CLIENT_ID -> appId,
KustoSourceOptions.KUSTO_AAD_CLIENT_PASSWORD -> appKey,
KustoSourceOptions.KUSTO_AAD_APP_ID -> appId,
KustoSourceOptions.KUSTO_AAD_APP_SECRET -> appKey,
KustoSourceOptions.KUSTO_BLOB_STORAGE_ACCOUNT_NAME -> storageAccount,
KustoSourceOptions.KUSTO_BLOB_STORAGE_ACCOUNT_KEY -> blobKey,
KustoSourceOptions.KUSTO_BLOB_CONTAINER -> container
Expand Down Expand Up @@ -106,15 +106,15 @@ class KustoSourceE2E extends FlatSpec with BeforeAndAfterAll {
.option(KustoSinkOptions.KUSTO_CLUSTER, cluster)
.option(KustoSinkOptions.KUSTO_DATABASE, database)
.option(KustoSinkOptions.KUSTO_TABLE, table)
.option(KustoSinkOptions.KUSTO_AAD_CLIENT_ID, appId)
.option(KustoSinkOptions.KUSTO_AAD_CLIENT_PASSWORD, appKey)
.option(KustoSinkOptions.KUSTO_AAD_APP_ID, appId)
.option(KustoSinkOptions.KUSTO_AAD_APP_SECRET, appKey)
.option(KustoSinkOptions.KUSTO_AAD_AUTHORITY_ID, authority)
.mode(SaveMode.Append)
.save()

val conf: Map[String, String] = Map(
KustoSinkOptions.KUSTO_AAD_CLIENT_ID -> appId,
KustoSinkOptions.KUSTO_AAD_CLIENT_PASSWORD -> appKey
KustoSinkOptions.KUSTO_AAD_APP_ID -> appId,
KustoSinkOptions.KUSTO_AAD_APP_SECRET -> appKey
)

val dfResult = spark.read.kusto(cluster, database, table, conf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ class KustoSourceTests extends FlatSpec with MockFactory with Matchers with Befo
.option(KustoSourceOptions.KUSTO_CLUSTER, cluster)
.option(KustoSourceOptions.KUSTO_DATABASE, database)
.option(KustoSourceOptions.KUSTO_QUERY, query)
.option(KustoSourceOptions.KUSTO_AAD_CLIENT_ID, appId)
.option(KustoSourceOptions.KUSTO_AAD_CLIENT_PASSWORD, appKey)
.option(KustoSourceOptions.KUSTO_AAD_APP_ID, appId)
.option(KustoSourceOptions.KUSTO_AAD_APP_SECRET, appKey)
.option(KustoSourceOptions.KUSTO_AAD_AUTHORITY_ID, appAuthorityId)
.option(KustoSourceOptions.KUSTO_CUSTOM_DATAFRAME_COLUMN_TYPES, customSchema)
.load("src/test/resources/")
Expand Down
Loading

0 comments on commit 498f86f

Please sign in to comment.