SlideShare a Scribd company logo
1 of 31
Download to read offline
CenitHub
Chapter 3
Translators
Translators
A translator defines a logic for data manipulation.
Data manipulation can occurs in the following scenarios:
₋ Importing outside data into Cenit
₋ Updating data already stored in Cenit
₋ Converting data already stored in Cenit
₋ Exporting data outside Cenit
Translators
Translate input data
into data types
records
Convert records
between data
types
Update data type
records
Translate data type
records into
outgoing data
Import Translators
Import translators create data type
records from outside data.
The target data type defines the
type of the records to be created.
If no target data type is defined then
the translator is supposed to be able
to import data into any data type.
The logic of an import translator is
described in ruby style
Import Translators: target data type
Import translators create data type
records from outside data.
The target data type defines the
type of the records to be created.
If no target data type is defined then
the translator is supposed to be able
to import data into any data type.
The logic of an import translator is
described in ruby style
Import Translators: ruby style
Import translators create data type
records from outside data.
The target data type defines the
type of the records to be created.
If no target data type is defined then
the translator is supposed to be able
to import data into any data type.
The logic of an import translator is
described in ruby style
Import Translators: ruby style
The translator transformation is written in a DSL based on the Ruby
Programming Language.
The variables data and target_data_type are available and represent
the outside data and the target data type respectively.
A simple JSON importer can be defined by the following transformation:
Import Translators: ruby style
A little more of transformation code allows to parse the outside data and to
create multiple records:
Import Translators: ruby style
There are several methods available on the target data type object that can be
invoked to create records. They all have the following pattern:
(create|new)_from_(json|xml|edi)[!]
Example: create_from_xml, new_from_edi
The new methods does not persist the created record an a further invocation
of a save method is needed.
The create methods attempt to persist the records, halting on error only if
the method name ends with the exclamation symbol.
Import Translators: ruby style
The following transformation parse a data using Nokogiri and creates one or
multiple records from XML document elements:
Export Translators
Export translators format data type
records into data going outside
Cenit.
The source data type defines the
type of the records to be formatted.
If no source data type is defined then
the translator is supposed to be able
to format records of any data type.
A MIME type can be optionally
defined.
Export Translators
Export translators format data type
records into data going outside
Cenit.
The source data type defines the
type of the records to be formatted.
If no source data type is defined then
the translator is supposed to be able
to format records of any data type.
A MIME type can be optionally
defined.
Export Translators
Export translators format data type
records into data going outside
Cenit.
The source data type defines the
type of the records to be formatted.
If no source data type is defined then
the translator is supposed to be able
to format records of any data type.
A MIME type can be optionally
defined.
Export Translators: ruby style
The translator transformation can be written in ruby style.
Depending on the translator having the option bulk source, the variable
source or sources is available representing a single record or an
enumeration of records to be formatted.
A simple non bulkable JSON exporter can be defined by the following
transformation:
Export Translators: ruby style
If the translator is bulkable a little more of transformation code is needed to
format all the source records into a single JSON data:
Note: the result of the translation execution is the value of the latest
evaluated expression.
Export Translators: ruby style
There are a set of predefined methods available on record objects that can be
used for basic formats:
to_(json|xml|edi)
Every formatter method can receive options, for example:
- source.to_json(pretty: true)
- source.to_xml(with_blanks: true)
- source.to_edi(field_separator: ‘+’)
Export Translators: ruby style
The variable source_data_type is a reference to the translator source
data type and for facility a method to_xml_array have been added to
records enumeration, so a transformation for bulkable XML exporter can be
written as following:
Export Translators: XSLT style
The logic of an export translator can
be described as an XML Stylesheet
transformation.
XSLT style translators are no
bulkable.
Cenit convert the source record to
XML format if necessary and the
applies the XSLT transformation.
Export Translators: XSLT style
The following XSLT transformation changes the value of every attribute with
name email by sample@mail.com:
Update Translators
Update translators update data type
records.
The target data type defines the
type of the records to be updated.
If no target data type is defined then
the translator is supposed to be able
to update records of any data type.
The logic of an import translator is
described in ruby style.
Update Translators
Update translators update data type
records.
The target data type defines the
type of the records to be updated.
If no target data type is defined then
the translator is supposed to be able
to update records of any data type.
The logic of an import translator is
described in ruby style.
Update Translators
Update translators update data type
records.
The target data type defines the
type of the records to be updated.
If no target data type is defined then
the translator is supposed to be able
to update records of any data type.
The logic of an import translator is
described in ruby style.
Update Translators: ruby style
Update translators are non bulkable so they are applied to a single target
record which is available through the variable target:
Conversion Translators
Conversion translators transform
records into others.
The source and target data types
defines the records conversion
types.
The logic of an import translator can
be described in several format: ruby,
XSLT and chain.
Conversion Translators
Conversion translators transform
records into others.
The source and target data types
defines the records conversion
types.
The logic of an import translator can
be described in several format: ruby,
XSLT and chain.
Conversion Translators
Conversion translators transform
records into others.
The source and target data types
defines the records types.
The logic of an import translator can
be described in several format: ruby,
XSLT and chain.
Conversion Translators: ruby style
Conversion translators are non bulkable so they convert a record at the time.
The source and target records are available through the variables target
and source. Converting a costumer from a message would be as simple as:
Conversion Translators: XSLT style
Even if records are not stored in XML format an XSLT transformation is
possible for Cenit by the following steps:
1. Format the source record into XML if necessary.
2. Applies the XSLT transformation to the XML formatted record.
3. Create a target data from the transformed XML document.
Conversion Translators: chain style
Chain style convert records by
concatenating two conversion
translator:
⁻ The source exporter: convert the
source record to an intermediate
data type.
⁻ The target importer: convert the
intermediate record to the target
data type.
Conversion Translators: chain style
Chain style convert records by
concatenating two conversion
translator:
⁻ The source exporter: convert the
source record to an intermediate
data type.
⁻ The target importer: convert the
intermediate record to the target
data type.
CenitHub
Chapter 3
Translators

