-
1. Re: Teiid - Deploy one table into an existing model
rareddy Jun 21, 2018 2:21 PM (in response to mtawk)Hi Mark,
There is no current way to only update a single or multiple tables during the deployment of the VDB, if you are reading metadata at deploy time from source using NATIVE metadata repository. The alternative is, after the first time deployment, you can grab all the metadata from the model as DDL, and edit the VDB to include the DDL directly. From there on any new tables, you would manually add those new tables to the VDB's Oracle model, redeploy.
To grab the DDL, if you deploy the same VDB in Server based Teiid, you can use CLI to issue a "/subsystem=teiid:get-schema(...)" call, or in embedded you can issue an Admin API call "getSchema(...)" which will return the DDL.
HTH
Ramesh..
-
2. Re: Teiid - Deploy one table into an existing model
mtawk Jun 29, 2018 8:07 AM (in response to rareddy)Hi Ramesh
I was able to extract the model DDL using the method getSchemaDdl(String vdbName, String schemaName) from EmbeddedServer
If I added the newly created tables and replaced the modified tables in the model DDL script, how can I assign it back into the model before redeploying?
Also, when having the native DDL of those tables, is there a way to transform it to teiid model DDL format?
Thanks for your help
-
3. Re: Teiid - Deploy one table into an existing model
rareddy Jun 29, 2018 9:56 AM (in response to mtawk)> If I added the newly created tables and replaced the modified tables in the model DDL script, how can I assign it back into the model before redeploying?
I suggest deploying a VDB with NATIVE only for the purposes of reading metadata with "getSchema" call. Once you have the metadata deploy a separate VDB with just DDL metadata block without the NATIVE metadata.
> Also, when having the native DDL of those tables, is there a way to transform it to teiid model DDL format?
Not directly in Teiid, but in Teiid Designer there is an option to import native DDL of the source and build Teiid models with it. If you're motivated there may be a way to use same libraries from Designer and build a custom metadata repository for Teiid that can take source specific DDL directly and build the model. This is no different than Teiid currently supporting its own slightly extended model of DDL as input to the model.
-
4. Re: Teiid - Deploy one table into an existing model
mtawk Jul 5, 2018 7:34 AM (in response to rareddy)I did not get what you mean by deploying a VDB with Native only, I looked in model types and I have FUNCTION, PHYSICAL, VIRTUAL and OTHER.
Saying the getSchema got me the native metadata DDL, I would have to add to it the DDL of the new tables before deploying it into another model?