Hi all,
I am running through the quick start exercises here: Hello World Teiid Data Federation Example - Teiid Examples - Project Documentation Editor
I have configured the connections to the data sources in standalone-teiid.xml, created the vdb.xml, started the wildfly server, but I am getting error when deploying the vdb.
In the example, they are using a h2 database connection, however, in my case, I am using sql server.
I am getting following error: Reason:TEIID60013 Duplicate Table check_constraints: org.teiid.metadata.DuplicateRecordException:
Here is my vdb.xm
<vdb name="Portfolio" version="1">
<description>The Portfolio VDB</description>
<model name="marketdata" type="PHYSICAL">
<source name="text-connector" translator-name="file" connection-jndi-name="java:/marketdata-file"/>
</model>
<model name="accounts" type="PHYSICAL">
<property name="importer.useFullSchemaName" value="false"/>
<property name="importer.tableTypes" value="TABLE,VIEW"/>
<source name="sql-connector" translator-name="sqlserver" connection-jndi-name="java:/accounts-ds"/>
</model>
<model name="Portfolio" type="VIRTUAL">
<metadata type="DDL"><![CDATA[
CREATE VIEW StockPrice (
symbol string,
price bigdecimal
) AS
SELECT SP.symbol, SP.price
FROM (EXEC MarketData.getTextFiles('*.txt')) AS f,
TEXTTABLE(f.file COLUMNS symbol string, price bigdecimal HEADER) AS SP;
CREATE VIEW AccountValues (
LastName string PRIMARY KEY,
FirstName string,
StockValue bigdecimal
) AS
SELECT c.lastname as LastName, c.firstname as FirstName, sum((h.shares_count*sp.price)) as StockValue
FROM Customer c JOIN Account a on c.SSN=a.SSN
JOIN Holdings h on a.account_id = h.account_id
JOIN product p on h.product_id=p.id
JOIN StockPrice sp on sp.symbol = p.symbol
WHERE a.type='Active'
GROUP BY c.lastname, c.firstname;
]]> </metadata>
</model>
</vdb>
All help is appreciated
Thanks,
Shiloh