More Related Content

What's hot

File handling in vb.net
File handling in vb.netFile handling in vb.net
File handling in vb.netEverywhere
 
FILE HANDLING IN C++. +2 COMPUTER SCIENCE CBSE AND STATE SYLLABUS
FILE HANDLING IN C++. +2 COMPUTER SCIENCE CBSE AND STATE SYLLABUSFILE HANDLING IN C++. +2 COMPUTER SCIENCE CBSE AND STATE SYLLABUS
FILE HANDLING IN C++. +2 COMPUTER SCIENCE CBSE AND STATE SYLLABUSVenugopalavarma Raja
 
Basic xml syntax
Basic xml syntaxBasic xml syntax
Basic xml syntaxRaghu nath
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XMLyht4ever
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XMLPrabu U
 
Document Type Definition
Document Type DefinitionDocument Type Definition
Document Type Definitionyht4ever
 
Deletion of a Record from a File - K Karun
Deletion of a Record from a File - K KarunDeletion of a Record from a File - K Karun
Deletion of a Record from a File - K KarunDipayan Sarkar
 
Difference between dtd and xsd
Difference between dtd and xsdDifference between dtd and xsd
Difference between dtd and xsdUmar Ali
 
01 xml document structure
01 xml document structure01 xml document structure
01 xml document structureBaskarkncet
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XMLKumar
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD OverviewPradeep Rapolu
 

What's hot (20)

uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
 
Dtd
DtdDtd
Dtd
 
DTD
DTDDTD
DTD
 
Basic XML
Basic XMLBasic XML
Basic XML
 
File handling in vb.net
File handling in vb.netFile handling in vb.net
File handling in vb.net
 
FILE HANDLING IN C++. +2 COMPUTER SCIENCE CBSE AND STATE SYLLABUS
FILE HANDLING IN C++. +2 COMPUTER SCIENCE CBSE AND STATE SYLLABUSFILE HANDLING IN C++. +2 COMPUTER SCIENCE CBSE AND STATE SYLLABUS
FILE HANDLING IN C++. +2 COMPUTER SCIENCE CBSE AND STATE SYLLABUS
 
uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
 
Basic xml syntax
Basic xml syntaxBasic xml syntax
Basic xml syntax
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Xml dtd
Xml dtdXml dtd
Xml dtd
 
Json1
Json1Json1
Json1
 
Document Type Definition
Document Type DefinitionDocument Type Definition
Document Type Definition
 
Deletion of a Record from a File - K Karun
Deletion of a Record from a File - K KarunDeletion of a Record from a File - K Karun
Deletion of a Record from a File - K Karun
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Difference between dtd and xsd
Difference between dtd and xsdDifference between dtd and xsd
Difference between dtd and xsd
 
