Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{scrollbar}

h1. ?????? "??????????, ???\!"

???????? ?? ???????? ??????? ???????, ? ??? ???????????? ???????? ???????? ?????? ? PDI:
* ?????? ? ??????????????? Spoon
* ??????????????
* ???? ? ????????
* ???????????????? ??????????
* ??????????????? ???????? ? ?????????? ?? Spoon
* ?????????? ?????????????? ?? ???? ????????? ?????????? Pan.

h2. ????????

??? ?????? ?????????????? ??? ?????????? ?????? ??????? ? ???? ????? ? ??????? CSV ?????, ? ?????????? ??????? XML ???? ? ???????????? ??? ??????? ?? ???.

???? ?????????? CVS ????? ??? ????????? ?????:
{code}
???????,???
??????,????
????????,??????
???????,????
????????,?????
???????,???????
???????,????
{code}
?? ??????? XML ???? ????? ????????? ????? ????:
{code}
- <Rows>
  - <row>
        <msg>??????????, ????!</msg>
    </row>
  - <row>
        <msg>??????????, ??????!</msg>
    </row>
  - <row>
        <msg>??????????, ????!</msg>
    </row>
  - <row>
        <msg>??????????, ?????!</msg>
    </row>
  - <row>
        <msg>??????????, ???????!</msg>
    </row>
  - <row>
        <msg>??????????, ????!</msg>
    </row>
  </Rows>
{code}
????? ?????????? ??????? ?????????????? ????? ???????? ???? ??????????? ?? ?????.

? ????? ????? ?????????????? ??????? ?? ??????? ????? (Step) ????????? ?????????? (Hop). ?????? ???? ? ???????? ?????????? ???? ??????????? ??????? ??????. ?? ???? ???????, ??? ?????????????? _?????????????? ?? ????? ??????_.

h2. ?????????? ?????????

?? ??????? ?????????????? ?????????? ??????? ????? *Tutorial* ? ???????? ??????????? ??? ????? ?????? ?????. ? ??? ????? ???????? ??? ????? ?? ??????? ???????. ????? ????????? CSV ???? ? ??????????? ???? ???????????, ? ??????????? ? ????? *Tutorial* ??? ?????? *list.csv*.

h2. ?????????? ?? ??????????????

???????????? ?????? ????? ????????? ?? ??? ?????:
# ???????? ??????????????
# ?????????? ??????? ?????????????? ?? ????????? ????? ? ?????????
# ????????? ????? ? ???????????? ? ???????????? ?? ??? ????????

h3. ???????? ??????????????

# ??????? *New*, ????? ???????? *Transformation*. ???? ????????? ? ???? *File* ? ???????? *New*, ? ????? *Transformation*. ????? ???????? ?????????? ?????? *Ctrl-N*.
# ?????? *Transformation*, ?????? *Settings...*.
# ??????????? ???? ????????? ?????? ????????? ??? ??????????????. ?? ??? ??????? ??????? ?????????? ?????? ???? ???? ???????? ?????????????? (Transformation name) ? ???????? (Description), ????? ?????? *Save*.
# ????????? ?????????????? ? ???????? *Tutorial* ??? ?????? *hello*. ??? ???????? ??????? ???? *hello.ktr*.

h3. ?????????? ??????? ?????????????? ?? ????????? ????? ? ?????????

?? ????????? ????????? _?????_ ??????? ?????? ??????????????. ?? ????? ???????????? ????? ? ?????? ??????? ???????????? ????????? ?????????? ?? ???? (Input) ? ????? (Output) ?????? ??/??? ??????? ??????????/??????????. ?????? ?? ????? ?????????? ???, ????? ??? ?????????? ???????????? ????????? ??? ???????????? ???????, ???????? ??? ?????? ???????????? ?????????? ??? ???????????? ?????? ????????? ??????.

_???????_ ??? ??????????? ????????????? ???????? ?????? ????? ????? ?????? ?? ????????? ? ?????????. ?????? ???????????? ?? ????????? ???????? ????????? ?? ???? ????????? ?????? (Output Data) ? ????????????? ??? ????????? ?? ???? ???????? ?????? (Input Data). ? ?????? ???????? ???? ?????? ???? ?????? ? ???? ?????????, ?? ????? ??????? ????????? ????????? ??????? ????? ???????? ?? ?????? ????. ??? ????? ??????? ????????? ?????? ????? ???? ??????????? ??? ???????????? ????? ?????? ?? ??????????. ??????????, ?????? ??? ???? ??? ????? ????????? ????????????? ????. ? ????? ??????? ??? ?????? ???????? ???????????? ?????????? ???????? ?????? ?? ?????????? ??????????, ????? ??????? ?????? ????? ????????? ??????.

