Method and apparatus for mapping processing
AssigneesChenyi Zhao, Kunlun Yao
InventorsChenyi Zhao, Kunlun Yao
Life of this patent
Estimating the term…
Abstract
Embodiments of the present disclosure relate to a method and apparatus for mapping processing. The method comprises acquiring a first table and a second table, and determining a first header of the first table and a second header of the second table based on received attribute setting information. The method further comprises acquiring a group of column names from the first header and the second header, wherein the group of column names includes a first column name in the first table and a second column name in the second table. The method also comprises mapping the group of column names to a mapped column name; merging the first table and the second table based on the mapped column name and outputting a merged table.
Claims18
A method, comprising:
- acquiring one or more source files, wherein the one or more source files include at least a first table and a second table;
- acquiring attribute setting information, wherein the attribute setting information includes a setting starting row number, a setting ending row number and a common field between column names in the first table and the second table;
- determining a starting row spacing based on the setting starting row number and a field row number of the common field;
- determining an ending row spacing based on the setting ending row number and the field row number of the common field;
- generating a common field index set based on the common field by traversing the one or more source files, wherein the common field index set includes at least a first field row number of the common field in the first table and a second field row number of the common field in the second table;
- generating a starting row index set based on the common field index set and the starting row spacing, wherein the starting row index set includes a first starting row number of the first table and a second starting row number of the second table;
- generating an ending row index set based on the common field index set and the ending row spacing, wherein the ending row index set includes a first ending row number of the first table and a second ending row number of the second table;
- determining a first header of the first table and a second header of the second table based on the starting row index set and the ending row index set;
- acquiring a group of column names from the first header and the second header, wherein the group of column names includes a first column name associated with the first table and a second column name associated with the second table;
- displaying a column name management area and a mapping area in response to a mapping initiation operation, wherein the group of column names is displayed in the column name management area;
- receiving, in the column name management area, a selection for at least one of the first column name and the second column name;
- determining a mapped column name for the selected column name;
- displaying the selected column name in the mapping area, wherein the selected column name and the mapped column name are displayed in the same column in the mapping area;
- mapping the group of column names to the mapped column name;
- merging the first table and the second table based on the mapped column name;
- and
- outputting a merged table.
A computing device, comprising:
- at least one processing unit;
- and
- at least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions executed by the at least one processing unit, and when executed by the at least one processing unit, the instructions causing the computing device to:
- acquire one or more source files, wherein the one or more source files include at least a first table and a second table;
- acquire attribute setting information, wherein the attribute setting information includes a setting starting row number, a setting ending row number and a common field between column names in the first table and the second table;
- determine a starting row spacing based on the setting starting row number and a field row number of the common field;
- determine an ending row spacing based on the setting ending row number and the field row number of the common field;
- generate a common field index set based on the common field by traversing the one or more source files, wherein the common field index set includes at least a first field row number of the common field in the first table and a second field row number of the common field in the second table;
- generate a starting row index set based on the common field index set and the starting row spacing, wherein the starting row index set includes a first starting row number of the first table and a second starting row number of the second table;
- generate an ending row index set based on the common field index set and the ending row spacing, wherein the ending row index set includes a first ending row number of the first table and a second ending row number of the second table;
- determine a first header of the first table and a second header of the second table based on the starting row index set and the ending row index set;
- acquire a group of column names from the first header and the second header, wherein the group of column names includes a first column name associated with the first table and a second column name associated with the second table, wherein the first column name is different from the second column name;
- display a column name management area and a mapping area in response to a mapping initiation operation, wherein the group of column names is displayed in the column name management area;
- receive, in the column name management area, a selection for at least one of the first column name and the second column name;
- determine a mapped column name for the selected column name;
- display the selected column name in the mapping area, wherein the selected column name and the mapped column name are displayed in the same column in the mapping area;
- map the group of column names to the mapped column name;
- merge the first table and the second table based on the mapped column name;
- and
- output a merged table.
A computer-readable storage medium, including machine-executable instructions, when executed by a device, the machine-executable instruction causing the device to:
- acquire one or more source files, wherein the one or more source files include at least a first table and a second table;
- acquire attribute setting information, wherein the attribute setting information includes a setting starting row number, a setting ending row number and a common field between column names in the first table and the second table;
- determine a starting row spacing based on the setting starting row number and a field row number of the common field;
- determine an ending row spacing based on the setting ending row number and the field row number of the common field;
- generate a common field index set based on the common field by traversing the one or more source files, wherein the common field index set includes at least a first field row number of the common field in the first table and a second field row number of the common field in the second table;
- generate a starting row index set based on the common field index set and the starting row spacing, wherein the starting row index set includes a first starting row number of the first table and a second starting row number of the second table;
- generate an ending row index set based on the common field index set and the ending row spacing, wherein the ending row index set includes a first ending row number of the first table and a second ending row number of the second table;
- determine a first header of the first table and a second header of the second table based on the starting row index set and the ending row index set;
- acquire a group of column names from the first header and the second header, wherein the group of column names includes a first column name associated with the first table and a second column name associated with the second table, wherein the first column name is different from the second column name;
- display a column name management area and a mapping area in response to a mapping initiation operation, wherein the group of column names is displayed in the column name management area;
- receive, in the column name management area, a selection for at least one of the first column name and the second column name;
- determine a mapped column name for the selected column name;
- display the selected column name in the mapping area, wherein the selected column name and the mapped column name are displayed in the same column in the mapping area;
- map the group of column names to the mapped column name;
- merge the first table and the second table based on the mapped column name;
- and
- output a merged table.
Dependencies are inferred from the claim text.