-
Type:
Bug
-
Status: Reopened (View Workflow)
-
Priority:
Critical
-
Resolution: Unresolved
-
Affects Version/s: 10.0.1
-
Fix Version/s: 11.1
-
Component/s: None
-
Labels:None
-
Environment:
MAC
I have a view model with UDF function defined as procedure and a table that uses this UDF procedure. Transformation SQL looks like this:
SELECT
|
udfConcatNull(hsqldbParts.PARTS.PART_NAME, hsqldbParts.PARTS.PART_WEIGHT) AS NAME_WEIGHT
|
FROM
|
hsqldbParts.PARTS
|
When I hit Preview Data on that table, the dynamic VDB that is generated looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
<vdb name="PREVIEW-fd6cadf2-4ae3-4d8f-9420-22f4882201e7" version="1"> |
<description>Importer VDB</description> |
<property name="UseConnectorMetadata" value="true" /> |
<property name="deployment-name" value="PREVIEW-fd6cadf2-4ae3-4d8f-9420-22f4882201e7-vdb.xml" /> |
<model name="view" type="VIRTUAL" visible="true"> |
<metadata type="DDL"><![CDATA[ |
CREATE VIEW tab (
|
NAME_WEIGHT string
|
)
|
AS
|
select udfConcatNull(hsqldbParts.PARTS.PART_NAME,hsqldbParts.PARTS.PART_WEIGHT) as NAME_WEIGHT from hsqldbParts.PARTS;
|
]]></metadata> |
</model> |
<model name="hsqldbParts" type="PHYSICAL" visible="true"> |
<source name="hsqldbParts" translator-name="oracle" connection-jndi-name="null" /> |
<metadata type="DDL"><![CDATA[ |
CREATE FOREIGN TABLE PARTS (
|
PART_ID string(4) NOT NULL OPTIONS(NAMEINSOURCE '"PART_ID"', NATIVE_TYPE 'CHAR', FIXED_LENGTH 'TRUE'),
|
PART_NAME string(255) OPTIONS(NAMEINSOURCE '"PART_NAME"', NATIVE_TYPE 'VARCHAR2'),
|
PART_COLOR string(30) OPTIONS(NAMEINSOURCE '"PART_COLOR"', NATIVE_TYPE 'VARCHAR2'),
|
PART_WEIGHT string(255) OPTIONS(NAMEINSOURCE '"PART_WEIGHT"', NATIVE_TYPE 'VARCHAR2'),
|
CONSTRAINT PK_PARTS PRIMARY KEY(PART_ID)
|
) OPTIONS(NAMEINSOURCE '"PARTSSUPPLIER"."PARTS"')
|
]]></metadata> |
</model> |
</vdb> |
If I see correctly, the UDF procedure is not in the dynamic VDB.
I know that the situation about dynamic VDBs and UDF functions in JAR files is complicated and I am not sure right now how this should be resolved.
But in my opinion the udf procedure should be in the dynamic VDB and there should be a warning that TD won't deploy the JAR to the server and if user wants to make a preview, the JAR should be deployed to the server manually. (If I remember correctly there is one when user is trying to generate dynamic VDB from static VDB with UDF function)
View model attached