on 04-28-2014 3:54 PM
Hello,
I retrive universe from repository, open local DataFoundation and getting tables.
Now I want to know which connection (repository SI_ID) using each table. Any ideas?
My code:
String localPath = cmsService.retrieveUniverse("MY_UNIVERSE.unx", LOCAL_FOLDER, true);
SlResource loadedRes = localService.load(localPath);
RelationalBusinessLayer businessLayer = (RelationalBusinessLayer) loadedRes;
String localDFPath = businessLayer.getDataFoundationPath();
SlResource resource = localService.load(localDFPath);
DataFoundation dataFoundation = null;
if (resource instanceof MonoSourceDataFoundation) {
dataFoundation = (MonoSourceDataFoundation) resource;
} else if (resource instanceof MultiSourceDataFoundation) {
dataFoundation = (MultiSourceDataFoundation) resource;
}
List<Table> tables = dataFoundation.getTables();
for (Table table : tables) {
System.out.println("Table: " + table.getName() + " using connection: ????");
}
BO 4.1 SP3
Hi Thomasz,
In the loaded data foundation you check wether the foundation is of type MonoSource or MultiSource.
If MonoSource you read the DataFoundation as MonoSourceDataFoundation and receive the connection path directly from the object.
If MultiSource you iterate the DataFederationSourceInfo objects you get from MultiSourceDataFoundation.getSourceInfos(). Each DataFederationSourceInfo gives you a connection path.
Hope ith helps.
Bernd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tomasz,
Yes this is true.
You can use the path to load the resource as a Connection/ConnectionShortcut (SL SDK type). From the ConnectionShortcut object you get the connection path.
This is the pat in CMS!
Something like /Connections/<connection_name> or
/Connections/<folder_name>/<connection_name>.
We map the CMS connection path to an info object and get the SI_ID from this info object.
Bernd
Hello Tomasz,
Please refer the Object Model Diagram of Semantic Layer SDKs & its API Reference.
I believe you have to get the Data Foundation instance for each table & on the basis of the type of DataFoundation i.e. Single Source or Multi Source you can retrieve the connection path or connection source info whichever is applicable & after that you can get/set the connection info.
Hope this helps.
Thanks,
Shailendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
To check the connection information for IDT universe
Please find the below link.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.