Skip to main content

How to Migrate a File Dataset That Contains New Fields

Background

When using the **One-Click Migration** feature in Guandata BI to migrate data, file datasets migrate only the structure, not the data. To ensure that file datasets in the source and target environments are completely consistent, you must manually import Excel or CSV data. See [One-Click Migration from Test Environment to Production Environment](9-测试环境一键迁移到生产环境.md). However, for datasets with newly created fields, directly exporting Excel from the source environment and importing it into the target environment causes duplicate field names. Therefore, newly created fields must be removed before export. The following uses test and production environments as examples to describe the steps in detail.

Procedure

Test Environment: One-Click Migration

On the test environment Excel dataset overview page, click Migrate. The page shows that migration succeeded.

Note

If the production environment already has a dataset with the same name, the original dataset will not be replaced even if migration succeeds. Rename the dataset in the test environment before migration, or delete or rename the dataset with the same name in the production environment.

If the production environment already has a dataset with the same name, the original dataset will not be replaced even if migration succeeds. Rename the dataset in the test environment before migration, or delete or rename the dataset with the same name in the production environment.

image.png
image.png

Go to the production environment and check the migrated dataset. The data structure is consistent with the test environment, but there is no data.

image.png

image.png

Test Environment: Filter Data - Select Columns, Remove New Fields, and Export Excel

image.png
image.png

Production Environment: Use the Excel Exported in Step 2 to Append or Replace Data

image.png

Note

If columns are not selected before exporting Excel in step 2, appending this Excel file causes duplicate columns. For example, the original dataset has 42 columns, including 17 newly created fields. After appending, it becomes 50 columns.

Q&A

  1. If Excel must be exported and imported, can I skip One-Click Migration and directly create a new dataset in the production environment?

A: If you do not plan to append data to the dataset later, you can directly export full data from the test environment and create a new file dataset in the production environment. However, the function formulas in newly created fields will be lost. If data needs to be appended later, unless the contents of the newly created fields are also appended, the newly created fields in the appended data will become null. If One-Click Migration is used, only original fields need to be appended later, and newly created fields are automatically generated according to the functions used.