ParseDN behaving differently on different drivers

Fighting the whole day with this. Here's a trace from the DelimitedTextDriver - you can see that both ParseDNs are returning the correct value that was expected (the last one in the path):

Action: do-set-local-variable("lv_CurrentUnitCN",scope="policy",token-parse-dn(length="1",start="-1",token-op-attr("CANNONICAL_PATH_IDS"))).
[06/07/24 16:08:45.731]:OrgStructure Driver PT: arg-string(token-parse-dn(length="1",start="-1",token-op-attr("CANNONICAL_PATH_IDS")))
[06/07/24 16:08:45.732]:OrgStructure Driver PT: token-parse-dn(length="1",start="-1",token-op-attr("CANNONICAL_PATH_IDS"))
[06/07/24 16:08:45.732]:OrgStructure Driver PT: token-parse-dn(length="1",start="-1",token-op-attr("CANNONICAL_PATH_IDS"))
[06/07/24 16:08:45.733]:OrgStructure Driver PT: token-op-attr("CANNONICAL_PATH_IDS")
[06/07/24 16:08:45.733]:OrgStructure Driver PT: Token Value: "693\2013".
[06/07/24 16:08:45.734]:OrgStructure Driver PT: Arg Value: "693\2013".
[06/07/24 16:08:45.734]:OrgStructure Driver PT: Token Value: "2013".
[06/07/24 16:08:45.734]:OrgStructure Driver PT: Arg Value: "2013".
[06/07/24 16:08:45.734]:OrgStructure Driver PT: Action: do-set-local-variable("lv_CurrentUnitName",scope="policy",token-parse-dn(length="1",start="-1",token-op-attr("CANONICAL_PATH_BG"))).
[06/07/24 16:08:45.735]:OrgStructure Driver PT: arg-string(token-parse-dn(length="1",start="-1",token-op-attr("CANONICAL_PATH_BG")))
[06/07/24 16:08:45.736]:OrgStructure Driver PT: token-parse-dn(length="1",start="-1",token-op-attr("CANONICAL_PATH_BG"))
[06/07/24 16:08:45.736]:OrgStructure Driver PT: token-parse-dn(length="1",start="-1",token-op-attr("CANONICAL_PATH_BG"))
[06/07/24 16:08:45.737]:OrgStructure Driver PT: token-op-attr("CANONICAL_PATH_BG")
[06/07/24 16:08:45.737]:OrgStructure Driver PT: Token Value: "Столична община\Направление "ДИГИТАЛИЗАЦИЯ, ИНОВАЦИИ И ИКОНОМИЧЕСКО РАЗВИТИЕ"".
[06/07/24 16:08:45.738]:OrgStructure Driver PT: Arg Value: "Столична община\Направление "ДИГИТАЛИЗАЦИЯ, ИНОВАЦИИ И ИКОНОМИЧЕСКО РАЗВИТИЕ"".
[06/07/24 16:08:45.739]:OrgStructure Driver PT: Token Value: "Направление "ДИГИТАЛИЗАЦИЯ, ИНОВАЦИИ И ИКОНОМИЧЕСКО РАЗВИТИЕ"".
[06/07/24 16:08:45.739]:OrgStructure Driver PT: Arg Value: "Направление "ДИГИТАЛИЗАЦИЯ, ИНОВАЦИИ И ИКОНОМИЧЕСКО РАЗВИТИЕ"".



Here's also a trace from the OracleDriver - you can see that both ParseDNs are returning a strange string (the whole value without the slashes):

