That looks right, how are setting the extension properties, may be that is happening?
Here is how I am setting the extn props:
Extension properties are added via teiid designer by creating a mxd file and registering it.(The normal way as given in the teiid documentation for MED/mxd).
Then applying it over the view model as column level properties.
Then a static VDB is created using the Teiid Designer.
The runtime folder has source and view model files,and in that I verified that the properties are set with spcified default values.
But seemslike they are not accessible via the metadata object in the table reference.
May be default values not being read, can you set a property and see if you can read?
I tried that as well but no luck.
I shall elaborate on that:
I created a "isCurrency" property with default value as false.
then for columns(in ViewModel) like Price,UnitPrice,Discount I applied this property with value as "true" using the teiid designer itself.
Then a vdb was created and in that within the runtime folder,the file had those properties with default values and also the values that I had set for specific columns.
So that part of the story is correct and works as expected.
So now the issue is, I dont know how can I get this extension property in the translator layer ( as described in the above dicussion)?
Does the current teiid implementation qualifies that the extension properties are also treated equal, and are read as part of the metadata using column.getProperties()?
Please attach a sample vdb and also which version are you using?
PFA the vdb and the delegate translator code for your perusal.
I have a quick question:
I am having extension properties set at the column level on the view model of the static vdb and not on the source model.
My source model visibility is set to false and view model visibility is set to true.
Could this be the reason that i dont get the extension properties in the runtime metadata,..
In the documentation its mentioned that runtime metadata is subset of the actual metadata....So actual metadata would consist extensn props but subset has only source metadata.
kindly correct me if I am wrong.
Also would like to know how it works in case of Dynamic vdbs.
Message was edited by: Amit Jahagirdar
It needs to be on source model, not on view model. A translator is or source model conversation. View model metadata is strictly for use by the Teiid engine purposes.
Thanks a lot Ramesh.