SlideShare una empresa de Scribd logo
1 de 17
Descargar para leer sin conexión
CONFIDENTIAL
Data Extraction and Migration
Calem Enterprise Tutorial
Austin, Texas
Summer, 2017
CalemEAM
2© 2016 CalemEAM Inc.
Business Cases
An organization uses Calem Enterprise to manage its global
maintenance operations including manufacturing plants. The
organization decides to use Calem Cloud Service to manage
manufacturing plants. The plants data needs to be extracted from the
global Calem Enterprise and migrated to the new cloud service. The
data includes:
• Locations and assets.
• Asset groups and parts
• Work orders and service requests
• Company and Sites
• Users
CalemEAM
3© 2016 CalemEAM Inc.
Skills and Tools
Technical skills are helpful in planning and executing the data extraction and
migration including:
• Ability to write and use SQL
• Knowledge of phpmyadmin. Use of other MySQL tools is also possible.
• Knowledge of Calem database. See “Calem Enterprise Database Guide”
• Knowledge of Calem customization. See “Calem Enterprise Admin Guide”
CalemEAM
4© 2017 CalemEAM Inc.
Data Extraction & Migration Process
CalemEAM
5© 2017 CalemEAM Inc.
Step 1. Database Backup
• Backup the cloud service database.
• The backup allows you to rollback if there are issues or changes while
executing the migration process.
CalemEAM
6© 2017 CalemEAM Inc.
Step 2. Customization Migration
Customization includes the meta data files and database tables.
• Copy custom tables and labels from Calem_Home/custom/global
from current service to your destination cloud service.
• If you have customized the cloud instance, you will need to
merge the customization.
• Use phpmyadmin to export all custom tables from your current
service and import to the database of your destination cloud service.
• Custom fields are stored in “zc_xxx” tables, eg, “zc_cm_asset”
stores all custom fields for “cm_asset” table.
• Custom category attributes are stored in “zc_za_xxx” tables.
CalemEAM
7© 2017 CalemEAM Inc.
Step 3. Export Location
Identify locations to extract.
• Define a top location for data extraction
• Move locations to export to under this location if necessary
• Use Calem to extract the location hierarchy from the top location:
• Update Calem_Home/etc/log4php.properties to turn on debug log
(see Admin Guide for more info)
• Log into your Calem and navigate to the top location (eg. B02.HQ)
• Calem calculates location hierarchy from B02.HQ
CalemEAM
8© 2017 CalemEAM Inc.
Step 3a. Export Location
• View Calem_Home/logs/calem.log and find query like the following:
• SQL: SELECT count(*) FROM cm_asset WHERE cm_asset.location_id IN
('HQ.BLD001', '10000', '10001', '10002'), params=NULL
• The location list ('HQ.BLD001', '10000', '10001', '10002') includes all the
location Ids in the hierarchy from B02.HQ.
• Create a database view based on the location Id list above:
• SQL: create or replace view cmv_loc_extract as select * from cm_location
where id IN ('HQ.BLD001', '10000', '10001', '10002')
• Turn off the debug in the calem log (see Admin Guide)
• The view “cmv_loc_extract” includes all the locations to extract.
• Use phpmyadmin to export locations based on the view
• We will use the view to export other data whenever possible
CalemEAM
9© 2017 CalemEAM Inc.
Step 3b. Export Location
• Use phpmyadmin to export query results as CSV (or SQL).
CalemEAM
10© 2017 CalemEAM Inc.
Step 4. Export Asset
• Export assets based on locations above:
• SQL: select * from cm_asset where location_id in (select id from
cmv_loc_extract)
• You may export asset details (see Calem Database Guide). Eg, export
downtime: select * from cm_asset_downtime where asset_id in (select id
from cm_asset where location_id in (select id from cmv_loc_extract)).
CalemEAM
11© 2017 CalemEAM Inc.
Step 5. Export Asset Groups & Parts
• Export asset groups based on locations above:
• SQL: select * from cm_in where id in (select in_id from cm_asset where
location_id in (select id from cmv_loc_extract))
• Export asset parts based on locations above:
• SQL: select * from cm_in where id in (select part_id from cm_in_part a inner
join cm_asset b on b.in_id = a.in_id where b.location_id in (select id from
cmv_loc_extract))
CalemEAM
12© 2017 CalemEAM Inc.
Step 6. Export Work Orders
• Export work orders based on locations:
• SQL: select * from cm_wo where location_id in (select id from
cmv_loc_extract)
• Export work order details (see Calem Database Guide) based on work
orders above. Eg, export labor: select * from cm_wo_labor where wo_id in
(select id from cm_wo where location_id in (select id from cmv_loc_extract))
CalemEAM
13© 2017 CalemEAM Inc.
Step 7. Export Service Requests
• Export Service Requests based on locations:
• SQL: select * from cm_sr where location_id in (select id from cmv_loc_extract)
• Export service request details (see Calem Database Guide) based on
service requests above. Eg, status log: select * from cm_sr_status_log
where sr_id in (select id from cm_sr where location_id in (select id from
cmv_loc_extract))
CalemEAM
14© 2017 CalemEAM Inc.
Step 8. Company & Site
• Export company based on locations:
• SQL: select * from cm_company where id in (select company_id from cm_site
where id in (select site_id from cmv_loc_extract))
• Export site based on locations:
• SQL: select * from cm_site where id in (select site_id from
cmv_loc_extract)
CalemEAM
15© 2017 CalemEAM Inc.
Step 9. Users
• Export users who have worked on work orders extracted
• SQL: select * from cm_user where (id in (select assigned_to_id from cm_wo
where location_id in (select id from cmv_loc_extract)) OR (id in (select user_id
from cm_wo_labor where wo_id in (select id from cm_wo where location_id in
(select id from cmv_loc_extract)))))
CalemEAM
16© 2017 CalemEAM Inc.
Step 10. Data Import
• Use phpmysql to import data files extracted above
• The order of file import is not important
• Not all modules are covered in the data extraction and migration. You
may use the process presented here to apply to other modules based on
your needs. Contact us at support@calemeam.com if you need
assistance.
CalemEAM
17© 2017 CalemEAM Inc.
Thank You!
Thank You for Attending
the CalemEAM Training!
Visit Us at www.calemeam.com

