SlideShare a Scribd company logo
1 of 14
Migrations with  Transmogrifier Rok Garbas,  http://www.garbas.si , European Plone Symposium May 2010 - Sorrento
What is transmogrifier? Rok Garbas,  http://www.garbas.si , European Plone Symposium May 2010 - Sorrento original intent was to provide  pluggable  way to  import content  into plone Migrations with  Transmogrifier help us  construct pipeline , from  ordered sections  (blueprints), where each section proccesses data in pipe can be also used for other tasks  that require data proccessing tools. nice example which shows power of transmogrifier is  collective.funnelweb
Simple Example of Config Rok Garbas,  http://www.garbas.si , European Plone Symposium May 2010 - Sorrento [transmogrifier] pipeline = source transform 1 transform 2 create [source] blueprint = example. transmogrifier .source size = 5 [transform 1] blueprint = example.transmogrifier.transform from_field = text  to_ field  = text transform = rst condition = python:item['filename'].endswith('.rst') [transform 2] blueprint = example.transmogrifier.transform from_field = text  to_ field  = description transform = get_first_paragraph [create] blueprint = collective.transmogrifier.constructor Migrations with  Transmogrifier
Create your own blueprint /1 Rok Garbas,  http://www.garbas.si , European Plone Symposium May 2010 - Sorrento class ExampleSource(object): classProvides(ISectionBlueprint) implements(ISection) def __init__(self, transmogrifier, name, options, previous): self.previous = previous self.name = name def __iter__(self): for item in self.previous: yield item for record in ReadJSONFile(): yield dict(_path=normalize(record['title']), _type=”Document”, title =record['title'], text=record['text']) Migrations with  Transmogrifier
Create your own blueprint /2 Rok Garbas,  http://www.garbas.si , European Plone Symposium May 2010 - Sorrento from collective.transmogrifier.utils import Condition class ExampleTranform(object): classProvides(ISectionBlueprint) implements(ISection) def __init__(self, transmogrifier, name, options, previous): self.previous = previous self.from_ field  = options['from_field'] self.to_ field  = options['to_field'] self.tranform = options['tranform'] self.condition = Condition(condition, transmogrifier, name, options) def __iter__(self): for item in self.previous: if self.condition(item): if 'rst' == self.param: item[self.to_field] = TransformFromRSTToHTML(item[self.from_field ]) elif 'get_first_paragraph' == self.param: item[self.to_field] = GetFirstParagraph(item[self.to_field]) yield item Migrations with  Transmogrifier
Register custom Blueprint Rok Garbas,  http://www.garbas.si , European Plone Symposium May 2010 - Sorrento <configure xmlns=&quot;http://namespaces.zope.org/zope&quot;  xmlns:tg=&quot;http://namespaces.plone.org/transmogrifier&quot; i18n_domain=&quot;example.transmogrifier&quot;> <tg:registerConfig name=&quot;exampleconfig&quot; title=&quot;Example&quot; description=&quot;Example pipeline config&quot; configuration=&quot; example .cfg&quot; /> <utility component=&quot;.source.ExampleSource&quot; name=&quot;example.transmogrifier.source&quot; /> <utility component=&quot;.transform.ExampleTransform&quot; name=&quot;example.transmogrifier.transform&quot; /> </configure> Migrations with  Transmogrifier
Base  Blueprints  /1 Rok Garbas,  http://www.garbas.si , European Plone Symposium May 2010 - Sorrento collective.transmogrifier.sections.constructor Migrations with  Transmogrifier collective.transmogrifier.sections.savepoint contstructs plone content (_type, _path) commits a savepoint which as result free up memory collective.transmogrifier.sections.savepoint commits a savepoint which as result free up memory collective.transmogrifier.sections.csvsource reads csv file and puts lines of it in pipeline collective.transmogrifier.sections.splitter splits pipeline, which lets you proccess data flow separatly
Base Blueprints /2 Rok Garbas,  http://www.garbas.si , European Plone Symposium May 2010 - Sorrento collective.transmogrifier.sections.manipulator Migrations with  Transmogrifier rename, copy, delete data in pipeline collective.transmogrifier.sections.condition Lets you discard data from pipeline collective.transmogrifier.sections.inserter Lets you create new fields for data (from other fields) collective.transmogrifier.sections.codec Changes encoding for data in pipeline collective.transmogrifier.sections.constructor Creates parent folders when item needs them
Some Useful Bluprints  Rok Garbas,  http://www.garbas.si , European Plone Symposium May 2010 - Sorrento plone.app.transmogrifier Migrations with  Transmogrifier collective.funellweb transmogrify.siteanalyser transmogrify.filesystem transmogrify.ploneremote transmogrify.webcrawler transmogrify.htmltesting transmogrify.htmlcontentextractor transmogrify.pathsorter quintagroup.transmogrifier collective.blueprint.dancing transmogrify.sqlalchemy collective.blueprint.translationlinker
Plone 2.0 > Plone 4.0 Rok Garbas,  http://www.garbas.si , European Plone Symposium May 2010 - Sorrento >100.000 content objects Migrations with  Transmogrifier >40GB in size many custom products usual migration/upgrade failed
Lessons Learned Rok Garbas,  http://www.garbas.si , European Plone Symposium May 2010 - Sorrento make migration repeatable (eg: using GenericSetup upgrade steps) Migrations with  Transmogrifier migrate parts of page separatly split migration into export and import part monitor and time migration don't complicate in making blueprints extra reusable
Plone 2.0 > Plone 4.0 Rok Garbas,  http://www.garbas.si , European Plone Symposium May 2010 - Sorrento Migrations with  Transmogrifier <10GB of “Data.fs” (RelStorage) + 20GB of blobs  less custom code, better re-usage of Plone's default features using less resources, noticably faster thanks to Plone4 happy client
Whats missing? Wishlist!? Future! Rok Garbas,  http://www.garbas.si , European Plone Symposium May 2010 - Sorrento Migrations with  Transmogrifier Better support for monitoring what goes inside pipeline Web GUI for base blueprints Making it not dependable on plone
Thank you Rok Garbas,  http://www.garbas.si , European Plone Symposium May 2010 - Sorrento Migrations with  Transmogrifier Rok Garbas, rok@garbas.si http://www.garbas.si http://www.twitter.com/garbas

