Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 38 Next »

Unknown macro: {scrollbar}

?????? "??????????, ???!"

???????? ?? ???????? ??????? ???????, ? ??? ???????????? ???????? ???????? ?????? ? PDI:

  • ?????? ? ??????????????? Spoon
  • ??????????????
  • ???? ? ????????
  • ???????????????? ??????????
  • ??????????????? ???????? ? ?????????? ?? Spoon
  • ?????????? ?????????????? ?? ???? ????????? ?????????? Pan.

????????

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

???? ?????????? CVS ????? ??? ????????? ?????:

???????,???
??????,????
????????,??????
???????,????
????????,?????
???????,???????
???????,????

?? ??????? XML ???? ????? ????????? ????? ????:

<Rows>
 ?<Row>
       <message>??????????, ????!</message>
  </Row>
 ?<Row>
       <message>??????????, ??????!</message>
  </Row>
 ?<Row>
       <message>??????????, ????!</message>
  </Row>
 ?<Row>
       <message>??????????, ?????!</message>
  </Row>
 ?<Row>
       <message>??????????, ???????!</message>
  </Row>
 ?<Row>
       <message>??????????, ????!</message>
  </Row>
</Rows>

????? ?????????? ??????? ?????????????? ????? ???????? ???? ??????????? ?? ?????.

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

?????????? ?????????

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

?????????? ?? ??????????????

???????????? ?????? ????? ????????? ?? ??? ?????:

  1. ???????? ??????????????
  2. ?????????? ??????? ?????????????? ?? ????????? ????? ? ?????????
  3. ????????? ????? ? ???????????? ? ???????????? ?? ??? ????????

???????? ??????????????

  1. ?????? New, ????? ??????? Transformation, ??? ? ???? File ? ??????? New, ? ????? Transformation. ????? ???????? ?????????? ?????? Ctrl-N.
  2. ?????? Transformation, ?????? Settings....
  3. ??????????? ???? ????????? ?????? ????????? ??? ??????????????. ?? ??? ??????? ??????? ?????????? ?????? ???? ????? ???????? ?????????????? (Transformation name) ? ???????? (Description), ????? ?????? Save.
  4. ????????? ?????????????? ? ???????? Tutorial ??? ?????? hello. ??? ???????? ??????? ???? hello.ktr.

?????????? ??????? ?????????????? ?? ????????? ????? ? ?????????

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

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

?????????????? ?????? ????????? ????????? ???????:

  • ???????? ?????? ?? ????? ??????? CSV
  • ???????????? ???????????
  • ????????? ??????????? ? ????? ??????? XML

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

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

??? ???? ????? ?????? ????????? ?????????????? ??????????:

  1. ? ???? ?????????? Spoon ??????????? ?????? Steps Palette, ? ??? ???????? ????????? Input.
  2. ?????????? ?????? CSV file ? ??????? ??????? ??????.
  3. ???????? ????????? Scripting.
  4. ?????????? ?????? Modified JavaScript Value ? ??????? ???????.
  5. ???????? ????????? Output.
  6. ?????????? ?????? XML Output ? ??????? ???????.

?????? ?????????? ???????????? ????? ????? CSV file input ? Modified Java Script Value ?????? ???????:

  1. ??????? ?????? ??????? ????.
  2. ????????? ?? ?????????? Shift ??????????? ?????? ?? ?????? ??????? ????.
  3. ?????????? ????? ????? Modified Java Script Value ? XML Output ???????? ????????.

????????? ????? ? ???????????? ? ???????????? ?? ??? ????????

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