01 xml document structure
01 xml document structure01 xml document structure
01 xml document structure
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
 
Xml
XmlXml
Xml
 

Similar to CenitHub Presentations | 3- Translator

47468272 introduction-to-informatica
47468272 introduction-to-informatica47468272 introduction-to-informatica
47468272 introduction-to-informaticaVenkat485
 
Web Services Part 1
Web Services Part 1Web Services Part 1
Web Services Part 1patinijava
 
BASIC CONCEPTS OF C++ CLASS 12
BASIC CONCEPTS OF C++ CLASS 12BASIC CONCEPTS OF C++ CLASS 12
BASIC CONCEPTS OF C++ CLASS 12Dev Chauhan
 
CenitHub Presentations | 4- Flows, Connections & Webhooks
CenitHub Presentations | 4- Flows, Connections & WebhooksCenitHub Presentations | 4- Flows, Connections & Webhooks
CenitHub Presentations | 4- Flows, Connections & WebhooksMiguel Sancho
 
Mapping Data Types In Python.pptx
Mapping Data Types In Python.pptxMapping Data Types In Python.pptx
Mapping Data Types In Python.pptxAnveshbandalla
 
Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...IndicThreads
 
chapter Two Server-side Script lang.pptx
chapter  Two Server-side Script lang.pptxchapter  Two Server-side Script lang.pptx
chapter Two Server-side Script lang.pptxalehegn9
 
DITA and Translation Best Praticices
DITA and Translation Best PraticicesDITA and Translation Best Praticices
DITA and Translation Best PraticicesAndrzej Zydroń MBCS
 
Golang proto buff_ixxo
Golang proto buff_ixxoGolang proto buff_ixxo
Golang proto buff_ixxowww.ixxo.io
 
CS4443 - Modern Programming Language - I Lecture (2)
CS4443 - Modern Programming Language - I  Lecture (2)CS4443 - Modern Programming Language - I  Lecture (2)
CS4443 - Modern Programming Language - I Lecture (2)Dilawar Khan
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftTalentica Software
 
Metadata Extraction and Content Transformation
Metadata Extraction and Content TransformationMetadata Extraction and Content Transformation
Metadata Extraction and Content TransformationAlfresco Software
 
CenitHub: Introduction
CenitHub: Introduction CenitHub: Introduction
CenitHub: Introduction Miguel Sancho
 
What is Data Types and Functions?
What is Data Types and Functions?What is Data Types and Functions?
What is Data Types and Functions?AnuragSrivastava272
 
XML, XML Databases and MPEG-7
XML, XML Databases and MPEG-7XML, XML Databases and MPEG-7
XML, XML Databases and MPEG-7Deniz Kılınç
 

Similar to CenitHub Presentations | 3- Translator (20)

47468272 introduction-to-informatica
47468272 introduction-to-informatica47468272 introduction-to-informatica
47468272 introduction-to-informatica
 
Web Services Part 1
Web Services Part 1Web Services Part 1
Web Services Part 1
 
BASIC CONCEPTS OF C++ CLASS 12
BASIC CONCEPTS OF C++ CLASS 12BASIC CONCEPTS OF C++ CLASS 12
BASIC CONCEPTS OF C++ CLASS 12
 
CenitHub Presentations | 4- Flows, Connections & Webhooks
CenitHub Presentations | 4- Flows, Connections & WebhooksCenitHub Presentations | 4- Flows, Connections & Webhooks
CenitHub Presentations | 4- Flows, Connections & Webhooks
 
Linq
LinqLinq
Linq
 
Mapping Data Types In Python.pptx
Mapping Data Types In Python.pptxMapping Data Types In Python.pptx
Mapping Data Types In Python.pptx
 
Moses
MosesMoses
Moses
 
Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...
 
chapter Two Server-side Script lang.pptx
chapter  Two Server-side Script lang.pptxchapter  Two Server-side Script lang.pptx
chapter Two Server-side Script lang.pptx
 
DITA and Translation Best Praticices
DITA and Translation Best PraticicesDITA and Translation Best Praticices
DITA and Translation Best Praticices
 
Golang proto buff_ixxo
Golang proto buff_ixxoGolang proto buff_ixxo
Golang proto buff_ixxo
 
