================================================================

=============================

#

Talk

#

8 Mar 2024 · 16:50 ~ 17:10
Creating custom bench command

================================================================

Zeel Prajapati
Software Engineer
rtCamp

Importing data via CSV files is indeed a good method within Frappe for data migration. However, when dealing with data that spans across multiple DocTypes and includes child-tables, the process of updating this manually and in CSV before import can become quite cumbersome and time-consuming.


This topic comes from our first-hand experience of migrating Accounting data, and HRMS data including previous interviews (Recruitee) and transitioning migration from previous HRMS platform Keka.


We also wanted to import everything according to ERPNext standards. I.e. all the previous payslips, invoices etc. should be there on the ERPNext. As accounting and payslips are connected with each other and there are multiple other DocTypes are in use, huge data size, and data required to be modified while importing, we decided to run the migration via CLI. → A lesson from our WordPress experience.


In this talk we will cover:

  1. Why to use CLI Imports
  2. Frappe's default commands to run code in the backend (bench execute and bench console).
  3. Introduction to creating custom commands for Bench CLI.
  4. Demo of migrations and brief overview of code explanation.



================================================================

=============================

================================================================