Skip to main content

How to Migrate File Datasets with New Fields

Background

When using the "One-click Migration" function in Guandata BI to migrate data, for file datasets, only the structure will be migrated, not the data. If you want to ensure complete consistency between original and target environment file datasets, you still need to manually import Excel (or CSV) data (refer to [Test Environment One-click Migration to Production Environment](9-Test Environment One-click Migration to Production Environment.md)). However, for datasets with new fields, if you directly export Excel from the original environment and import to the target environment, it will cause field name conflicts. Therefore, you need to remove the new fields before exporting. The following uses test and production environments as examples to详细介绍操作步骤.

Operation Steps

1. Test Environment: One-click Migration

In the test environment Excel dataset overview interface, click migrate, showing migration successful.

Note: If the production environment already has datasets with the same name, even if migration shows successful, it won't replace the original dataset. You need to rename the test environment dataset before migrating, or delete (or rename) datasets with the same name in the production environment.

image.png
image.png

Check the migrated dataset in the production environment. The data structure is consistent with the test environment, but there's no data.

image.png

image.png

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

image.png
image.png

3. Production Environment: Use Excel from Step 2 to Append Data or Replace Data

image.png

Note: If you didn't select columns in Step 2 and directly exported Excel, appending this Excel will cause column duplication. For example, the original dataset had 42 columns including 17 new fields, after appending it becomes 50 columns.

Q&A

  1. If you must export and import Excel, then not using "One-click Migration", directly creating new datasets in the production environment, is that also possible?

Answer: If you don't consider appending data to the dataset later, you can directly export full data from the test environment and create new file datasets in the production environment. However, function formulas in new fields will be lost. Once you need to append data later, unless you append the new field content together, otherwise the new fields in appended content will become null values. If you use "One-click Migration", when appending data later, you only need to append original fields, and new fields will be automatically generated according to the function formulas used.