CS4443 - Modern Programming Language - I Lecture (2)
CS4443 - Modern Programming Language - I  Lecture (2)CS4443 - Modern Programming Language - I  Lecture (2)
CS4443 - Modern Programming Language - I Lecture (2)
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thrift
 
Metadata Extraction and Content Transformation
Metadata Extraction and Content TransformationMetadata Extraction and Content Transformation
Metadata Extraction and Content Transformation
 
Xml and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
 
CenitHub: Introduction
CenitHub: Introduction CenitHub: Introduction
CenitHub: Introduction
 
What is Data Types and Functions?
What is Data Types and Functions?What is Data Types and Functions?
What is Data Types and Functions?
 
XML, XML Databases and MPEG-7
XML, XML Databases and MPEG-7XML, XML Databases and MPEG-7
XML, XML Databases and MPEG-7
 
Sql Basics And Advanced
Sql Basics And AdvancedSql Basics And Advanced
Sql Basics And Advanced
 
Tibco business works
Tibco business worksTibco business works
Tibco business works
 

More from Miguel Sancho

Cenit IO - API Economy
Cenit IO - API EconomyCenit IO - API Economy
Cenit IO - API EconomyMiguel Sancho
 
CenitHub Presentations | 5- Collections & Sharing
CenitHub Presentations | 5- Collections & SharingCenitHub Presentations | 5- Collections & Sharing
CenitHub Presentations | 5- Collections & SharingMiguel Sancho
 
CenitHub Presentations | 2- Libraries, Schemas & Data Types
CenitHub Presentations | 2- Libraries, Schemas & Data TypesCenitHub Presentations | 2- Libraries, Schemas & Data Types
CenitHub Presentations | 2- Libraries, Schemas & Data TypesMiguel Sancho
 
CenitHub Presentations | 1- Overview
CenitHub Presentations | 1- OverviewCenitHub Presentations | 1- Overview
CenitHub Presentations | 1- OverviewMiguel Sancho
 
SpreeConf OpenJAF presentation
SpreeConf OpenJAF presentationSpreeConf OpenJAF presentation
SpreeConf OpenJAF presentationMiguel Sancho
 
Spree Travel: Open Travel Marketplace Framework
Spree Travel: Open Travel Marketplace FrameworkSpree Travel: Open Travel Marketplace Framework
Spree Travel: Open Travel Marketplace FrameworkMiguel Sancho
 
Geométria computacional: Polígonos y-monótonos
Geométria computacional:   Polígonos y-monótonosGeométria computacional:   Polígonos y-monótonos
Geométria computacional: Polígonos y-monótonosMiguel Sancho
 
Geometría computacional: Doubly Connected Edge List (DCEL)
Geometría computacional: Doubly Connected Edge List (DCEL)Geometría computacional: Doubly Connected Edge List (DCEL)
Geometría computacional: Doubly Connected Edge List (DCEL)Miguel Sancho
 
Geometría computacional solapamiento de subdivisiones
Geometría computacional   solapamiento de subdivisionesGeometría computacional   solapamiento de subdivisiones
Geometría computacional solapamiento de subdivisionesMiguel Sancho
 
Geometría Computacional: Interseccción de segmentos
Geometría Computacional: Interseccción de segmentosGeometría Computacional: Interseccción de segmentos
Geometría Computacional: Interseccción de segmentosMiguel Sancho
 
Geometría Computacional: Objetos y problemas básicos
Geometría Computacional: Objetos y problemas básicosGeometría Computacional: Objetos y problemas básicos
Geometría Computacional: Objetos y problemas básicosMiguel Sancho
 
Geometría Computacional: Envoltura Convexa
Geometría Computacional: Envoltura ConvexaGeometría Computacional: Envoltura Convexa
Geometría Computacional: Envoltura ConvexaMiguel Sancho
 
Introducción a Geometría Computacional
Introducción a  Geometría ComputacionalIntroducción a  Geometría Computacional
Introducción a Geometría ComputacionalMiguel Sancho
 

More from Miguel Sancho (15)

Cenit IO | Strategy
Cenit IO | StrategyCenit IO | Strategy
Cenit IO | Strategy
 
Cenit IO - API Economy
Cenit IO - API EconomyCenit IO - API Economy
Cenit IO - API Economy
 
CenitHub 101
CenitHub 101CenitHub 101
CenitHub 101
 
