Using Teiid Springboot I would like to consume xml files from disk. I used to work with the old EAP/Wildfly Teiid project and the way to solve this was to use a resource adapter and then call a procedure to read the data.
With Springboot what steps do I need to take to create a datasource/resource adapter that can be used in my DDL VDB. I already had a look at the FTP example below, so my assumption would be to create a FileConnectionFactory: https://github.com/teiid/teiid-spring-boot/tree/master/samples/ftp However, there is no use of a DDL file and my preference is to parse the XML in the DDL (unless there is a better way to expose the this data in my DDL).
When using DDL based VDB, you can define the file-based connection by supplying the following properties in the
application.properties
where
foo
is your file resource name, which needs to be used in VDB, for example: (accounts
is the name given for schema)then in a view transformation, you can use the above schema and read the file as
For more details about using
xmltable
see http://teiid.github.io/teiid-documents/master/content/reference/r_xmltable.html