More Related Content

What's hot

10 reasons to be excited about go
10 reasons to be excited about go10 reasons to be excited about go
10 reasons to be excited about goDvir Volk
 
Go lang introduction
Go lang introductionGo lang introduction
Go lang introductionyangwm
 
7 Common Mistakes in Go (2015)
7 Common Mistakes in Go (2015)7 Common Mistakes in Go (2015)
7 Common Mistakes in Go (2015)Steven Francia
 
Go Concurrency
Go ConcurrencyGo Concurrency
Go Concurrencyjgrahamc
 
7 Common mistakes in Go and when to avoid them
7 Common mistakes in Go and when to avoid them7 Common mistakes in Go and when to avoid them
7 Common mistakes in Go and when to avoid themSteven Francia
 
Go serving: Building server app with go
Go serving: Building server app with goGo serving: Building server app with go
Go serving: Building server app with goHean Hong Leong
 
XPath for web scraping
XPath for web scrapingXPath for web scraping
XPath for web scrapingScrapinghub
 
Go for Object Oriented Programmers or Object Oriented Programming without Obj...
Go for Object Oriented Programmers or Object Oriented Programming without Obj...Go for Object Oriented Programmers or Object Oriented Programming without Obj...
Go for Object Oriented Programmers or Object Oriented Programming without Obj...Steven Francia
 
Learning Python from Data
Learning Python from DataLearning Python from Data
Learning Python from DataMosky Liu
 
Do you Promise?
Do you Promise?Do you Promise?
Do you Promise?jungkees
 
Learning Git with Workflows
Learning Git with WorkflowsLearning Git with Workflows
Learning Git with WorkflowsMosky Liu
 
Something about Golang
Something about GolangSomething about Golang
Something about GolangAnton Arhipov
 
Go debugging and troubleshooting tips - from real life lessons at SignalFx
Go debugging and troubleshooting tips - from real life lessons at SignalFxGo debugging and troubleshooting tips - from real life lessons at SignalFx
Go debugging and troubleshooting tips - from real life lessons at SignalFxSignalFx
 
Introduction to Go programming language
Introduction to Go programming languageIntroduction to Go programming language
Introduction to Go programming languageSlawomir Dorzak
 
Functional Reactive Programming without Black Magic (UIKonf 2015)
Functional Reactive Programming without Black Magic (UIKonf 2015)Functional Reactive Programming without Black Magic (UIKonf 2015)
Functional Reactive Programming without Black Magic (UIKonf 2015)Jens Ravens
 

What's hot (20)

10 reasons to be excited about go
10 reasons to be excited about go10 reasons to be excited about go
10 reasons to be excited about go
 
Go lang introduction
Go lang introductionGo lang introduction
Go lang introduction
 