CenitHub Presentations | 5- Collections & Sharing
CenitHub Presentations | 5- Collections & SharingCenitHub Presentations | 5- Collections & Sharing
CenitHub Presentations | 5- Collections & Sharing
 
CenitHub Presentations | 2- Libraries, Schemas & Data Types
CenitHub Presentations | 2- Libraries, Schemas & Data TypesCenitHub Presentations | 2- Libraries, Schemas & Data Types
CenitHub Presentations | 2- Libraries, Schemas & Data Types
 
CenitHub Presentations | 1- Overview
CenitHub Presentations | 1- OverviewCenitHub Presentations | 1- Overview
CenitHub Presentations | 1- Overview
 
SpreeConf OpenJAF presentation
SpreeConf OpenJAF presentationSpreeConf OpenJAF presentation
SpreeConf OpenJAF presentation
 
Spree Travel: Open Travel Marketplace Framework
Spree Travel: Open Travel Marketplace FrameworkSpree Travel: Open Travel Marketplace Framework
Spree Travel: Open Travel Marketplace Framework
 
Geométria computacional: Polígonos y-monótonos
Geométria computacional:   Polígonos y-monótonosGeométria computacional:   Polígonos y-monótonos
Geométria computacional: Polígonos y-monótonos
 
Geometría computacional: Doubly Connected Edge List (DCEL)
Geometría computacional: Doubly Connected Edge List (DCEL)Geometría computacional: Doubly Connected Edge List (DCEL)
Geometría computacional: Doubly Connected Edge List (DCEL)
 
Geometría computacional solapamiento de subdivisiones
Geometría computacional   solapamiento de subdivisionesGeometría computacional   solapamiento de subdivisiones
Geometría computacional solapamiento de subdivisiones
 
Geometría Computacional: Interseccción de segmentos
Geometría Computacional: Interseccción de segmentosGeometría Computacional: Interseccción de segmentos
Geometría Computacional: Interseccción de segmentos
 
Geometría Computacional: Objetos y problemas básicos
Geometría Computacional: Objetos y problemas básicosGeometría Computacional: Objetos y problemas básicos
Geometría Computacional: Objetos y problemas básicos
 
Geometría Computacional: Envoltura Convexa
Geometría Computacional: Envoltura ConvexaGeometría Computacional: Envoltura Convexa
Geometría Computacional: Envoltura Convexa
 
Introducción a Geometría Computacional
Introducción a  Geometría ComputacionalIntroducción a  Geometría Computacional
Introducción a Geometría Computacional
 

Recently uploaded

专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改yuu sss
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home ServiceSapana Sha
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一F La
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一F sss
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceSapana Sha
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhijennyeacort
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一fhwihughh
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...limedy534
 

Recently uploaded (20)

专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
Call Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort ServiceCall Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort Service
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts Service
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
 

