Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml TEID Springboot启动程序文件数据源_Xml_Spring Boot_File_Teiid - Fatal编程技术网

Xml TEID Springboot启动程序文件数据源

Xml TEID Springboot启动程序文件数据源,xml,spring-boot,file,teiid,Xml,Spring Boot,File,Teiid,使用Teiid Springboot,我想使用磁盘上的xml文件。我曾经使用过旧的EAP/Wildfly TEID项目,解决这个问题的方法是使用一个资源适配器,然后调用一个过程来读取数据 使用Springboot,我需要采取哪些步骤来创建可在DDL VDB中使用的数据源/资源适配器。 我已经看过下面的FTP示例,因此我的假设是创建一个FileConnectionFactory: 但是,DDL文件没有用处,我的首选是解析DDL中的XML(除非有更好的方法在我的DDL中公开此数据)。使用基于DDL的

使用Teiid Springboot,我想使用磁盘上的xml文件。我曾经使用过旧的EAP/Wildfly TEID项目,解决这个问题的方法是使用一个资源适配器,然后调用一个过程来读取数据

使用Springboot,我需要采取哪些步骤来创建可在DDL VDB中使用的数据源/资源适配器。 我已经看过下面的FTP示例,因此我的假设是创建一个FileConnectionFactory:
但是,DDL文件没有用处,我的首选是解析DDL中的XML(除非有更好的方法在我的DDL中公开此数据)。

使用基于DDL的VDB时,可以通过在
应用程序中提供以下属性来定义基于文件的连接。属性

spring.teiid.file.foo.parent-directory=path/to/myfile
其中,
foo
是您的文件资源名,需要在VDB中使用,例如:(
accounts
是为架构指定的名称)

然后在视图转换中,您可以使用上面的模式并按如下方式读取文件:

create view something(...) AS
  select x.* from 
    (exec accounts.getTextFiles()) f, 
    xmltable('/a' PASSING xmlparse(document f.file) COLUMNS first string, second integer) x
有关使用
xmltable
的更多详细信息,请参阅

create view something(...) AS
  select x.* from 
    (exec accounts.getTextFiles()) f, 
    xmltable('/a' PASSING xmlparse(document f.file) COLUMNS first string, second integer) x