7 Common Mistakes in Go (2015)
7 Common Mistakes in Go (2015)7 Common Mistakes in Go (2015)
7 Common Mistakes in Go (2015)
 
Go Concurrency
Go ConcurrencyGo Concurrency
Go Concurrency
 
7 Common mistakes in Go and when to avoid them
7 Common mistakes in Go and when to avoid them7 Common mistakes in Go and when to avoid them
7 Common mistakes in Go and when to avoid them
 
Go serving: Building server app with go
Go serving: Building server app with goGo serving: Building server app with go
Go serving: Building server app with go
 
XPath for web scraping
XPath for web scrapingXPath for web scraping
XPath for web scraping
 
Go for Object Oriented Programmers or Object Oriented Programming without Obj...
Go for Object Oriented Programmers or Object Oriented Programming without Obj...Go for Object Oriented Programmers or Object Oriented Programming without Obj...
Go for Object Oriented Programmers or Object Oriented Programming without Obj...
 
Go memory
Go memoryGo memory
Go memory
 
Groovyノススメ
GroovyノススメGroovyノススメ
Groovyノススメ
 
Golang design4concurrency
Golang design4concurrencyGolang design4concurrency
Golang design4concurrency
 
Learning Python from Data
Learning Python from DataLearning Python from Data
Learning Python from Data
 
Do you Promise?
Do you Promise?Do you Promise?
Do you Promise?
 
Learning Git with Workflows
Learning Git with WorkflowsLearning Git with Workflows
Learning Git with Workflows
 
Something about Golang
Something about GolangSomething about Golang
Something about Golang
 
Go debugging and troubleshooting tips - from real life lessons at SignalFx
Go debugging and troubleshooting tips - from real life lessons at SignalFxGo debugging and troubleshooting tips - from real life lessons at SignalFx
Go debugging and troubleshooting tips - from real life lessons at SignalFx
 
Introduction to Go programming language
Introduction to Go programming languageIntroduction to Go programming language
Introduction to Go programming language
 
Golang Channels
Golang ChannelsGolang Channels
Golang Channels
 
Functional Reactive Programming without Black Magic (UIKonf 2015)
Functional Reactive Programming without Black Magic (UIKonf 2015)Functional Reactive Programming without Black Magic (UIKonf 2015)
Functional Reactive Programming without Black Magic (UIKonf 2015)
 
Txjs
TxjsTxjs
Txjs
 

Similar to Migrations With Transmogrifier

Dive into Fluentd plugin v0.12
Dive into Fluentd plugin v0.12Dive into Fluentd plugin v0.12
Dive into Fluentd plugin v0.12N Masahiro
 
The GO Language : From Beginners to Gophers
The GO Language : From Beginners to GophersThe GO Language : From Beginners to Gophers
The GO Language : From Beginners to GophersAlessandro Sanino
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsDylan Jay
 
Inroduction to golang
Inroduction to golangInroduction to golang
Inroduction to golangYoni Davidson
 
InspiringCon15: Bringing TYPO3 Legacy Applications into the Flow
InspiringCon15: Bringing TYPO3 Legacy Applications into the FlowInspiringCon15: Bringing TYPO3 Legacy Applications into the Flow
InspiringCon15: Bringing TYPO3 Legacy Applications into the Flowmhelmich
 
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Ondřej Machulda
 
Using Flow-based programming to write tools and workflows for Scientific Comp...
Using Flow-based programming to write tools and workflows for Scientific Comp...Using Flow-based programming to write tools and workflows for Scientific Comp...
Using Flow-based programming to write tools and workflows for Scientific Comp...Samuel Lampa
 
The GNOME way - What can we learn from and within the Open Documentation World
The GNOME way - What can we learn from and within the Open Documentation WorldThe GNOME way - What can we learn from and within the Open Documentation World
The GNOME way - What can we learn from and within the Open Documentation WorldRadina Matic
 
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...Guillaume Laforge
 
Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...
Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...
Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...gdgsurrey
 
"Continuously delivering infrastructure using Terraform and Packer" training ...
"Continuously delivering infrastructure using Terraform and Packer" training ..."Continuously delivering infrastructure using Terraform and Packer" training ...
"Continuously delivering infrastructure using Terraform and Packer" training ...Anton Babenko
 
Dev Day 2019: Mike Sperber – Software Design für die Seele
Dev Day 2019: Mike Sperber – Software Design für die SeeleDev Day 2019: Mike Sperber – Software Design für die Seele
Dev Day 2019: Mike Sperber – Software Design für die SeeleDevDay Dresden
 