CenitHub Presentations | 3- Translator

  • 2. Translators A translator defines a logic for data manipulation. Data manipulation can occurs in the following scenarios: ₋ Importing outside data into Cenit ₋ Updating data already stored in Cenit ₋ Converting data already stored in Cenit ₋ Exporting data outside Cenit
  • 3. Translators Translate input data into data types records Convert records between data types Update data type records Translate data type records into outgoing data
  • 4. Import Translators Import translators create data type records from outside data. The target data type defines the type of the records to be created. If no target data type is defined then the translator is supposed to be able to import data into any data type. The logic of an import translator is described in ruby style
  • 5. Import Translators: target data type Import translators create data type records from outside data. The target data type defines the type of the records to be created. If no target data type is defined then the translator is supposed to be able to import data into any data type. The logic of an import translator is described in ruby style
  • 6. Import Translators: ruby style Import translators create data type records from outside data. The target data type defines the type of the records to be created. If no target data type is defined then the translator is supposed to be able to import data into any data type. The logic of an import translator is described in ruby style
  • 7. Import Translators: ruby style The translator transformation is written in a DSL based on the Ruby Programming Language. The variables data and target_data_type are available and represent the outside data and the target data type respectively. A simple JSON importer can be defined by the following transformation:
  • 8. Import Translators: ruby style A little more of transformation code allows to parse the outside data and to create multiple records:
  • 9. Import Translators: ruby style There are several methods available on the target data type object that can be invoked to create records. They all have the following pattern: (create|new)_from_(json|xml|edi)[!] Example: create_from_xml, new_from_edi The new methods does not persist the created record an a further invocation of a save method is needed. The create methods attempt to persist the records, halting on error only if the method name ends with the exclamation symbol.
  • 10. Import Translators: ruby style The following transformation parse a data using Nokogiri and creates one or multiple records from XML document elements:
  • 11. Export Translators Export translators format data type records into data going outside Cenit. The source data type defines the type of the records to be formatted. If no source data type is defined then the translator is supposed to be able to format records of any data type. A MIME type can be optionally defined.
  • 12. Export Translators Export translators format data type records into data going outside Cenit. The source data type defines the type of the records to be formatted. If no source data type is defined then the translator is supposed to be able to format records of any data type. A MIME type can be optionally defined.
  • 13. Export Translators Export translators format data type records into data going outside Cenit. The source data type defines the type of the records to be formatted. If no source data type is defined then the translator is supposed to be able to format records of any data type. A MIME type can be optionally defined.
  • 14. Export Translators: ruby style The translator transformation can be written in ruby style. Depending on the translator having the option bulk source, the variable source or sources is available representing a single record or an enumeration of records to be formatted. A simple non bulkable JSON exporter can be defined by the following transformation:
  • 15. Export Translators: ruby style If the translator is bulkable a little more of transformation code is needed to format all the source records into a single JSON data: Note: the result of the translation execution is the value of the latest evaluated expression.
  • 16. Export Translators: ruby style There are a set of predefined methods available on record objects that can be used for basic formats: to_(json|xml|edi) Every formatter method can receive options, for example: - source.to_json(pretty: true) - source.to_xml(with_blanks: true) - source.to_edi(field_separator: ‘+’)
  • 17. Export Translators: ruby style The variable source_data_type is a reference to the translator source data type and for facility a method to_xml_array have been added to records enumeration, so a transformation for bulkable XML exporter can be written as following:
  • 18. Export Translators: XSLT style The logic of an export translator can be described as an XML Stylesheet transformation. XSLT style translators are no bulkable. Cenit convert the source record to XML format if necessary and the applies the XSLT transformation.
  • 19. Export Translators: XSLT style The following XSLT transformation changes the value of every attribute with name email by sample@mail.com:
  • 20. Update Translators Update translators update data type records. The target data type defines the type of the records to be updated. If no target data type is defined then the translator is supposed to be able to update records of any data type. The logic of an import translator is described in ruby style.
  • 21. Update Translators Update translators update data type records. The target data type defines the type of the records to be updated. If no target data type is defined then the translator is supposed to be able to update records of any data type. The logic of an import translator is described in ruby style.
  • 22. Update Translators Update translators update data type records. The target data type defines the type of the records to be updated. If no target data type is defined then the translator is supposed to be able to update records of any data type. The logic of an import translator is described in ruby style.
  • 23. Update Translators: ruby style Update translators are non bulkable so they are applied to a single target record which is available through the variable target:
  • 24. Conversion Translators Conversion translators transform records into others. The source and target data types defines the records conversion types. The logic of an import translator can be described in several format: ruby, XSLT and chain.
  • 25. Conversion Translators Conversion translators transform records into others. The source and target data types defines the records conversion types. The logic of an import translator can be described in several format: ruby, XSLT and chain.
  • 26. Conversion Translators Conversion translators transform records into others. The source and target data types defines the records types. The logic of an import translator can be described in several format: ruby, XSLT and chain.
  • 27. Conversion Translators: ruby style Conversion translators are non bulkable so they convert a record at the time. The source and target records are available through the variables target and source. Converting a costumer from a message would be as simple as:
  • 28. Conversion Translators: XSLT style Even if records are not stored in XML format an XSLT transformation is possible for Cenit by the following steps: 1. Format the source record into XML if necessary. 2. Applies the XSLT transformation to the XML formatted record. 3. Create a target data from the transformed XML document.
  • 29. Conversion Translators: chain style Chain style convert records by concatenating two conversion translator: ⁻ The source exporter: convert the source record to an intermediate data type. ⁻ The target importer: convert the intermediate record to the target data type.
  • 30. Conversion Translators: chain style Chain style convert records by concatenating two conversion translator: ⁻ The source exporter: convert the source record to an intermediate data type. ⁻ The target importer: convert the intermediate record to the target data type.