????????? ???? ???? ?? CSV ????? (CSV file input)

  1. ?????? ?????? ?? ??? CSV file input.
  2. ????????? ???? ???????? ??? ????? ????. ? ??? ?????????? ??????? ????????????, ?????? ? ? ??????? ?????????? ????? ??? ????????.
  3. ???????? ???????????? ???????? -??????? ? ????? Step name ?? ????? ??????????????? ??????????? ?? ?????? ??? ?????. ??? ??????? ??????? ??????? ??? ??????? ?????? ????.
  4. ? ????? Filename ?????? ???????? ? ???????????? ????????? ?????.

    ????????: ?????? ?? ???? ????? ????????? ?????? ? ???? ???????? ???????. ??? ?????????? ??????????? ????????????? ? ?????? ???? ??????????, ????? ??? ??????????? ????? ? ?????? ????. ?????????? ????? ???? ??????? ??????? ${name_of_the_variable} ??? ??????? ?? ?????? ? ???? ??????????, ??? ???? ??????? ???????????? ?????? Ctrl-????. ? ?????? ???? ???????????? ???????????????? ?????????? ? ?????????? ???????? ?????????????, ?? ??? ??? ?????????? ?? ??????????, ?? ? ?????? ????? ???? ???????????????? ??????????. ????? ??? ?????????? ???????:

    ${Internal.Transformation.Filename.Directory}
    

    ????? ?????????? ????????? ????????? ????? ? ??? ????? ?????????? ??????????????:

    ${Internal.Transformation.Filename.Directory}/list.csv
    

    ????? ??????? ???????? ?????? ?????????? ????? ???????? ? ???????? ? ???? ???? ? ???????? ??? ???? ????????? ??????????????. ????? ?????????????? ????? ?????? ???? list.csv ? ?????? ????????.

  5. ??????? ?????? Get Fields ????????? ?????? ???????????? ???????? ? ????????? ?????? ?? ????????? ???. ?????????????? ??? ? ????? ???? ????????? (? ????? ? ????? Header row present ?????? ?????? ???????).

    ??????????: ?????? Get Fields ?????????? ?? ?????? ????? ????? ? ???????? ? ???? ????????. ??? ?????????? ??? ???????? ????????? ?????? ?? ??????? ?????????? ??? ?? ?????????? ?????. ??? ???? ??? ??? ????? ????????? ???????, ?? ??? ?????? ????????? ????? ??????????? ??? ????????? ????????? ????? ? ??? ???? ?????????????? ????????????? ?? ????.

  6. ?????? ????????? ???????? ???????????? ???????? ?? ???. ??? ??????? ??????? ??? ??? ? ?:
  7. ????? ??????? ? ????? Lazy conversion?.

    ??????????: ??? ?????? ? ??????? ??????????? ????? ????????? ????? ????? ????? ????????? ????????? ?????? ????? ???? ?????? ?? ?????? ? ????? File encoding ??????????????? ????????.

  8. ?????? Preview ? ??????????????, ??? ???? ????? ????????? ????????. ?????????? ?? ????? ?????? ?????? ??????????? ? ??????????? ????.
  9. ?????? OK ??? ?????????? ? ???????? ???????? ??? ???? CSV file input.