Where's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind PloneWhere's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind PloneVincenzo Barone
 

Similar to Migrations With Transmogrifier (20)

Dive into Fluentd plugin v0.12
Dive into Fluentd plugin v0.12Dive into Fluentd plugin v0.12
Dive into Fluentd plugin v0.12
 
The GO Language : From Beginners to Gophers
The GO Language : From Beginners to GophersThe GO Language : From Beginners to Gophers
The GO Language : From Beginners to Gophers
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web apps
 
Inroduction to golang
Inroduction to golangInroduction to golang
Inroduction to golang
 
InspiringCon15: Bringing TYPO3 Legacy Applications into the Flow
InspiringCon15: Bringing TYPO3 Legacy Applications into the FlowInspiringCon15: Bringing TYPO3 Legacy Applications into the Flow
InspiringCon15: Bringing TYPO3 Legacy Applications into the Flow
 
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
 
Easy R
Easy REasy R
Easy R
 
Using Flow-based programming to write tools and workflows for Scientific Comp...
Using Flow-based programming to write tools and workflows for Scientific Comp...Using Flow-based programming to write tools and workflows for Scientific Comp...
Using Flow-based programming to write tools and workflows for Scientific Comp...
 
The GNOME way - What can we learn from and within the Open Documentation World
The GNOME way - What can we learn from and within the Open Documentation WorldThe GNOME way - What can we learn from and within the Open Documentation World
The GNOME way - What can we learn from and within the Open Documentation World
 
Sprockets
SprocketsSprockets
Sprockets
 
Do zero ao deploy
Do zero ao deployDo zero ao deploy
Do zero ao deploy
 
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
 
A First Date With Scala
A First Date With ScalaA First Date With Scala
A First Date With Scala
 
Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...
Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...
Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...
 
"Continuously delivering infrastructure using Terraform and Packer" training ...
"Continuously delivering infrastructure using Terraform and Packer" training ..."Continuously delivering infrastructure using Terraform and Packer" training ...
"Continuously delivering infrastructure using Terraform and Packer" training ...
 
Terraforming
Terraforming Terraforming
Terraforming
 
Python at Facebook
Python at FacebookPython at Facebook
Python at Facebook
 
Dev Day 2019: Mike Sperber – Software Design für die Seele
Dev Day 2019: Mike Sperber – Software Design für die SeeleDev Day 2019: Mike Sperber – Software Design für die Seele
Dev Day 2019: Mike Sperber – Software Design für die Seele
 
Where's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind PloneWhere's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind Plone
 
biopython, doctest and makefiles
biopython, doctest and makefilesbiopython, doctest and makefiles
biopython, doctest and makefiles
 