?????????????? ?????? ????????? ????????? ???????:
* ???????? ?????? ?? ????? ??????? CSV
* ???????????? ???????????
* ????????? ??????????? ? ????? ??????? XML

??? ??????? ?? ???? ??????? ?????????? ???????????? ????????? ????, ???????? ?????????????? ???? ?????:

!PDI-Hello-World-3-1.png!

? ?????? ??????? ???????? ????? ???????? ? ?????? ?????????? ??? ???? ? ??????, ??? ??????????? ?????????????? ????? ???????, ?? ??? ?????? ?? ??????.

??? ???? ????? ?????? ????????? ?????????????? ??????????:
# ? ???? ?????????? Spoon ??????????? ?????? *Steps Palette*, ? ??? ???????? ????????? *Input*.
# ?????????? ?????? *CSV file* ? ??????? ??????? ??????.
# ???????? ????????? *Scripting*.
# ?????????? ?????? *Modified JavaScript Value* ? ??????? ???????.
# ???????? ????????? *Output*.
# ?????????? ?????? *XML Output* ? ??????? ???????.

?????? ?????????? ???????????? ????? ????? *CSV file input* ? *Modified Java Script Value* ?????? ???????:
# ??????? ?????? ??????? ????.
# ????????? ?? ?????????? *Shift* ??????????? ?????? ?? ?????? ??????? ????.
# ?????????? ????? ????? *Modified Java Script Value* ? *XML Output* ???????? ????????.

!PDI-Hello-World-3-2.png!

h3. ????????? ????? ? ???????????? ? ???????????? ?? ??? ????????

??? ??????? ?? ????? ????????????? ???? ??????????????? ????????. ? ?????? ???? ??????????????? ????????? ???????????? ?????????????? ??????????? ??????? ???? ????? ? ????????? ? ??????? ??? ?????????. ??? ???? ???????????? ???? (Step Name) ?????????? ??? ??????????? ? ??????????????, ?? ????? ?? ?????????????? ??????????? ????. ???????? ???? (Step Description) ???????? ????????? ???? ?????????? ????, ? ????? ?? ?????? ?? ?????????????? ???????????.

h4. ????????? ???? ???? ?? CSV ????? (CSV file input)

# ?????? ??????? ?? ??? *CSV file input*.
# ????????? ???? ???????? ??? ????? ????. ???? ?????????? ??????? ????????????, ?????? ? ? ??????? ?????????? ????? ??? ????????.
# ???????? ???????????? ???????? ??-????????? ? ???? *Step name* ?? ????? ??????????????? ??????????? ?? ?????? ??? ???????. ??? ??????? ??????? ??????? ??? *????????? ?????? ????*.
# ? ???? *Filename* ??????? ???????? ? ???????????? ????????? ?????.
{quote}
*{_}??????????:_* ?????? ?? ???? ????? ????????? ?????? ? ???? ???????? ???????. ??? ?????????? ??????????? ????????????? ? ?????? ???? ??????????, ????? ??? ??????????? ????? ? ?????? ????. ?????????? ????? ???? ??????? ??????? $\{name_of_the_variable\} ??? ??????? ?? ?????? ? ???? ??????????, ??? ???? ??????? ???????????? ?????? *Ctrl-??????*. ? ?????? ???? ???????????? ???????????????? ?????????? ? ?????????? ???????? ?????????????, ?? ??? ??? ?????????? ?? ??????????, ?? ? ?????? ????? ???? ???????????????? ??????????. ????? ??? ?????????? ???????:
{code}
${Internal.Transformation.Filename.Directory}
{code}
????? ?????????? ????????? ????????? ????? ? ??? ????? ?????????? ??????????????:
{code}
${Internal.Transformation.Filename.Directory}/list.csv
{code}
????? ??????? ???????? ?????? ?????????? ????? ???????? ? ???????? ? ???? ???? ? ???????? ??? ???? ????????? ?????????????. ????? ?????????????? ????? ?????? ???? *list.csv* ? ?????? ????????.
{quote}
# ??????? ?????? *Get Fields* ????????? ?????? ???????????? ???????? ? ????????? ?????? ?? ????????? ?????. ?????????????? ??? ? ????? ???? ????????? (??? ????? ? ???? *Header row present* ?????? ?????? ???????).
{quote}
*{_}??????????:_* ?????? *Get Fields* ?????????? ?? ?????? ????? ????? ? ???????? ? ???? ????????. ??? ?????????? ??? ???????? ????????? ?????? ?? ??????? ?????????? ??? ?? ?????????? ?????. ??? ???? ??? ??? ????? ????????? ???????, ?? ??? ?????? ????????? ????? ??????????? ??? ????????? ????????? ????? ? ??? ???? ?????????????? ????????????? ?? ????.
{quote}
# ?????? ????????? ???????? ???????????? ???????? ?? ?????. ??? ??????? ??????? ??? *???????* ? *???*:
!PDI-Hello-World-3-34.png|thumbnail!
# ????? ??????? ? ???? *{_}Lazy conversion?_*.
{quote}
*{_}??????????:_* ??? ?????? ? ??????? ??????????? ????? ????????? ????? ????? ????? ????????? ????????? ?????? ????? ???? ?????? ?? ?????? ? ???? *File encoding* ??????????????? ????????.
{quote}
# ?????? *Preview* ? ??????????????, ??? ???? ????? ????????? ????????. ?????????? ?? ????? ?????? ?????? ??????????? ? ??????????? ????.
# ?????? *OK* ??? ?????????? ? ???????? ???????? ??? ???? *CSV file input*.

