Hi Jonathan,

the concatenation seems to return a byte array because those are rendered into a string starting with "[B" when calling toString() on them.

I have no suggestion on how to get a different return value from that sql query.

To concatenate you could also use a transformer. Simply return all values separately and write a ScriptTransformer that concatenates them and returns them as java.lang.String.

cheers,
Chantal

Jonathan Hendler schrieb:
Hi All,

I have an SQL query that begins with "SELECT CONCAT (  'ID',
Subject.id  , ':' , Subject.name , ':L', Subject.level) as
subject_name" and the query runs great against MySQL from the command
line.
Since this is a nested entity, the schema.xml contains "<field
name="subject_name" type="string" indexed="true" stored="true"
multiValued="true" />"

After a full-import, a select output of the xml looks like

"<arr name="subject_name">
<str>[...@1db4c43</str>
<str>[...@6bcef1</str>
<str>[...@1df503b</str>
<str>[...@c5dbb</str>
<str>[...@1ddc3ea</str>
<str>[...@6963b0</str>
<str>[...@10fe215</str>
...
"

Without a CONCAT - it works fine.

Is this a bug?

Meanwhile - should I go about concatenating some where else in the DIH
config?

Thanks.

- Jonathan


Reply via email to