GetTabUserFunctionsResult GetSharedFunctions(MbId tMb)
tMb. Repository connection moniker.
The GetSharedFunctions operation gets a list of custom functions that can be used in formulas.
To execute the operation, in the tMb field specify repository connection moniker. The moniker can be obtained on executing the OpenMetabase operation.
The operation results in the list of custom functions configured in the repository. Function description and the list of input parameters will be obtained for each function.
Below is the example of getting the list of custom functions that can be used in formulas.
{
"GetSharedFunctions" :
{
"tMb" :
{
"@type" : "q1:OpenMetabaseResult",
"id" : "KJOFDBINAHDOFOAELHDKMOCHAELFDJAEIIENOHBLOEJDKIOM!M",
"sessKey" : "271704",
"sessCookie" : "C2",
"version" : "163",
"defLocale" : "1049",
"driver" : "2"
}
}
}
{
"GetSharedFunctionsResult" :
{
"fns" :
[
{
"n" : "test",
"dsc" : "MyFunc"
},
{
"n" : "CalculateCount",
"prms" :
{
"n" : "Cells",
"dt" : "5"
}
},
{
"n" : "GetData"
},
{
"n" : "QuadraticEquation",
"prms" :
[
{
"n" : "a",
"dt" : "2"
},
{
"n" : "b",
"dt" : "2"
},
{
"n" : "c",
"dt" : "2"
}
]
},
{
"n" : "UserArima"
},
{
"n" : "ProblemCreation",
"dsc" : "arithmetic"
},
{
"n" : "UserProc",
"dsc" : "pointwise"
},
{
"n" : "ModelVariable",
"dsc" : "series"
},
{
"n" : "test11",
"dsc" : "Extrapolate",
"prms" :
[
{
"n" : "StartValue",
"dt" : "2",
"dsc" : "Initial value"
},
{
"n" : "IsYear",
"dt" : "4",
"dsc" : "Indicates whether ready data is used"
}
]
},
{
"n" : "TransformData",
"prms" :
[
{
"n" : "Input",
"dt" : "5"
},
{
"n" : "Output",
"dt" : "5"
}
]
},
{
"n" : "CalcUserRegression",
"dsc" : "Transforms data using linear regression (custom algorithm). Transforms data using linear regression (custom algorithm).",
"prms" :
[
{
"n" : "Factor",
"dt" : "5",
"dsc" : "Factor impacting modeling data. Factor that affects output data."
},
{
"n" : "Constant",
"dt" : "2",
"dsc" : "Custom value of constant."
}
]
},
{
"n" : "test1"
},
{
"n" : "PiDiv",
"dsc" : "Divide value into Pi",
"prms" :
{
"n" : "Input",
"dt" : "2"
}
}
]
}
}
public static GetTabUserFunctionsResult GetSharedFunctions(MbId mb)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetSharedFunctions()
{
tMb = mb
};
// Get information about available custom functions
var result = somClient.GetSharedFunctions(tGet);
return result;
}
See also: