Hi,
I am still processing my mysql-db.
There are two classes: Asset and Portfolio that should be connected via a
"hat_position" edge.
On the edge, two fields should be created, which will eventually link to
other vertices.
I am expecting, the ETL to refer the asset-class for a record with "id" and
to create a link to portfolio
What happens is: An asset-record is created, the id-field is taken from the
assetposition_id output of the given query.
Question: How can I tell the etl-processor to use the output-fields of the
query correctly?
Thanks in advance
hartmut
The essential part of the json:
"extractor" : {
6 "jdbc": { "driver": "com.mysql.jdbc.Driver",
(...)
10 "query": "SELECT assets.id, `focuspositions`.`portfolio_id`,
*assetpositions.id
as assetposition_id* FROM assets INNER JOIN `assetpositions` ON
`assets`.`id` = `assetpositions`.`ib_id` INNER JOIN `focuspositions` ON
`assetpositions`.`focusposition_id` = `focuspositions`.`id`" }
11 },
12 "transformers" : [
13 { "vertex": { "class": "asset", "skipDuplicates":
true} },
14 { "edge": { "class": "hat_position", "direction" :
"out",
15 "joinFieldName": "id",
16 "edgeFields":{ "assetposition_id":
"$(input.assetposition_id)",
17 "focusposition_id":
"$(input.focusposition_id)"},
18 "lookup": "portfolio.id",
"unresolvedLinkAction": "WARNING" } }
19 ],
The msql-query gives
+-----+------------------+--------------+
> | id | assetposition_id | portfolio_id |
> +-----+------------------+--------------+
> | 59 | 2341 | 2 |
> | 79 | 2345 | 2 |
> | 4 | 2349 | 2 |
> | 18 | 3361 | 2 |
> | 114 | 3569 | 2 |
> | 151 | 4511 | 2 |
> | 30 | 5156 | 2 |
> | 246 | 6944 | 2 |
> | 271 | 7456 | 2 |
> | 331 | 9190 | 2 |
> +-----+------------------+--------------+
id and portfolio_id refer to existing asset- and portfolio-records,
The log shows:
BEGIN ETL PROCESSOR
> Started execution with 1 worker threads
> Start extracting
> [1:vertex] DEBUG Transformer input: {id:2341,portfolio_id:2}
> [1:vertex] DEBUG Transformer output: v(asset)[#55:1277]
> [1:edge] DEBUG Transformer input: v(asset)[#55:1277]
> [1:edge] DEBUG joinCurrentValue=2341, lookupResult=null
> [1:edge] INFO edge: WARN Cannot resolve join for value '2341'
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.