Skip to content

Commit 0e1d94a

Browse files
committed
fix return
1 parent 51862bf commit 0e1d94a

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

core/src/main/scala/com/microsoft/azure/synapse/ml/fabric/FabricClient.scala

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ object FabricClient extends RESTUtils {
7171
private def getMLWorkloadHost: Option[String] = {
7272
if (WorkspacePeEnabled) {
7373
getMLWorkloadPEHost
74+
} else {
75+
extractSchemeAndHost(FabricContext.get("trident.lakehouse.tokenservice.endpoint"))
7476
}
75-
extractSchemeAndHost(FabricContext.get("trident.lakehouse.tokenservice.endpoint"))
7677
}
7778

7879
private def getMLWorkloadPEHost: Option[String] = {
@@ -153,21 +154,21 @@ object FabricClient extends RESTUtils {
153154
private def getPbiSharedHost: Option[String] = {
154155
if (WorkspacePeEnabled) {
155156
getPEPbiSharedHost
157+
} else {
158+
val endpoint = FabricContext.get("spark.trident.pbiHost") match {
159+
case Some(value) if value.nonEmpty =>
160+
value.replace("https://", "").replace("http://", "")
161+
case _ =>
162+
PbiEnv match {
163+
case "edog" => "powerbiapi.analysis-df.windows.net"
164+
case "daily" => "dailyapi.fabric.microsoft.com"
165+
case "dxt" => "dxtapi.fabric.microsoft.com"
166+
case "msit" => "msitapi.fabric.microsoft.com"
167+
case _ => "api.fabric.microsoft.com"
168+
}
169+
}
170+
Some("https://" + endpoint)
156171
}
157-
val endpoint = FabricContext.get("spark.trident.pbiHost") match {
158-
case Some(value) if value.nonEmpty =>
159-
value.replace("https://", "").replace("http://", "")
160-
case _ =>
161-
PbiEnv match {
162-
case "edog" => "powerbiapi.analysis-df.windows.net"
163-
case "daily" => "dailyapi.fabric.microsoft.com"
164-
case "dxt" => "dxtapi.fabric.microsoft.com"
165-
case "msit" => "msitapi.fabric.microsoft.com"
166-
case _ => "api.fabric.microsoft.com"
167-
}
168-
}
169-
170-
Some("https://" + endpoint)
171172
}
172173

173174
private def getPEPbiSharedHost: Option[String] = {

0 commit comments

Comments
 (0)