CN113515505A - Data model generation method and device of data warehouse and electronic equipment - Google Patents

Data model generation method and device of data warehouse and electronic equipment Download PDF

Info

Publication number
CN113515505A
CN113515505A CN202111065893.4A CN202111065893A CN113515505A CN 113515505 A CN113515505 A CN 113515505A CN 202111065893 A CN202111065893 A CN 202111065893A CN 113515505 A CN113515505 A CN 113515505A
Authority
CN
China
Prior art keywords
data
data model
style
component
slot
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111065893.4A
Other languages
Chinese (zh)
Other versions
CN113515505B (en
Inventor
潘健
林沛欣
卢超
陈永辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Xuanwu Wireless Technology Co Ltd
Original Assignee
Guangzhou Xuanwu Wireless Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Xuanwu Wireless Technology Co Ltd filed Critical Guangzhou Xuanwu Wireless Technology Co Ltd
Priority to CN202111065893.4A priority Critical patent/CN113515505B/en
Publication of CN113515505A publication Critical patent/CN113515505A/en
Application granted granted Critical
Publication of CN113515505B publication Critical patent/CN113515505B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management
    • G06F16/212Schema design and management with details for data modelling support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/283Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application relates to a data model generation method and device for a data warehouse and electronic equipment. The data model generation method of the data warehouse in the embodiment of the application comprises the following steps: acquiring a source data table; calling a preset data model component according to a data mapping relation in a source data table, wherein the data model component is a model Table component packaged through a vue.js frame, and at least one attribute interface used for setting the style of a data model is exposed outwards from the data model component; acquiring a predefined style attribute from a style tag, and transmitting the style attribute to an attribute interface; and generating a data model corresponding to the source data table according to the style attributes, wherein the data model is displayed with a fact table and a plurality of dimension tables, and the dimension tables are respectively connected with the fact table through arrows. According to the data model generation method of the data warehouse, custom style display can be achieved on the data sheet model of the data warehouse according to business requirements.

Description

Data model generation method and device of data warehouse and electronic equipment
Technical Field
The embodiment of the application relates to the technical field of data warehouses, in particular to a data model generation method and device for a data warehouse and electronic equipment.
Background
The Data Warehouse, known by the english name Data waterhouse, is a strategic collection that provides all types of Data support for all levels of decision-making processes of an enterprise. It is a single data store created for analytical reporting and decision support purposes, providing guidance on business process improvements, monitoring time, cost, quality, and control for enterprises that need business intelligence. The data warehouse is a structured data environment for Decision Support Systems (DSS) and online analytics application data sources.
When designing some complex systems, it is often necessary to establish a data model for a data warehouse, where the data model is a mapping of data relationships, that is, relationships between businesses are graphically depicted by the model, and are no longer a fuzzy relationship in mind. Through the construction of the model, a user can clearly see the internal incidence relation between data, so that an all-round data view angle is established, the problems of information islands and data differentiation are solved, and the consistency of the data is ensured.
At present, a few platforms provide online visual modeling solutions, users can import tables of their databases, and then drag the tables to an editing panel, the editing panel displays table names and fields in the tables, and then the association relationship between the tables can be established by connecting the fields between the tables.
As shown in fig. 1, fig. 1 is a standard star-shaped data model, in fig. 1, a fact table is used to record the full amount information of the analyzed content, and includes specific elements of each event and specific occurrences, a fact table stores region keys, time keys, department keys, product keys, sales amount and sales quantity, and a dimension table is description information of the elements of the events in the fact table and represents the angle from which the user observes the events.
At present, the conventional visualization modeling tool provides the capability of displaying the fields of the table in fig. 1 and constructing the table association relationship through the connecting lines, but does not provide the capability of realizing some personalized requirements.
Disclosure of Invention
The embodiment of the application provides a data model generation method and device for a data warehouse and electronic equipment, and the data model generation method and device can realize custom style display for a data sheet model of the data warehouse according to business requirements.
In a first aspect, an embodiment of the present application provides a data model generation method for a data warehouse, where the method includes:
acquiring a source data table;
calling a preset data model component according to a data mapping relation in the source data table, wherein the data model component is a model Table component packaged through a vue.js frame, and at least one attribute interface used for setting the style of the data model is exposed outwards from the data model component;
acquiring a predefined style attribute from a style tag, and transmitting the style attribute to the attribute interface;
and generating a data model corresponding to the source data table according to the style attributes, wherein the data model shows a fact table and a plurality of dimension tables, and the dimension tables are respectively connected with the fact table through arrows.
Optionally, the attribute interface of the style of the data model includes at least one of:
a tableClass attribute interface for setting the style of the data model component;
a captionClass attribute interface for setting a style of a header area of the fact table and the dimension table;
a contentClass attribute interface for setting a style of a content area of the fact table and the dimension table;
and the fieldClass attribute interface is used for setting the attribute name of each line field in the fact table.
Optionally, generating a data model corresponding to the source data table includes:
acquiring data exposed to the outside by the modelTable component through slot-scope, wherein a scope slot is added to a table field rendering part of the modelTable component, and the data exposed to the outside comprises data related to the table field currently;
assigning the externally exposed data to a self-defined variable;
and acquiring a pre-written service logic corresponding to the self-defined variable, and rendering the data content related to the table field in the data model according to the service logic.
Optionally, the service logic includes at least one of:
displaying the related content, the bound interactive event.
Optionally, generating a data model corresponding to the source data table includes:
acquiring a corresponding slot name and a custom structure corresponding to the slot through a v-slot instruction, wherein the slot is positioned above the table field and/or the slot is positioned below the table field;
and rendering the data model according to the self-defined structure.
Optionally, the slot includes a header slot located above the table field and a footer slot located below the table field.
In a second aspect, an embodiment of the present application provides an apparatus for generating a data model of a data warehouse, where the apparatus includes:
the source data table acquisition module is used for acquiring a source data table;
the data model component calling module is used for calling a preset data model component according to a data mapping relation in the source data table, wherein the data model component is a modelTable component packaged through a vue.js framework, and at least one attribute interface used for setting the style of the data model is exposed outwards from the data model component;
the style attribute acquisition module is used for acquiring predefined style attributes from the style label and transmitting the style attributes to the attribute interface;
and the data model generation module is used for generating a data model corresponding to the source data table according to the style attributes, wherein the data model is displayed with a fact table and a plurality of dimension tables, and the dimension tables are respectively connected with the fact table through arrows.
In a third aspect, an embodiment of the present application provides an electronic device, including:
at least one memory and at least one processor;
the memory for storing one or more programs;
when executed by the at least one processor, the one or more programs cause the at least one processor to implement the steps of the data model generation method for a data warehouse according to the first aspect of the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the steps of the data model generation method for a data warehouse according to the first aspect of the present application.
In the embodiment of the application, the style name of each part of the data model structure is designed into the external exposure attribute, and then the input style name attribute value is dynamically bound to the model Table component, so that the capability of customizing the style of the data model is realized; in the data model, the key name of the data is designed to be a parameter input, but not a fixed name, and is determined according to the input key name parameter, if the key name is not input, a default value is used, and the data coupling is greatly reduced; a slot is added to a certain position in the data model, so that the corresponding slot name can be added to the rear of a v-slot instruction when the component is called, and a user-defined structure is added to the specified position of the data model; a scope slot is added to a table field rendering part of a modelTable component structure, data related to a current field is exposed, the field data can be taken when the component is called, service logic can be written, and decoupling of page rendering and the service logic is achieved.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Drawings
FIG. 1 is a schematic diagram of a data model of a data warehouse provided in the prior art;
FIG. 2 is a flow diagram of a data model generation method for a data warehouse provided in an exemplary embodiment;
FIG. 3 is a schematic diagram of a data model of a data warehouse provided in an exemplary embodiment;
FIG. 4 is a schematic block diagram of a data model generation apparatus for a data warehouse, provided in an exemplary embodiment;
fig. 5 is a schematic structural diagram of an electronic device provided in an exemplary embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that the embodiments described are only some embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the embodiments in the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the present application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims. In the description of the present application, it is to be understood that the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not necessarily used to describe a particular order or sequence, nor are they to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Aiming at the technical problems in the background art, the embodiment of the application provides a data model generation method for a data warehouse, which can realize customized style display and customized interaction on the data model of the data warehouse according to the business requirements, and can also insert a customized structure.
As shown in fig. 2, in one embodiment, the method comprises the steps of:
s201: and acquiring a source data table.
The source data table is a data table in the data warehouse, and a user can lead the source data table into the visual modeling platform and drag the source data table into the editing panel on an operation interface of the platform to generate a data model.
The data model may be a star data model as shown in fig. 1, or may be a common data model structure such as a snowflake model, a constellation model, and the like, in which a fact table and a dimension table are shown.
S202: and calling a preset data model component according to the data mapping relation in the source data table, wherein the data model component is a model Table component packaged through a vue.js frame, and at least one attribute interface used for setting the style of the data model is exposed outwards by the data model component.
In the embodiment of the application, the data model is packaged into a component named model Table through the capability provided by the vue.js technical framework, and the capability of custom extension of the data model is provided.
The style includes a name, and colors, field attributes, and the like of different display regions. In one specific example, the modelTable component exposes the following property interfaces outward for setting data model-related styles:
attribute name: tableClass, action: the model is used for setting the style of the whole model assembly;
attribute name: captionClass, action: the style used for setting the header area;
attribute name: contentClass, role: a style for setting a table content region;
attribute name: fieldClass, action: for setting the properties of each line field.
S203: and acquiring a predefined style attribute from the style tag, and transmitting the style attribute to the attribute interface.
In the style tag, a style name is predefined, and then an input style class name attribute value is dynamically input into an attribute interface and bound to a model Table component, so that the display style of the model Table component is customized.
In a specific example, the header is set to have a background color of red and a text color of white, and the related implementation codes are as follows:
1) writing styles
<style>
.custom-caption {
Red background color set
color white, color/color of characters set to white
}
</style>
2) Passing the class name of the style as an attribute value to a captionClass attribute interface
<model-table
captionClass ="custom-caption"
......
.....>
</model-table>。
S204: and generating a data model corresponding to the source data table according to the style attributes, wherein the data model shows a fact table and a plurality of dimension tables, and the dimension tables are respectively connected with the fact table through arrows.
In a specific example, as shown in fig. 3, through the above steps, when generating the data model, the customization of the background color and the text color of the header of the fact table is realized.
In another embodiment, the scope slot provided by vue.js is also utilized, so that the data model not only displays the name of the field in the data table, but also can insert additional elements according to the requirements of the service, and when the additionally inserted elements are rendered, the data of the current field can be taken, and the service logic can be written according to the requirements; therefore, the modelTable component is only responsible for rendering the table structure, and exposes data to the outside so as to write display content and binding interaction events according to requirements, thereby realizing service decoupling.
Specifically, in the process of generating the data model corresponding to the source data table, the following steps are further executed:
acquiring data exposed to the outside by the modelTable component through slot-scope, wherein a scope slot is added to a table field rendering part of the modelTable component, and the data exposed to the outside comprises data related to the table field currently;
assigning the externally exposed data to a self-defined variable;
and acquiring a pre-written service logic corresponding to the self-defined variable, and rendering the data content related to the table field in the data model according to the service logic.
Wherein the service logic may be displaying related content, or binding interaction events, etc. For example, in fig. 3, the display content of the field is customized, and a check button is also added to the corresponding field in the fact table, and the interaction event corresponding to the button.
In the embodiment of the application, a scope slot is added to a part of table field rendering of the modelTable component, some data, for example, row = 'field', is bound to a slot label, data related to a current field is exposed, and the data exposed outside the modelTable component is taken through slot-scope and is assigned to a custom variable name, for example, 'scope'.
In one example, the data exposed to the outside is as follows:
variable name: row, description: a value referring to each entry in the columns array;
variable name: $ index, description: the index referring to the field starts from 0.
When the modelTable component is called, the field data can be taken to write the service logic, and the decoupling of page rendering and the service logic is realized.
In one specific example, the partially dependent implementation code is as follows:
</script>
< | component invocation >
<template>
< | the component is invoked and the data required to render the component is passed in >
<model-table :node="nodeData">
< | insert custom structures and get to the data exposed outside through slot-scope >
<div slot-scope="scope">
< | customized rendered content from externally exposed data >
< span > line { { scope. $ index + 1} }, { { scope. row. field name } } - - { { scope. row. field CNname } }, { { scope. row. field CNname } } < span >
< | A selection event interaction of the binding check button >
<checkbox @change="handleCheck(scope.row)"></checkbox>
</div>
</model-table>
</template>
The code finally realizes that the rendering effect of the check button is added in the field.
In another specific example, the associated implementation code is as follows:
<model-table:node="nodeData"
tableNameKey="modelName">
<! - -where data variables exposed to the outside are taken by slot-scope instructions and assigned to an object called scope >
<div slot-scope="scope">
<! -rendering variables through the template grammar provided by vuejs to achieve the effect of displaying content according to business requirements >
The first { { scope. $ index + 1} } field
{{ scope.row.name }} -- {{scope.row.zhName}}
</div>
</model-table>
The code finally realizes the rendering effect of assigning the zhName to the field name.
In another embodiment, in the process of generating the data model corresponding to the source data table, the following steps are further executed:
acquiring a corresponding slot name and a custom structure corresponding to the slot through a v-slot instruction, wherein the slot is positioned above the table field and/or the slot is positioned below the table field;
and rendering the data model according to the self-defined structure.
Specifically, two slots of a header and a footer are respectively provided above and below the table field, and are used for inserting some self-defined structures into fixed positions in the data model, and the inserted self-defined structures need to add a v-slot: header instruction or a v-slot: footer instruction to specify which position to insert.
In one specific example, the relevant implementation code is as follows:
<template>
<model-table>
< div v-slot: head > here is a custom head >
Foster is here a custom Foster >
</model-table>
</template>
The customized structure may be a full selection button added in the header area and an "add count column" button added below the table, as shown in fig. 3.
In a specific example, the structure of the modelTable component of the embodiment of the present application is as follows:
<template>
<div class="model-table" :class="[tableClass]" :style="styleContent">
<i class="close-icon el-icon-circle-close" @click="$emit('deleteTable', node.data)"></i>
<header class="table-name" :class="[captionClass]">{{ node.data[tableNameKey] }}</header>
<div :class=["table-fields", contentClass]>
<slot name="header"></slot>
<div v-for="(field, index) in node.data[fieldsKey]"
:id="field[fieldIdKey]"
:key="field[fieldIdKey]"
:class=["fields-item", fieldClass]>
<slot :row="field" :$index="index">
<span>{{ field[fieldNameKey] }}</span>
</slot>
</div>
<slot name="footer"></slot>
</div>
</div>
</template>
in the structure, the slot name tag enables a model Table component to add a self-defined element at a corresponding position when in use, and the slot row tag is used for providing complete data of fields externally and enabling the model Table component to take the data of each field to write business logic when in calling. The variable in class = [. ] is the class name of the set style, which is passed in when the modelTable component calls to control the display of the style.
In the embodiment of the application, the style name of each part of the data model structure is designed into the external exposure attribute, and then the input style name attribute value is dynamically bound to the model Table component, so that the capability of customizing the style of the data model is realized; in the data model, the key name of the data is designed to be a parameter input, but not a fixed name, and is determined according to the input key name parameter, if the key name is not input, a default value is used, and the data coupling is greatly reduced; a slot is added to a certain position in the data model, so that the corresponding slot name can be added to the rear of a v-slot instruction when the component is called, and a user-defined structure is added to the specified position of the data model; a scope slot is added to a table field rendering part of a modelTable component structure, data related to a current field is exposed, the field data can be taken when the component is called, service logic can be written, and decoupling of page rendering and the service logic is achieved.
Fig. 4 is a schematic structural diagram of a data model generating apparatus of a data warehouse according to an embodiment of the present application, and as shown in fig. 4, the data model generating apparatus 400 of the data warehouse includes:
a source data table obtaining module 401, configured to obtain a source data table;
a data model component calling module 402, configured to call a preset data model component according to a data mapping relationship in the source data table, where the data model component is a modelTable component encapsulated by a vue.js frame, and the data model component is exposed to the outside by at least one attribute interface for setting a style of the data model;
a style attribute acquiring module 403, configured to acquire a predefined style attribute from a style tag and transmit the style attribute to the attribute interface;
and a data model generating module 404, configured to generate a data model corresponding to the source data table according to the style attribute, where the data model shows a fact table and multiple dimension tables, and the multiple dimension tables are connected to the fact table through arrows respectively.
In an exemplary embodiment, the property interface of the style of the data model comprises at least one of:
a tableClass attribute interface for setting the style of the data model component;
a captionClass attribute interface for setting a style of a header area of the fact table and the dimension table;
a contentClass attribute interface for setting a style of a content area of the fact table and the dimension table;
and the fieldClass attribute interface is used for setting the attribute name of each line field in the fact table.
In an exemplary embodiment, the data model generation module 404 includes:
an exposed data acquiring unit, configured to acquire, through slot-scope, externally-exposed data of the modelTable component, where a scope slot is added to a table field rendering part of the modelTable component, and the externally-exposed data includes data related to a current table field;
the exposed data assignment unit is used for assigning the externally exposed data to a user-defined variable;
and the first rendering unit is used for acquiring the pre-written service logic corresponding to the self-defined variable and rendering the data content related to the table field in the data model according to the service logic.
In an exemplary embodiment, the business logic comprises at least one of:
displaying the related content, the bound interactive event.
In an exemplary embodiment, the data model generation module 404 includes:
the slot attribute acquisition unit is used for acquiring a corresponding slot name and a custom structure corresponding to the slot through a v-slot instruction, wherein the slot is positioned above the table field and/or the slot is positioned below the table field;
and the second rendering unit is used for rendering the data model according to the self-defined structure.
In an exemplary embodiment, the slot slots include a header slot above the table field and a footer slot below the table field.
As shown in fig. 5, fig. 5 is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
The electronic device includes a processor 910 and a memory 920. The number of the processors 910 in the main control chip may be one or more, and one processor 910 is taken as an example in fig. 5. The number of the memories 920 in the main control chip may be one or more, and one memory 920 is taken as an example in fig. 5.
The memory 920 is used as a computer-readable storage medium, and can be used to store software programs, computer-executable programs, and modules, such as the program of the data model generation method for the data warehouse according to any embodiment of the present application, and the program instructions/modules corresponding to the data model generation method for the data warehouse according to any embodiment of the present application. The memory 920 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the device, and the like. Further, the memory 920 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 920 may further include memory located remotely from the processor 910, which may be connected to devices over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor 910 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 920, that is, implements the data model generating method of the data warehouse described in any of the above embodiments.
The present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the data model generating method of the data warehouse according to any one of the above embodiments.
The present invention may take the form of a computer program product embodied on one or more storage media including, but not limited to, disk storage, CD-ROM, optical storage, and the like, having program code embodied therein. Computer readable storage media, which include both non-transitory and non-transitory, removable and non-removable media, may implement any method or technology for storage of information. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of the storage medium of the computer include, but are not limited to: phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium may be used to store information that may be accessed by a computing device.
It is to be understood that the embodiments of the present application are not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the embodiments of the present application is limited only by the following claims.
The above-mentioned embodiments only express a few embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for those skilled in the art, variations and modifications can be made without departing from the concept of the embodiments of the present application, and these embodiments are within the scope of the present application.

Claims (9)

1. A method of generating a data model for a data warehouse, the method comprising:
acquiring a source data table;
calling a preset data model component according to a data mapping relation in the source data table, wherein the data model component is a model Table component packaged through a vue.js frame, and at least one attribute interface used for setting the style of the data model is exposed outwards from the data model component;
acquiring a predefined style attribute from a style tag, and transmitting the style attribute to the attribute interface;
and generating a data model corresponding to the source data table according to the style attributes, wherein the data model shows a fact table and a plurality of dimension tables, and the dimension tables are respectively connected with the fact table through arrows.
2. The data model generation method of the data warehouse according to claim 1, wherein the attribute interface of the style of the data model comprises at least one of:
a tableClass attribute interface for setting the style of the data model component;
a captionClass attribute interface for setting a style of a header area of the fact table and the dimension table;
a contentClass attribute interface for setting a style of a content area of the fact table and the dimension table;
and the fieldClass attribute interface is used for setting the attribute name of each line field in the fact table.
3. The method of claim 1, wherein generating the data model corresponding to the source data table comprises:
acquiring data exposed to the outside by the modelTable component through slot-scope, wherein a scope slot is added to a table field rendering part of the modelTable component, and the data exposed to the outside comprises data related to the table field currently;
assigning the externally exposed data to a self-defined variable;
and acquiring a pre-written service logic corresponding to the self-defined variable, and rendering the data content related to the table field in the data model according to the service logic.
4. The data model generation method of a data warehouse of claim 3, wherein:
the business logic comprises at least one of:
displaying the related content, the bound interactive event.
5. The method of claim 3, wherein generating the data model corresponding to the source data table comprises:
acquiring a corresponding slot name and a custom structure corresponding to the slot through a v-slot instruction, wherein the slot is positioned above the table field and/or the slot is positioned below the table field;
and rendering the data model according to the self-defined structure.
6. The data model generation method of a data warehouse of claim 5, wherein:
the slot comprises a header slot located above the table field and a footer slot located below the table field.
7. An apparatus for generating a data model of a data warehouse, the apparatus comprising:
the source data table acquisition module is used for acquiring a source data table;
the data model component calling module is used for calling a preset data model component according to a data mapping relation in the source data table, wherein the data model component is a modelTable component packaged through a vue.js framework, and at least one attribute interface used for setting the style of the data model is exposed outwards from the data model component;
the style attribute acquisition module is used for acquiring predefined style attributes from the style label and transmitting the style attributes to the attribute interface;
and the data model generation module is used for generating a data model corresponding to the source data table according to the style attributes, wherein the data model is displayed with a fact table and a plurality of dimension tables, and the dimension tables are respectively connected with the fact table through arrows.
8. An electronic device, comprising:
at least one memory and at least one processor;
the memory for storing one or more programs;
the one or more programs, when executed by the at least one processor, cause the at least one processor to perform the steps of the data model generation method for a data warehouse of any of claims 1 to 6.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the data model generation method of a data warehouse according to any one of claims 1 to 6.
CN202111065893.4A 2021-09-13 2021-09-13 Data model generation method and device of data warehouse and electronic equipment Active CN113515505B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111065893.4A CN113515505B (en) 2021-09-13 2021-09-13 Data model generation method and device of data warehouse and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111065893.4A CN113515505B (en) 2021-09-13 2021-09-13 Data model generation method and device of data warehouse and electronic equipment

