SlideShare a Scribd company logo
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

More Related Content

Similar to 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 1
singhadarsh
 
Chapter 8 part2
Chapter 8   part2Chapter 8   part2
Chapter 8 part2
application developer
 
Loading Data into Redshift
Loading Data into RedshiftLoading Data into Redshift
Loading Data into Redshift
Amazon Web Services
 
000 252
000 252000 252
000 252
ambrevan87
 
Loading Data into Redshift
Loading Data into RedshiftLoading Data into Redshift
Loading Data into Redshift
Amazon Web Services
 
Loading Data into Redshift
Loading Data into RedshiftLoading Data into Redshift
Loading Data into Redshift
Amazon Web Services
 
Loading Data into Redshift with Lab
Loading Data into Redshift with LabLoading Data into Redshift with Lab
Loading Data into Redshift with Lab
Amazon Web Services
 
Client deployment
Client deploymentClient deployment
Client deployment
SyAM Software
 
AutoUpgrade and Best Practices
AutoUpgrade and Best PracticesAutoUpgrade and Best Practices
AutoUpgrade and Best Practices
Jitendra Singh
 
Loading Data into Amazon Redshift
Loading Data into Amazon RedshiftLoading Data into Amazon Redshift
Loading Data into Amazon Redshift
Amazon 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 Scale
Amazon Web Services
 
Configuration manager
Configuration managerConfiguration manager
Configuration manager
Raghu nath
 
6 tips for improving ruby performance
6 tips for improving ruby performance6 tips for improving ruby performance
6 tips for improving ruby performance
Engine 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 SF
Amazon 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 Talks
Amazon Web Services
 
Introduction to mysql part 3
Introduction to mysql part 3Introduction to mysql part 3
2014-11-05-DataCollection
2014-11-05-DataCollection2014-11-05-DataCollection
2014-11-05-DataCollection
Peter Dupuis
 

Similar to 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
 

Recently uploaded

Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 

Recently uploaded (20)

Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 

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