Action: do-set-local-variable("lv_CurrentUnitCN",scope="driver",token-parse-dn(length="1",start="-1",token-attr("PK_CANONICAL_PATH_IDS"))).
[08/09/24 16:46:45.469]:HeRMeS PT: arg-string(token-parse-dn(length="1",start="-1",token-attr("PK_CANONICAL_PATH_IDS")))
[08/09/24 16:46:45.469]:HeRMeS PT: token-parse-dn(length="1",start="-1",token-attr("PK_CANONICAL_PATH_IDS"))
[08/09/24 16:46:45.469]:HeRMeS PT: token-parse-dn(length="1",start="-1",token-attr("PK_CANONICAL_PATH_IDS"))
[08/09/24 16:46:45.470]:HeRMeS PT: token-attr("PK_CANONICAL_PATH_IDS")
[08/09/24 16:46:45.470]:HeRMeS PT: Token Value: "693\2018\2019\2697".
[08/09/24 16:46:45.470]:HeRMeS PT: Arg Value: "693\2018\2019\2697".
[08/09/24 16:46:45.470]:HeRMeS PT: Token Value: "693201820192697".
[08/09/24 16:46:45.470]:HeRMeS PT: Arg Value: "693201820192697".
[08/09/24 16:46:45.470]:HeRMeS PT: Action: do-set-local-variable("lv_CurrentUnitName",scope="driver",token-parse-dn(length="1",src-dn-format="src-dn",start="-1",token-attr("CANONICAL_PATH_BG"))).
[08/09/24 16:46:45.471]:HeRMeS PT: arg-string(token-parse-dn(length="1",src-dn-format="src-dn",start="-1",token-attr("CANONICAL_PATH_BG")))
[08/09/24 16:46:45.471]:HeRMeS PT: token-parse-dn(length="1",src-dn-format="src-dn",start="-1",token-attr("CANONICAL_PATH_BG"))
[08/09/24 16:46:45.471]:HeRMeS PT: token-parse-dn(length="1",src-dn-format="src-dn",start="-1",token-attr("CANONICAL_PATH_BG"))
[08/09/24 16:46:45.472]:HeRMeS PT: token-attr("CANONICAL_PATH_BG")
[08/09/24 16:46:45.472]:HeRMeS PT: Token Value: " Столична община\Направление "ОБЩЕСТВЕНО СТРОИТЕЛСТВО"\Дирекция "ИЗГРАЖДАНЕ И РЕМОНТ НА УЛИЧНАТА МРЕЖА"\Отдел "Поддръжка на уличната мрежа"".
[08/09/24 16:46:45.472]:HeRMeS PT: Arg Value: " Столична община\Направление "ОБЩЕСТВЕНО СТРОИТЕЛСТВО"\Дирекция "ИЗГРАЖДАНЕ И РЕМОНТ НА УЛИЧНАТА МРЕЖА"\Отдел "Поддръжка на уличната мрежа"".
[08/09/24 16:46:45.473]:HeRMeS PT: Token Value: "Столична общинаНаправление "ОБЩЕСТВЕНО СТРОИТЕЛСТВО"Дирекция "ИЗГРАЖДАНЕ И РЕМОНТ НА УЛИЧНАТА МРЕЖА"Отдел "Поддръжка на уличната мрежа"".
[08/09/24 16:46:45.473]:HeRMeS PT: Arg Value: "Столична общинаНаправление "ОБЩЕСТВЕНО СТРОИТЕЛСТВО"Дирекция "ИЗГРАЖДАНЕ И РЕМОНТ НА УЛИЧНАТА МРЕЖА"Отдел "Поддръжка на уличната мрежа"".

I was expecting to get:

2697

and 

Отдел "Поддръжка на уличната мрежа"

.

Anyone seen this before? Or am I missing something.

Cheers

  • Verified Answer

    +1  

    The source and destination 'format's in ParseDN are specified by the source and destination.  Which sounds silly, but that means, Sub channel, Source format is always slash (o\ou\user).  The destination in the Sub channel is up to and specified by the driver.

    Thus in the Pub channel, the source format is pretty much going to differ on a regular basis.

    You are comparing a JDBC to CSV driver. If the default of source format is not working then manually select the format you want which in the PK_CANONICAL_PATH_IDS case is slash, and also in the CANONICAL_PATH_BG case as well.

    ParseDN is so flexible that it even has a custom mode that allows you to define a NEW type of DN structure.  It is very cool You can read more about how this works in the article I wrote 14 years ago (!!!! Wild, 14 years ago!)

     Parse DN Custom DN Delimiter Example 

  • 0 in reply to   

    :) slash was the one type I haven't tried (must be planet Mercury's fault). Thanks Geoffrey, I have the book with the cat and consult it everytime I need, but this is something I've done so many times and now with these two drivers it was driving me crazy. Both parsedns are working fine now.

  • 0   in reply to 

    Glad the book helps I did update it to IDM 4.8.6 level of updates.