Más contenido relacionado

Similar a Calem Data Extraction and Migration

Step by step installation of microsoft dynamics 365 finance and operations on...
Step by step installation of microsoft dynamics 365 finance and operations on...Step by step installation of microsoft dynamics 365 finance and operations on...
Step by step installation of microsoft dynamics 365 finance and operations on...Umesh Pandit
 
State management 1
State management 1State management 1
State management 1singhadarsh
 
Loading Data into Redshift with Lab
Loading Data into Redshift with LabLoading Data into Redshift with Lab
Loading Data into Redshift with LabAmazon Web Services
 
AutoUpgrade and Best Practices
AutoUpgrade and Best PracticesAutoUpgrade and Best Practices
AutoUpgrade and Best PracticesJitendra Singh
 
Loading Data into Amazon Redshift
Loading Data into Amazon RedshiftLoading Data into Amazon Redshift
Loading Data into Amazon RedshiftAmazon Web Services
 
Hands-on Lab: Migrating Oracle to PostgreSQL
Hands-on Lab: Migrating Oracle to PostgreSQL Hands-on Lab: Migrating Oracle to PostgreSQL
Hands-on Lab: Migrating Oracle to PostgreSQL Amazon Web Services
 
Secure Management of Fleet at Scale
Secure Management of Fleet at ScaleSecure Management of Fleet at Scale
Secure Management of Fleet at ScaleAmazon Web Services
 
Configuration manager
Configuration managerConfiguration manager
Configuration managerRaghu nath
 
6 tips for improving ruby performance
6 tips for improving ruby performance6 tips for improving ruby performance
6 tips for improving ruby performanceEngine Yard
 
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...NomanKhalid56
 
Loading Data into Redshift: Data Analytics Week SF
Loading Data into Redshift: Data Analytics Week SFLoading Data into Redshift: Data Analytics Week SF
Loading Data into Redshift: Data Analytics Week SFAmazon Web Services
 
Data Transformation Patterns in AWS - AWS Online Tech Talks
Data Transformation Patterns in AWS - AWS Online Tech TalksData Transformation Patterns in AWS - AWS Online Tech Talks
Data Transformation Patterns in AWS - AWS Online Tech TalksAmazon Web Services
 
2014-11-05-DataCollection
2014-11-05-DataCollection2014-11-05-DataCollection
2014-11-05-DataCollectionPeter Dupuis
 

Similar a Calem Data Extraction and Migration (20)