Recently uploaded

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Recently uploaded (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Migrations With Transmogrifier

  • 1. Migrations with Transmogrifier Rok Garbas, http://www.garbas.si , European Plone Symposium May 2010 - Sorrento
  • 2. What is transmogrifier? Rok Garbas, http://www.garbas.si , European Plone Symposium May 2010 - Sorrento original intent was to provide pluggable way to import content into plone Migrations with Transmogrifier help us construct pipeline , from ordered sections (blueprints), where each section proccesses data in pipe can be also used for other tasks that require data proccessing tools. nice example which shows power of transmogrifier is collective.funnelweb
  • 3. Simple Example of Config Rok Garbas, http://www.garbas.si , European Plone Symposium May 2010 - Sorrento [transmogrifier] pipeline = source transform 1 transform 2 create [source] blueprint = example. transmogrifier .source size = 5 [transform 1] blueprint = example.transmogrifier.transform from_field = text to_ field = text transform = rst condition = python:item['filename'].endswith('.rst') [transform 2] blueprint = example.transmogrifier.transform from_field = text to_ field = description transform = get_first_paragraph [create] blueprint = collective.transmogrifier.constructor Migrations with Transmogrifier
  • 4. Create your own blueprint /1 Rok Garbas, http://www.garbas.si , European Plone Symposium May 2010 - Sorrento class ExampleSource(object): classProvides(ISectionBlueprint) implements(ISection) def __init__(self, transmogrifier, name, options, previous): self.previous = previous self.name = name def __iter__(self): for item in self.previous: yield item for record in ReadJSONFile(): yield dict(_path=normalize(record['title']), _type=”Document”, title =record['title'], text=record['text']) Migrations with Transmogrifier
  • 5. Create your own blueprint /2 Rok Garbas, http://www.garbas.si , European Plone Symposium May 2010 - Sorrento from collective.transmogrifier.utils import Condition class ExampleTranform(object): classProvides(ISectionBlueprint) implements(ISection) def __init__(self, transmogrifier, name, options, previous): self.previous = previous self.from_ field = options['from_field'] self.to_ field = options['to_field'] self.tranform = options['tranform'] self.condition = Condition(condition, transmogrifier, name, options) def __iter__(self): for item in self.previous: if self.condition(item): if 'rst' == self.param: item[self.to_field] = TransformFromRSTToHTML(item[self.from_field ]) elif 'get_first_paragraph' == self.param: item[self.to_field] = GetFirstParagraph(item[self.to_field]) yield item Migrations with Transmogrifier
  • 6. Register custom Blueprint Rok Garbas, http://www.garbas.si , European Plone Symposium May 2010 - Sorrento <configure xmlns=&quot;http://namespaces.zope.org/zope&quot; xmlns:tg=&quot;http://namespaces.plone.org/transmogrifier&quot; i18n_domain=&quot;example.transmogrifier&quot;> <tg:registerConfig name=&quot;exampleconfig&quot; title=&quot;Example&quot; description=&quot;Example pipeline config&quot; configuration=&quot; example .cfg&quot; /> <utility component=&quot;.source.ExampleSource&quot; name=&quot;example.transmogrifier.source&quot; /> <utility component=&quot;.transform.ExampleTransform&quot; name=&quot;example.transmogrifier.transform&quot; /> </configure> Migrations with Transmogrifier
  • 7. Base Blueprints /1 Rok Garbas, http://www.garbas.si , European Plone Symposium May 2010 - Sorrento collective.transmogrifier.sections.constructor Migrations with Transmogrifier collective.transmogrifier.sections.savepoint contstructs plone content (_type, _path) commits a savepoint which as result free up memory collective.transmogrifier.sections.savepoint commits a savepoint which as result free up memory collective.transmogrifier.sections.csvsource reads csv file and puts lines of it in pipeline collective.transmogrifier.sections.splitter splits pipeline, which lets you proccess data flow separatly
  • 8. Base Blueprints /2 Rok Garbas, http://www.garbas.si , European Plone Symposium May 2010 - Sorrento collective.transmogrifier.sections.manipulator Migrations with Transmogrifier rename, copy, delete data in pipeline collective.transmogrifier.sections.condition Lets you discard data from pipeline collective.transmogrifier.sections.inserter Lets you create new fields for data (from other fields) collective.transmogrifier.sections.codec Changes encoding for data in pipeline collective.transmogrifier.sections.constructor Creates parent folders when item needs them
  • 9. Some Useful Bluprints Rok Garbas, http://www.garbas.si , European Plone Symposium May 2010 - Sorrento plone.app.transmogrifier Migrations with Transmogrifier collective.funellweb transmogrify.siteanalyser transmogrify.filesystem transmogrify.ploneremote transmogrify.webcrawler transmogrify.htmltesting transmogrify.htmlcontentextractor transmogrify.pathsorter quintagroup.transmogrifier collective.blueprint.dancing transmogrify.sqlalchemy collective.blueprint.translationlinker
  • 10. Plone 2.0 > Plone 4.0 Rok Garbas, http://www.garbas.si , European Plone Symposium May 2010 - Sorrento >100.000 content objects Migrations with Transmogrifier >40GB in size many custom products usual migration/upgrade failed
  • 11. Lessons Learned Rok Garbas, http://www.garbas.si , European Plone Symposium May 2010 - Sorrento make migration repeatable (eg: using GenericSetup upgrade steps) Migrations with Transmogrifier migrate parts of page separatly split migration into export and import part monitor and time migration don't complicate in making blueprints extra reusable
  • 12. Plone 2.0 > Plone 4.0 Rok Garbas, http://www.garbas.si , European Plone Symposium May 2010 - Sorrento Migrations with Transmogrifier <10GB of “Data.fs” (RelStorage) + 20GB of blobs less custom code, better re-usage of Plone's default features using less resources, noticably faster thanks to Plone4 happy client
  • 13. Whats missing? Wishlist!? Future! Rok Garbas, http://www.garbas.si , European Plone Symposium May 2010 - Sorrento Migrations with Transmogrifier Better support for monitoring what goes inside pipeline Web GUI for base blueprints Making it not dependable on plone
  • 14. Thank you Rok Garbas, http://www.garbas.si , European Plone Symposium May 2010 - Sorrento Migrations with Transmogrifier Rok Garbas, rok@garbas.si http://www.garbas.si http://www.twitter.com/garbas