Data Publication

download Data Publication

of 27

Transcript of Data Publication

  • 7/26/2019 Data Publication

    1/27

    INTRODUCTION TO DATA

    HUB + DATAPUBLICATION

    BY : - Vohra

  • 7/26/2019 Data Publication

    2/27

    What is Data Hub?The Data Hub is a single tenant system that ena

    users to easily feed data from external systems

    hybris system.

    It acts as a staging area where external data cananalyzed for errors and corrected before being fehybris.

    Wh R!"uir!#?It provides a service-oriented, data integration sthat can lower implementation ti$!and %ostsimplementation partners do not have to build m

    data integrations anymore.

  • 7/26/2019 Data Publication

    3/27

    Cont#&&

    The complexity of the hybris data structure is hiddfrom the users that are designing the integration.

    Data can be input in a raw format with multiple roitem in any order.

    o !nowledge of dependencies between input itemre"uired to input data.

    It is based on $%&Tful 'eb &ervices

  • 7/26/2019 Data Publication

    4/27

    O'!r'i!(

  • 7/26/2019 Data Publication

    5/27

    Wor)*o(

    &Data I$,ort

    &Co$,osition

    .&Pub/i%ation

    0&Data Ins,!%tion

  • 7/26/2019 Data Publication

    6/27

    & Data I$,ort

    (se &pring integration to create a new data feed a

    using it to load the data

    )ocalizable items have separate rows for each locathe I&* code speci+ed.

    These separate rows are combined, split, and anyduplicates are resolved as necessary during internaprocessing in the Data Hub.

  • 7/26/2019 Data Publication

    7/27

    & Co$,osition

    Imported data is then composed into canonical items.

    anonical items represent a master data type view, andare independent of the structure of target systems.

    omposition is manually triggered by a $%&Tful PO1Tto

    http/hostport0datahub-webappv1pools/poolame0c

  • 7/26/2019 Data Publication

    8/27

    It transforms data from the $aw 2odel to a ano2odel

    $aw 2odel anonical 2ode

    simple, 3attened view,matching inbound data4schema-less de+nitions4

    fragmented data

    ideal representation domain ob5ect li!e

    6customer64independent of sourcand target structure

  • 7/26/2019 Data Publication

    9/27

    .& Pub/i%ationThe canonical items can then be published to a speci+c de+ned

    target system manually.

    7*&T - http/hostport0datahub-webappv1pools/poolame0publications

    The above is published with a content-type of a,,/i%ation23so8&* structure such as,

    /4tar5!t1st!$Pub/i%ations49

    /4tar5!t1st!$Na$!46TestoreInstallation6

    0 :

    0 ,contained in the re"uest body.

  • 7/26/2019 Data Publication

    10/27

    0& Data Ins,!%tionData can be inspected at any stage of processing in the Da

    Hub.

    ; $%&Tful 67Tre"uest to the following ($) returns all thehistory of all actions in the named pool

    http/hostport0datahub-webappv1pools/poolame0pool-h

  • 7/26/2019 Data Publication

    11/27

    Data Hub

    Pub/i%ation

  • 7/26/2019 Data Publication

    12/27

    anonicalItems

    7ublished toTar&ys

  • 7/26/2019 Data Publication

    13/27

    Pub/i%ation Phas! It is started by initiating a PO1Tre"uest to the following with one or mo

    names speci+ed in the tar5!t1st!$Pub/i%ations metadata and the 8,o

    POST - http://{host:port}/datahub-webapp/v1/pools/{poolName}/publications

    { "poolName": "GLOBL"! "taret#$stem%ublications": & { "taret#$stemName": "'((est#$stem" }! { "taret#$stemName": ")$bris%lat*orm" } +}

    The publication phase runs asynchronously and the PO1Tre"uest ret

    immediately indicating the publication action is I>7$*?$%&&.

  • 7/26/2019 Data Publication

    14/27

    ub/i%ation 1tatus It is up to the adapter to update the status of the publication after it is completed.

    The status of the publication can be verified by executing the following URL:

    GT ! http:""#host:port$"datahub!webapp"v%"pools"#pool&ame$"publications"#actionId$ 6actionId6 @, 6type6 67(A)I;TI*6, 6startTime6 1BCC@CB11ECF, 6endTime6 nu//, 6status6 6I>7$*?$%&&6, 6poolame6 6?)*A;)6, 6target&ystem7ublications6 9

    / 6publicationId6 G, 6startTime6 1BCC@CB11EC, 6endTime6 nu//, 6status6 6I>7$*?$%&&6, 6target&ystemame66ITTest&ystem6, 6error)ist6 9

    :, 6actionId6 @

    / 6publicationId6 E, 6startTime6 1BCC@CB11EC, 6endTime6 1BCC@CB1CEG, 6status6 6&(%&&6, 6target&ystemame6 6Hybris7latform6 6error)ist6 9

    :, 6actionId6 @ 0 :0

  • 7/26/2019 Data Publication

    15/27

    Cont#&& urrently, the Data Hub returns the following statuses

    ' 1UCC711- Indicates that the publication was completed suc

    ' COPL7T7;W;7RROR1 - Indicates the publication was comerrors.

    ' IN;PRO6R711- Indicates that the publication is in progress.

    ' '>%$$*$&.

  • 7/26/2019 Data Publication

    16/27

    ar5!t !ta#ata

    ; business user has to describe how data should loo! in thasystem.

    This is done by de+ning target system metadata in the extexml document of the data hub.

  • 7/26/2019 Data Publication

    17/27

    The target metadata is presented by the following item types

    Data Hub'Tar5!t1st!$ -de+nes the hybris systems where data can published. This entity is mainly used to distinguish one publicdestination from the other.'Tar5!tIt!$!ta#ata -de+nes an item type in the target syspeci+es the item type name and lin!s to a set of attributes th

    speci+c to that item type in the target system.'Tar5!tAttribut!D!=nition -de+nes a single attribute in antype. It speci+es the name, data type, validation rules, and hocanonical value should be transformed for the attribute valuetarget system item type.

    Cont#&&

    (extension xmlns)*http:""www.hybris.com"schema" * xmlns:xsi)*http:""www.w+.org",--%"/L0chema!instan

    http://www.hybris.com/schema/http://www.hybris.com/schema/
  • 7/26/2019 Data Publication

    18/27

    p y p g

    xsi:schemaLocation)*http:""www.hybris.com"schema"datahub!metadata!schema!%.-.-.xsd* name)*c

    (canonicalItems1

    (item1

    (type12anonical2ustomer("type1

    (description12anonical representation of the customer("description1

    (status "1

    (3!! defaults to 42TI5 !!1 (attributes1

    (attribute1

    (name1customerId("name1

    (model1

    (locali6able1false("locali6able1

    (collection1false("collection1

    (type10tring("type1

    (primary7ey1true("primary7ey1

    ("model1 (transformations1

    (transformation1

    (raw0ource1Raw2ustomer("raw0ource1

    (expression1integration7ey("expression1

    ("transformation1

    ("transformations1

    ("attribute1

    88

    8888

    r!>!r!n%in5 Durin5 Pub/i

    http://www.hybris.com/schema/http://www.hybris.com/schema/
  • 7/26/2019 Data Publication

    19/27

    r!>!r!n%in5 Durin5 Pub/iTo dereference a canonical item the &p%) resolve function is used t

    another canonical item.

    The result of the dereferencing is recorded on the referencing canopublication status for the target system publication being performe

    If dereferencing fails, the referencing canonical itemJs publication starget system publication being performed is set to ;I)($% and thpublished.

    In the case of a failure, a more detailed explanation of the cause ofadded to the referencing canonical itemJs publication status for thepublication being performed.

    if the dereferencing is successful the referencing canonical item cothe publication process.

    t#

  • 7/26/2019 Data Publication

    20/27

    ont#&&The possible values for the cause of a failure during dereferencing are as fo

    'I11IN6;R7

  • 7/26/2019 Data Publication

    21/27

    #a,t!r 1!r'i%!s ;ll target system adapters must implement

    the %o$&hbrisatahub&a#a,t!r&A#a,t!r1!r'i%! interface.

    ;ny new target system adapter can be added to the &pring context regis

    to the way the core platform adapter is con+gured now2#atahub2#atahs!r'i%!2#atahub-%or!-a#a,t!r-s!r'i%!2sr%2$ain2r!sour%!s27TA-INa#a,t!r-s!r'i%!-s,rin5&@$/

    ,,,alias name."de*aultoredapter#ervice" alias."coredapter#ervice"bean name."de*aultoredapter#ervice"

    class."com,h$bris,datahub,core,adapter,impl,oredapter#ervice"0 propert$ name."taret#$stem($pe" value.")$brisore" /0 propert$ name."impe#ervice" re*."impe#ervice" /0 propert$ name."media#torae" re*."impe2edia#torae" /0 propert$ name."eportlient" re*."eportlient" /0/bean0,,,

    or! A#a,t!r 1!r i%!s

  • 7/26/2019 Data Publication

    22/27

    or! A#a,t!r 1!r'i%!s

    The A#a,t!r1!r'i%! implementation for a hybris core installation

    in the %or!-a#a,t!r-s!r'i%!module.

    It uses the I$,7@ format to publish the data.

    or each Tar5!tIt!$, an I$,7@header is +rst created for all non-lattributes, and then additional bloc!s for every subse"uent localiza

    that item.

    Data Hub ;dapter provides a web-based service ;7I to uploada ore system from the Data Hub.

    C t#

  • 7/26/2019 Data Publication

    23/27

    Cont#&&The data should be provided in an I$,7@+le format, which typica

    this3base%roduct.base%roduct4code!

    catalo5ersion4catalo4id&de*ault.6apparel%roductatalo6+7!version&dd6+773catalo5ersion.cataloversion4catalo4id&de*ault.apparel%roductatade*ault.6#taed6+77&uni8ue.true!de*ault.apparel%roductatalo:#taed+'N#9(;supercateories4code!3catalo5ersion7>code&un3catalo5ersion>>?@1A>>>1>>>AAC>>>tshirts>'N#9(;code&uni8ue.true+> name&lan.en+> 3catalo5ersion&uni8ue.true!allowNull.true+>description&lan.en+>app

    de7>ean>manu*acturerName>1A?>1A??DCEF@B> pieces> >5er$ ood product>approved>test9N> 2

    C t#

  • 7/26/2019 Data Publication

    24/27

    Cont#&&However, large volumes of data that can ma!e the transmiss

    time-consuming.

    To bypass these problems and to load the data more eKcientHub ;dapter uses a special format for the I$,7@+le.

    *nly headers are present and there is information about how the data from the Data Hub.

    ;lso paging used during the creation and loading of the I$,

    The default page size of each bloc! is 1LLL items i.e. for each1LLL items a new I$,7@header is generated with the apprometadata information

  • 7/26/2019 Data Publication

    25/27

    o#i=!# I$,!@

  • 7/26/2019 Data Publication

    26/27

    Cont#&&1. The Data Hub ;dapter uses special comments to retrieve information abo

    to the Data Hub, and then replaces the comments with the data receivedbac! into the +le.

    -$URL:a ($) for the call bac!. This should be used 6as is6 in order tofrom the Data Hub.

    -$HEADER:an HTT7 header name=valueto add to the call bac! HTTheaders can be used to pass re"uired information, for examplesecurity context, to the Data Hub.

    F. The very +rst +eld in the I$,7@command declaration is empty. This meare ignored by the I$,ort1!r'i%!but can be used by the Data Hub ;daHub ;dapter re"uires the canonical item ID be placed into the empty heaeach data record being imported. This ID is reported bac! to the Data Huerror and lets the Data Hub tie that error to a speci+c item.

  • 7/26/2019 Data Publication

    27/27

    THAN YOU :