Step by step installation of microsoft dynamics 365 finance and operations on...
Step by step installation of microsoft dynamics 365 finance and operations on...Step by step installation of microsoft dynamics 365 finance and operations on...
Step by step installation of microsoft dynamics 365 finance and operations on...
 
State management 1
State management 1State management 1
State management 1
 
Chapter 8 part2
Chapter 8   part2Chapter 8   part2
Chapter 8 part2
 
Loading Data into Redshift
Loading Data into RedshiftLoading Data into Redshift
Loading Data into Redshift
 
000 252
000 252000 252
000 252
 
Loading Data into Redshift
Loading Data into RedshiftLoading Data into Redshift
Loading Data into Redshift
 
Loading Data into Redshift
Loading Data into RedshiftLoading Data into Redshift
Loading Data into Redshift
 
Loading Data into Redshift with Lab
Loading Data into Redshift with LabLoading Data into Redshift with Lab
Loading Data into Redshift with Lab
 
Client deployment
Client deploymentClient deployment
Client deployment
 
AutoUpgrade and Best Practices
AutoUpgrade and Best PracticesAutoUpgrade and Best Practices
AutoUpgrade and Best Practices
 
Loading Data into Amazon Redshift
Loading Data into Amazon RedshiftLoading Data into Amazon Redshift
Loading Data into Amazon Redshift
 
Hands-on Lab: Migrating Oracle to PostgreSQL
Hands-on Lab: Migrating Oracle to PostgreSQL Hands-on Lab: Migrating Oracle to PostgreSQL
Hands-on Lab: Migrating Oracle to PostgreSQL
 
Secure Management of Fleet at Scale
Secure Management of Fleet at ScaleSecure Management of Fleet at Scale
Secure Management of Fleet at Scale
 
Configuration manager
Configuration managerConfiguration manager
Configuration manager
 
6 tips for improving ruby performance
6 tips for improving ruby performance6 tips for improving ruby performance
6 tips for improving ruby performance
 
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
 
Loading Data into Redshift: Data Analytics Week SF
Loading Data into Redshift: Data Analytics Week SFLoading Data into Redshift: Data Analytics Week SF
Loading Data into Redshift: Data Analytics Week SF
 
Data Transformation Patterns in AWS - AWS Online Tech Talks
Data Transformation Patterns in AWS - AWS Online Tech TalksData Transformation Patterns in AWS - AWS Online Tech Talks
Data Transformation Patterns in AWS - AWS Online Tech Talks
 
Introduction to mysql part 3
Introduction to mysql part 3Introduction to mysql part 3
Introduction to mysql part 3
 
2014-11-05-DataCollection
2014-11-05-DataCollection2014-11-05-DataCollection
2014-11-05-DataCollection
 

