teiid importer.schemaPattern属性无效。

huangapple 未分类评论47阅读模式
英文:

teiid importer.schemaPattern property didn't work

问题

以下是已经翻译好的部分:

我正在尝试使用以下 XML 创建一个带有 MySQL 数据源的 VDB:

<vdb name="my_vdb" version="1">
  <model name="my_vdb" visible="true">
    <property name="importer.schemaPattern" value="xxxx"/>
    <source connection-jndi-name="java:/mysql234" name="mysql234" translator-name="mysql"/>
  </model>
</vdb>

VDB 已经创建,但是 MySQL 数据源中的所有模式都被加载到了 VDB 中。我应该如何做才能只在一个模型中加载一个模式?

英文:

I'm trying create vdb with mysql datasource use below xml:

&lt;vdb name=&quot;my_vdb&quot; version=&quot;1&quot;&gt;
  &lt;model name=&quot;my_vdb&quot; visible=&quot;true&quot;&gt;
    &lt;property name=&quot;importer.schemaPattern&quot; value=&quot;xxxx&quot;/&gt;
    &lt;source connection-jndi-name=&quot;java:/mysql234&quot; name=&quot;mysql234&quot; translator-name=&quot;mysql&quot;/&gt;
  &lt;/model&gt;
&lt;/vdb&gt;

vdb created,but all schema in mysql datasource were loaded in vdb,How could i do to just load one schema in one model

答案1

得分: 0

你应该创建一个问题(issue)或者在StackOverflow上发布一个帖子,但通常不要两者都做。我将https://github.com/teiid/teiid/issues/1263标记为已解决,并将评论移到这里:

这里提供的信息有限。vdb片段显示了正确的设置。你实际从源获取的模式(schema)是什么样的?请记住,模式匹配是像匹配字符串一样的,因此元字符%和_可能会有问题。此外,对于schemaPattern的支持来自驱动程序的DatabaseMetaData实现 - 你使用的是哪个驱动程序?

英文:

You should open an issue or create a stackoverflow post, but generally not both. I'm marking https://github.com/teiid/teiid/issues/1263 as resolved and moving the comment here:

There's not much to go by here. The vdb snippet shows the correct setting. What schema are you actually getting from the source? Keep in mind that the pattern is like match string, so the meta characters % and _ can be problematic. Also the support for the schemaPattern is coming from the driver's implementation of DatabaseMetaData - what driver are you using?

huangapple
  • 本文由 发表于 2020年4月6日 22:36:01
  • 转载请务必保留本文链接:https://java.coder-hub.com/61062247.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定