-
1. Re: create xmi by code
shawkins Jul 11, 2017 9:05 AM (in response to uuliver)No. xmi files are used only by Designer and are considered to be a legacy artifact.
-
2. Re: create xmi by code
rareddy Jul 11, 2017 9:23 AM (in response to uuliver)Why you want use XMI? you define the VDB now completely in DDL, which is just textual form. See this DDL VDB · Teiid Documentation Since this just text, create what you want. If you want to code in JAVA we provide all the API for creating the VDB, that may be little-advanced usage.
-
3. Re: create xmi by code
uuliver Jul 11, 2017 10:11 AM (in response to rareddy)cause i want to use the vdb that dynamic=false,than when structure of
the datasouce have change,i change the xmi and deploy vdb,
Does not affect the upper level application. if the dynamic vdb is create in memory or in disk.
i need the Stable vdb,not always reload when server restart
-
4. Re: create xmi by code
rareddy Jul 11, 2017 11:13 AM (in response to uuliver)1) Dynamic VDB, does not mean more memory or disk
2) Dynamic VDB, does not need to reload every time the data source changes
Loading of the metadata is "optional" feature. If you do not want to reload, then you can define the DDL that defines the model like in XMI then it will only read that, it will not go to the database to reload. Support for XMI based VDBs is going away as supported feature.
-
5. Re: create xmi by code
uuliver Jul 13, 2017 9:48 AM (in response to rareddy)i want to code in JAVA can you provide all the API for creating the VDB,thank you very much
-
6. Re: create xmi by code
rareddy Jul 14, 2017 5:48 PM (in response to uuliver)Yes, it is possible. Take look at "org.teiid.metadata.Database" object as a starting point. You can build the object structure using that, an example see [1] Or if you build a DDL then Teiid parser can automatically build the Database object. For this see [2]
There is also VDBMetadata object, which is equivalent to the vdb.xml object, you can also build that object. An example for this like [3].
[1] teiid/TestDDLStringVisitor.java at master · teiid/teiid · GitHub
[2] teiid/TestDDLParser.java at master · teiid/teiid · GitHub
[3] teiid/TestVDBMetaData.java at master · teiid/teiid · GitHub
-
7. Re: create xmi by code
uuliver Jul 17, 2017 8:34 AM (in response to rareddy)Thank you very much,Thank you for your help