Último

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Último (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Calem Data Extraction and Migration

  • 1. CONFIDENTIAL Data Extraction and Migration Calem Enterprise Tutorial Austin, Texas Summer, 2017
  • 2. CalemEAM 2© 2016 CalemEAM Inc. Business Cases An organization uses Calem Enterprise to manage its global maintenance operations including manufacturing plants. The organization decides to use Calem Cloud Service to manage manufacturing plants. The plants data needs to be extracted from the global Calem Enterprise and migrated to the new cloud service. The data includes: • Locations and assets. • Asset groups and parts • Work orders and service requests • Company and Sites • Users
  • 3. CalemEAM 3© 2016 CalemEAM Inc. Skills and Tools Technical skills are helpful in planning and executing the data extraction and migration including: • Ability to write and use SQL • Knowledge of phpmyadmin. Use of other MySQL tools is also possible. • Knowledge of Calem database. See “Calem Enterprise Database Guide” • Knowledge of Calem customization. See “Calem Enterprise Admin Guide”
  • 4. CalemEAM 4© 2017 CalemEAM Inc. Data Extraction & Migration Process
  • 5. CalemEAM 5© 2017 CalemEAM Inc. Step 1. Database Backup • Backup the cloud service database. • The backup allows you to rollback if there are issues or changes while executing the migration process.
  • 6. CalemEAM 6© 2017 CalemEAM Inc. Step 2. Customization Migration Customization includes the meta data files and database tables. • Copy custom tables and labels from Calem_Home/custom/global from current service to your destination cloud service. • If you have customized the cloud instance, you will need to merge the customization. • Use phpmyadmin to export all custom tables from your current service and import to the database of your destination cloud service. • Custom fields are stored in “zc_xxx” tables, eg, “zc_cm_asset” stores all custom fields for “cm_asset” table. • Custom category attributes are stored in “zc_za_xxx” tables.
  • 7. CalemEAM 7© 2017 CalemEAM Inc. Step 3. Export Location Identify locations to extract. • Define a top location for data extraction • Move locations to export to under this location if necessary • Use Calem to extract the location hierarchy from the top location: • Update Calem_Home/etc/log4php.properties to turn on debug log (see Admin Guide for more info) • Log into your Calem and navigate to the top location (eg. B02.HQ) • Calem calculates location hierarchy from B02.HQ
  • 8. CalemEAM 8© 2017 CalemEAM Inc. Step 3a. Export Location • View Calem_Home/logs/calem.log and find query like the following: • SQL: SELECT count(*) FROM cm_asset WHERE cm_asset.location_id IN ('HQ.BLD001', '10000', '10001', '10002'), params=NULL • The location list ('HQ.BLD001', '10000', '10001', '10002') includes all the location Ids in the hierarchy from B02.HQ. • Create a database view based on the location Id list above: • SQL: create or replace view cmv_loc_extract as select * from cm_location where id IN ('HQ.BLD001', '10000', '10001', '10002') • Turn off the debug in the calem log (see Admin Guide) • The view “cmv_loc_extract” includes all the locations to extract. • Use phpmyadmin to export locations based on the view • We will use the view to export other data whenever possible
  • 9. CalemEAM 9© 2017 CalemEAM Inc. Step 3b. Export Location • Use phpmyadmin to export query results as CSV (or SQL).
  • 10. CalemEAM 10© 2017 CalemEAM Inc. Step 4. Export Asset • Export assets based on locations above: • SQL: select * from cm_asset where location_id in (select id from cmv_loc_extract) • You may export asset details (see Calem Database Guide). Eg, export downtime: select * from cm_asset_downtime where asset_id in (select id from cm_asset where location_id in (select id from cmv_loc_extract)).
  • 11. CalemEAM 11© 2017 CalemEAM Inc. Step 5. Export Asset Groups & Parts • Export asset groups based on locations above: • SQL: select * from cm_in where id in (select in_id from cm_asset where location_id in (select id from cmv_loc_extract)) • Export asset parts based on locations above: • SQL: select * from cm_in where id in (select part_id from cm_in_part a inner join cm_asset b on b.in_id = a.in_id where b.location_id in (select id from cmv_loc_extract))
  • 12. CalemEAM 12© 2017 CalemEAM Inc. Step 6. Export Work Orders • Export work orders based on locations: • SQL: select * from cm_wo where location_id in (select id from cmv_loc_extract) • Export work order details (see Calem Database Guide) based on work orders above. Eg, export labor: select * from cm_wo_labor where wo_id in (select id from cm_wo where location_id in (select id from cmv_loc_extract))
  • 13. CalemEAM 13© 2017 CalemEAM Inc. Step 7. Export Service Requests • Export Service Requests based on locations: • SQL: select * from cm_sr where location_id in (select id from cmv_loc_extract) • Export service request details (see Calem Database Guide) based on service requests above. Eg, status log: select * from cm_sr_status_log where sr_id in (select id from cm_sr where location_id in (select id from cmv_loc_extract))
  • 14. CalemEAM 14© 2017 CalemEAM Inc. Step 8. Company & Site • Export company based on locations: • SQL: select * from cm_company where id in (select company_id from cm_site where id in (select site_id from cmv_loc_extract)) • Export site based on locations: • SQL: select * from cm_site where id in (select site_id from cmv_loc_extract)
  • 15. CalemEAM 15© 2017 CalemEAM Inc. Step 9. Users • Export users who have worked on work orders extracted • SQL: select * from cm_user where (id in (select assigned_to_id from cm_wo where location_id in (select id from cmv_loc_extract)) OR (id in (select user_id from cm_wo_labor where wo_id in (select id from cm_wo where location_id in (select id from cmv_loc_extract)))))
  • 16. CalemEAM 16© 2017 CalemEAM Inc. Step 10. Data Import • Use phpmysql to import data files extracted above • The order of file import is not important • Not all modules are covered in the data extraction and migration. You may use the process presented here to apply to other modules based on your needs. Contact us at support@calemeam.com if you need assistance.
  • 17. CalemEAM 17© 2017 CalemEAM Inc. Thank You! Thank You for Attending the CalemEAM Training! Visit Us at www.calemeam.com