Publications (2)

Publication Number Publication Date
CN113515505A true CN113515505A (en) 2021-10-19
CN113515505B CN113515505B (en) 2021-12-17

Family

ID=78063320

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111065893.4A Active CN113515505B (en) 2021-09-13 2021-09-13 Data model generation method and device of data warehouse and electronic equipment

Country Status (1)

Country Link
CN (1) CN113515505B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113721895A (en) * 2021-11-02 2021-11-30 树根互联股份有限公司 Application modeling method, system, device, computer equipment and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0423723A2 (en) * 1989-10-17 1991-04-24 Fujitsu Limited Data retrieval system for relational database
US20050289524A1 (en) * 2004-06-22 2005-12-29 Mcginnes Simon Systems and methods for software based on business concepts
US20080215621A1 (en) * 2007-03-01 2008-09-04 Karthik Ravindran Metamodel-based automatic report generation
CN110377371A (en) * 2019-07-23 2019-10-25 中信百信银行股份有限公司 A kind of style sheet method for managing system based on Web label
CN112506493A (en) * 2020-10-30 2021-03-16 福建亿能达信息技术股份有限公司 Table configuration method, device, equipment and medium based on vue
CN112784529A (en) * 2021-02-03 2021-05-11 叮当快药科技集团有限公司 Mobile terminal sorting table based on BetterScroll and construction method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0423723A2 (en) * 1989-10-17 1991-04-24 Fujitsu Limited Data retrieval system for relational database
US20050289524A1 (en) * 2004-06-22 2005-12-29 Mcginnes Simon Systems and methods for software based on business concepts
US20080215621A1 (en) * 2007-03-01 2008-09-04 Karthik Ravindran Metamodel-based automatic report generation
CN110377371A (en) * 2019-07-23 2019-10-25 中信百信银行股份有限公司 A kind of style sheet method for managing system based on Web label
CN112506493A (en) * 2020-10-30 2021-03-16 福建亿能达信息技术股份有限公司 Table configuration method, device, equipment and medium based on vue
CN112784529A (en) * 2021-02-03 2021-05-11 叮当快药科技集团有限公司 Mobile terminal sorting table based on BetterScroll and construction method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄金时代的架构之路: ""JTable简单介绍,以及tableModel的使用"", 《CSDN》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113721895A (en) * 2021-11-02 2021-11-30 树根互联股份有限公司 Application modeling method, system, device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
CN113515505B (en) 2021-12-17