???????????? ???? JavaScript ??? ??????????? ???????? (Modified JavaScript Value)

  1. ?????? ?????? ?? ??? Modified JavaScript Value.
  2. ????????? ???? ???????? ??? ????? ??. ?????? ???? ?????????? ?? ??????????? ???????????? ????????? ???????????? ???? ?? ????? JavaScript. ??? ?????????? ??? ???????? ????? ?? ???? ??????, ????????? ??????????? "????????, " ? ?????? ?? ????.
  3. ??????? ?????? ??? ???????? ???????????.
  4. ??????????? ??????? ???? ???????? ????????????? ??? ????? ??. ? ????? ?????? ??????????? ????? ????????? ??? ????????????? ??? ????????? ???? ???????. ??? ???? ????? ?????? ???????????? ??? ?????? Input fields ? Output fields ??????? ? ?????????????. ??? ??????? ??????? ??????????? ??? ????: ??? ? ?. ?????? ????????? ???:
    var message = '??????????, ' + ???.getString() + "!";
    

    ????????: ??????? ?.getString() ????? ?????? ??????? ??? ?????? ?????? ?? ?????? ???? ? ?????????????? ?????? ???????.

  5. ? ?????? ????? ???? ?????????? ?????? ??????????? ? ?????????? ?????????? ??????? ??????????. ? ?????? ??????? ??????? ?????????? message. ??? ??? ???????? ?????? ?????????? ?????? ???? ???????? ? ???? ? ??????????? ??????????????, ???????????? ?????? ?????????? ??????? ??????? ? ??????. ????????? ????? ????? ????????? ???:

    ????????: ?? ??????? ?????? ?????????? ?????? ??????? ? ??????????? ?????????? PDI, ??? ?? ???? ? ????.

    ??????????: ??? ????????????? ????????? ???????? ? ????????? ????????? ?????? PDI ??????? ????? Compatibility mode? ???????? ????????.

  6. ?????? OK ??? ?????????? ? ???????? ???????? ??? ???? Step Modified Script Value.
  7. ??????? ?????? ?????? ??? ?????????????????? ??. ?? ?????? ???? ?????????? ?????????? ?????? ???? ? ?????? ????? (Input Field) ? ???????? ?? ???? ?????? ? ????????? ????? (Output Field). ???????? ?? ????????? ?? ?????? ????. ??????? ?? ???????? ?????? ???. ?????? ??? ?????????? ????????????? ???????? ??????????? ??????. ?? ? ?????? ???????, ???????? ??????????? ?????? ?? ???????? ??? ????????? ?????????? ?????? ???? ????????? ????. ?? ???? ????, ??????? ????????? ???????? ? ???????? ?????, ???????? Calculator. ????? ???? ???? ???????????? ?????????? ? ?????????????? ??????????? ??????, ? ?????????? ??????? ?? ?????? ?????? ?????, ???????? Group by.
  8. ?????? ?????? ??????? ???? ??? ??????? ? ???????????? ????.
  9. ??????? Show Input Fields. ? ??????????? ???? ????? ??????? ???????? ???? ????? ? ?, ?????????? ?? ?????????? ????.
  10. ??????? Show Output Fields. ? ??????????? ???? ?????, ??? ? ??????????? ???? ???????? ??? ?????????, ?? ?????????? ???? ????? ???? message.

???????????? ???? ????? ? XML ???? (XML Output)

  1. ?????? ?????? ?? ??? XML Output. ????????? ???? ??? ??????? ???? ????. ?? ?????? ???? ???????????? ????? ???????????? ? ???????? ????? ? ??????????? ?????????? ??????????????. ????? ???????? ????, ??????? ?????????? ????????? ? ?????? ????. ??? ?????? ????? ???? ????????, ??? ??? ???? ????????? ??????? ????, ??? ? ????????? ???? ?? ??????.
  2. ?? ??????? File ?????? ???????? ???????? ?????? ??????????? ??? ??????? ????.
  3. ? ????? File ??????:
    ${Internal.Transformation.Filename.Directory}/hello.xml
    
  4. ??????? ?? ??????? Fields ? ?????? ?????? Get Fields, ? ?????? ????? ???????? ??? ???? ??? ????. ??? ?????????? ????? ?????????? ?????? ???? message, ??????? ?????????? ??????? ???? ? ? ???????.
  5. ?????? OK ??? ?????????? ? ???????? ???????? ??? ???? XML Output.
  6. ????????? ??????????????.

???????? ??????

??? ?????????? ?????????????? ??????????? ??? ???? ??????????? ??????????. ??- ????, ??? ?????????????? ????????? ?????? ??????????, ???????? ?????????? ????????? ????? ???????????. ?????? ??????????? ?????? ?????? ?????????? ?? ????????? ???? ?? ?????? ????????? ?????? ??????. ?????????? ?? ???????? ??? ??????????? ??????????????, ??? ??? ??? ????? ?????? ?????? ?? ?????????? ??????????.

????????? ??????? "??????, ???!" ??????????? ?????????. ?????????????? ????????? ?????? ?? ???????? ?????, ? ??????? ???? JavaScript ????????? ??????????? ??? ??????? ?? ????? ??????, ? ? ????? ?????????? ????????? ???????????? ? ???????? ????. ? ?????? ????????? ??????? ????? ????????? ????? ? ???????, ??????? ???????? ??????????? ?????????? ????? ??????. ?????? ???? ????? ????? ???, ????? ???? ??? ???????????? ? ???????? ????, ?????? ???????? ?????? ??? ??????????????.