h4. ???????????? ???? JavaScript ??? ??????????? ???????? (Modified JavaScript Value)

# ?????? ??????? ?? ??? *Modified JavaScript Value*.
# ????????? ???? ???????? ??? ????? ????. ?????? ???? ?????????? ?? ??????????? ???????????? ????????? ???????????? ???? ?? ????? JavaScript. ??? ?????????? ??? ???????? ????? ?? ???? ??????, ????????? ??????????? *"??????????, "* ? ?????? ?? ????.
# ??????? ?????? ??? *???????? ???????????*.
# ??????????? ??????? ???? ???????? ????????????? ??? ????? ????. ? ????? ?????? ??????????? ????? ????????? ??? ????????????? ??? ????????? ???? ???????. ??? ???? ????? ?????? ???????????? ??? ?????? *Input fields* ? *Output fields* ??????? ? ?????????????. ??? ??????? ??????? ??????????? ??? ????: *???????* ? *???*. ?????? ????????? ???:
{code}
var ??????????? = '??????????, ' + ???.getString() + "!";
{code}
{quote}
*{_}??????????:_* ??????? *???.getString()* ????? ?????? ??????? ??? ?????? ?????? ?? ?????? ???? ? ?????????????? ?????? ???????.
{quote}
# ? ?????? ????? ???? ?????????? ?????? ??????????? ? ?????????? ?????????? ??????? ??????????. ? ?????? ??????? ??????? ?????????? *???????????*. ??? ??? ???????? ?????? ?????????? ?????? ???? ???????? ? ???? ? ??????????? ??????????????, ???????????? ?????? ?????????? ??????? ??????? ? ??????. ????????? ????? ????? ????????? ???:
!PDI-Hello-World-3-4.png|thumbnail!
{quote}
(!) *{_}????????:_* ?? ??????? ?????? ?????????? ?????? ??????? ? ??????????? ?????????? PDI, ??? ?? ???? ? ????.
{quote}
{quote}
*{_}??????????:_* ??? ????????????? ????????? ???????? ? ????????? ????????? ?????? PDI ??????? ???? *Compatibility mode?* ???????? ????????.
{quote}
# ?????? *OK* ??? ?????????? ? ???????? ???????? ??? ???? *Step Modified Script Value*.
# ??????? ?????? ?????? ??? ?????????????????? ????. ?? ?????? ???? ?????????? ?????????? ?????? ???? ? _???????? ????? (Input Field)_ ? ???????? ?? ???? ?????? ? _????????? ????? (Output Field)_. _???????? ????_ ????????? ?? ?????? ????. _????????? ????_ ???????? ?????? ???. ?????? ??? ?????????? ????????????? ???????? ??????????? ??????. ?? ? ?????? ???????, ???????? ??????????? ?????? ?? ???????? ??? ????????? ?????????? ?????? ???? ????????? ????. ?? ???? ????, ??????? ????????? ???????? ? ???????? ?????, ???????? *Calculator*. ????? ???? ???? ???????????? ?????????? ? ?????????????? ??????????? ??????, ? ?????????? _????????? ????_ ?????? _???????? ?????_, ???????? *Group by*.
# ?????? ?????? ??????? ???? ??? ??????? ? ???????????? ????.
# ??????? *Show Input Fields*. ? ??????????? ???? ????? ??????? ???????? ???? *???????* ? *???*, ?????????? ?? ?????????? ????.
# ??????? *Show Output Fields*. ? ??????????? ???? ?????, ??? ? ??????????? ???? ???????? ??? ?????????, ?? ?????????? ???? ????? ???? *???????????*.
{scrollbar}