Similar Documents

Publication Publication Date Title
US8020110B2 (en) Methods for defining queries, generating query results and displaying same
US20080307490A1 (en) Methods and apparatus for building and executing natural language workflow functions
US20150058093A1 (en) Reusable user interface control and ranking circle
KR20060106648A (en) Association and visualization of schematized business networks
US9135314B2 (en) System and method for improved consumption models for summary analytics
CN101414301B (en) Device and method for processing object in reservoir in content management system
CN112558967A (en) Page automatic generation method and device, electronic equipment and storage medium
CN106557454B (en) Method and system for converting document into table
CN111259644A (en) Rich text processing method, editor, equipment and storage medium
CN106055535B (en) Chart generation method and device
CN115840567A (en) Application editing method and related equipment
US8122381B2 (en) Context debugger
CN113515505B (en) Data model generation method and device of data warehouse and electronic equipment
US20050108681A1 (en) Method and system for applying user interface elements to data
CN113326044A (en) Development method, system and storage medium based on control library
US5479589A (en) Object-oriented system for selecting a graphic image on a display
US20120260237A1 (en) Portable Business Language and Automated Software Application Development System
CN109358919B (en) Dynamic configuration method and device for universal page, computer equipment and storage medium
CN113688141B (en) Application function design method and software development platform
CN107766306B (en) Data display method and equipment
CN114995931A (en) Display method and device of project bulletin board, storage medium and computer equipment
CN114238724A (en) Data visualization method and device
CN115687704A (en) Information display method and device, electronic equipment and computer readable storage medium
CN108563621B (en) PDF report generation method, device, equipment and storage medium
CN110688108A (en) Model generation method and device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 510000 room 23bd, No. 109, system West Road, Tianhe District, Guangzhou City, Guangdong Province

Patentee after: GUANGZHOU XUANWU WIRELESS TECHNOLOGY Co.,Ltd.

Address before: 32B, no.103b, TianLiHe Road, Guangzhou, 510000

Patentee before: GUANGZHOU XUANWU WIRELESS TECHNOLOGY Co.,Ltd.