????????, ???????? ? ??????????

  1. ????? ??????????? ??????????????, ?????????? ????????? ???????????? ????????????, ??????? Transformation ? ?????? Verify. Spoon ???????? ????????? ??????????????, ?????? ???????????? ???? ? ?????????????? ?????. ???? ?????????????? ?????? ???????? ??????? (? ??? ?????? ???? ?????? ???, ???? ????????? ?????? ??????????), ??? ?????? ??? ??? ???????????????? ?????????.
  2. ???????? ??? ???????? ???????????, ??????? Transformation ? ????? ?????? Preview. ?????? ???????? ???? ????:
  3. ??? ????? ?????? Spoon ?????????? ?????????????? ??????????? ?????????? ?????????? ?????????? ??. ?????? ?????? QuickLaunch. ????? ???? ???????? ???? ? ??????????????? ??????????? ????????? ? ?????????? ?????????? ???? ?????? ???????????. ???? ????????? ????????????? ????????????? ???????????, ?????? ??? ????? ??? ?????????? ??????????????.
  4. ??????? Transformation ? ????? ?????? Run.
  5. ???????? ???? ? ??????? ????? ?????? ????????? ?????????? ? ???????????? ??????????????. ?????? ?????? Launch.
  6. ? ?????? ????? ???? ?????????? ???????? ???? ? ??????????? ?????????. ?? ???????? ?????????? ?????????? ? ?????????? ???????? ??????????????.

?? ??????? Step Metrics ?????????? ?????????? ???????? ?????????????? ?? ?????. ?????????? ???????? ???????? ?? ????????? ???????:

  • Read: ?????????? ????? ?????????? ? ?????????? ?????.
  • Written: ?????????? ????? ?????????? ? ??????? ???? ?? ?????????.
  • Input: ????? ????? ??????????? ?? ????? ??? ??????? ???? ??????.
  • Output: ????? ????? ?????????? ? ???? ??? ??????? ???? ??????.
  • Errors: ????? ?????? ????????? ??? ??????????. ???? ???????? ?????? ?????? ?????????? ???????.

?? ??????? Logging ????????? ?????? ??????????. ? ??? ?????????? ????????? ?????????? ? ?????????? ?????????????? ?? ?????. ???? ???????? ????????? ?????? ??????????, ?? ????? ??????? ????????????? ?????????? ?????. ??? ???????? ?????????? ?????????????? ? ?????? ?????? ??????? ????? ????????? ?????????:

Spoon - The transformation has finished!!

????? ??? ???????? ?????????? ?????????????? ????? ?????? ???? hello.xml, ?????????? ????????? ??? ?????????? ?? ???????????? ?????????? ???????????? ??????.

Pan

Pan ??? ?????? ?????????? ?????????????? ?? ????????????? ????. ??? ?????? ???????????? ????? ?????? pan.bat ? Windows ??? pan.sh ?? ?????? ??????????, ??? ??????????? ? ???????????? ????????. ???? ?????? ??????????? ??? ?????????? ?? ????? ????????? ?????? ????????? ?????????? ??? ?????????? Pan.

????????? ?????????????? ????? ????????? ????????:

Pan /file <Jobs_path>/hello.ktr /norep
  • /norep ??????? ?? ???????? ??????????? Spoon ? ???????????.
  • /file ????????? ?? ??? ????? ??????????? ??????????????.
  • <Jobs_path> ?????? ???? ? ???????? ? ????????:
C:/Pentaho/Tutorial

???

/home/PentahoUser/Tutorial

????????? ????????? ??????? ????? ???????????? -???????.

????? ??????? ?????? ??????? ?????????????? ????? ????????? ????? ???, ??? ? ??? ??????? ????? Spoon. ? ?????? ?????? ????? ????? ??????? ?? ????? ??? ? ???? (?? ??? ???????) ?????? ??????????. ?????? ??????? ????? ?????????? ?? ????, ??? ??? ??????????? ? ??????????? ????????, ??? ???? ?????????? ?????????? ????? ???????????.

  • No labels