Background technology
Analysis Services(Hereinafter referred to as SSAS)It is the multi-dimensional database of Microsoft, from traditional database extraction number
According to, and change into the database of oneself.For each dimension in SSAS, there are two attribute columns of Key and Name, Key row represent
Unique key assignments, Name row represent the text for showing(Show text attribute).It is right in database this two row can be pointed to
The table row answered.If Name attributes do not point to a certain row, the value of Key row is converted to character string as display text category by acquiescence
The value of property, that is, show text.Because Name Column Properties are text formatting, and SSAS uses a kind of special file format(Band
There is duplicate removal logic)To store the row of text formatting, the size that this file format has 4GB limits.
If a dimension is continuous integer, numerical value is from 1 to several hundred million, then the Name of this dimension row be exactly " 1 ",
" 2 ", " 3 ", " 4 " are up to character string as several hundred million, because these character strings are all characters that is unduplicated, finally storing
String size can easily exceed 4GB file size limitation, cause the failure in SSAS processing.Especially, in each dimension table
In have the dimension of one " group key ", its Key row are exactly the continuous integral number since 1, and in default situations, its Name, which is arranged, is exactly
The continuous integral number since 1 of text formatting.When the data row of dimension table is a lot, the Name row of " group key " can easily exceed
4GB。
The problem of being well over file size limitation for the data in dimension table in correlation technique, not yet propose have at present
The solution of effect.
The content of the invention
It is a primary object of the present invention to provide a kind for the treatment of method and apparatus of dimension table data, to solve dimension table number
According to being well over file size restricted problem.
To achieve these goals, according to an aspect of the invention, there is provided a kind of processing method of dimension table data,
Including:Increase data row in the database belonging to dimension table, wherein, the size of data row is less than the first preset value;Dimension is set
The display text attribute for spending target dimension in table points to data row;And control dimension table is loaded into data again.
Further, target dimension is determined in the following manner:Obtain the size of each dimension in dimension table;Judge respectively
Whether the size of each dimension is more than the second preset value, wherein, the second preset value is more than or equal to the first preset value;And determine
The dimension that the size judged is more than the second preset value is target dimension.
Further, data are classified as calculating row.
Further, the quantity of target dimension is multiple that the display text attribute for setting target dimension in dimension table is pointed to
Data row include:The display text attribute of each target dimension is set to be directed to data row.
To achieve these goals, according to another aspect of the present invention, there is provided a kind of processing unit of dimension table data,
The processing unit is mainly used in performing the processing method for any dimension table data that the above of the present invention is provided.
To achieve these goals, according to another aspect of the present invention, there is provided a kind of processing unit of dimension table data,
Including:Unit is established, for increasing data row in the database belonging to dimension table, wherein, the size of data row is less than first
Preset value;Setting unit, the display text attribute for setting target dimension in dimension table point to data row;And control is single
Member, data are loaded into again for control dimension table.
Further, the processing unit of dimension table data also includes:Acquiring unit, for obtaining each dimension in dimension table
Size;Judging unit, for judging whether the size of each dimension is more than the second preset value respectively, wherein, the second preset value
More than or equal to the first preset value;And determining unit, the dimension that the size for determining to judge is more than the second preset value are
Target dimension.
Further, data are classified as calculating row.
Further, the quantity of target dimension is multiple that setting unit is used for the display text for setting each target dimension
Attribute is directed to data row.
The present invention uses increases data row in the database belonging to dimension table, wherein, the size of data row is less than first
Preset value;The display text attribute of target dimension in dimension table is set to point to data row;And control dimension table is loaded into number again
According to.By the way that the display text attribute of dimension all in dimension table may determine that in dimension table into which compared with default size
The display text attribute of a little dimensions then exceedes at the dimension row of size limitation beyond the limitation of file size to these
Reason, i.e., these display text attributes are pointed into newly-increased data row, its size is not broken through the limitation of file size, solve dimension
Degree table data are well over the problem of limitation, and then reduce the effect that file size limitation brings adverse effect.
Embodiment
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase
Mutually combination.Describe the present invention in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
The embodiment of the present invention provides a kind of processing method of dimension table data, below to the dimension table number of the embodiment of the present invention
According to processing method be introduced:
Fig. 1 is the flow chart of the processing method of dimension table data according to embodiments of the present invention, as shown in figure 1, this method
Including steps S102 to step S106:
Step S102, increase data row in the database belonging to dimension table, wherein, the size of data row is pre- less than first
If value.Specifically, row can be calculated by increasing by one into the database belonging to dimension table, it can pass through logarithm to calculate row
Obtained according to other row in storehouse by same calculation formula, calculate row name, constant or function that row can be non-computational row, can also
It is the combination of above-mentioned element.But preset value should be less than by calculating the length of row, and Analysis Services are to the big of text
Small to be limited to be no more than 4GB, then the first preset value is not more than 4GB.
Step S104, the display text attribute of target dimension in dimension table is set(That is, Name is arranged)Point to data row.Due to
The file format of Key row does not have size limitation, therefore only change shows the attribute of text attribute.
Step S106, control dimension table are loaded into data again.After showing that text attribute points to the data row newly increased,
Again data are loaded into, then shows that the size of text attribute is equal with the data newly increased row, that is, shows the size of text attribute not
More than preset value.Specifically, Process Full operations can be performed in Analysis Services, make database again
It is loaded into data.When performing Process Full operations, all unique values for showing text attribute are first extracted from database, will
These values are converted into Analysis Services text formatting.
Further, it is determined that the method for target dimension includes step S1 to S3:
Step S1, obtain the size of each dimension in dimension table.Limited due to only having Name to exceed file size,
Therefore only obtain and show text attribute size.
Step S2, judges whether the size of each dimension is more than the second preset value respectively, and second preset value can be more than
Or equal to the first preset value, but likewise not greater than 4GB.
Step S3, it is determined that the dimension that the size judged is more than the second preset value is target dimension.
By the way that the display text attribute of dimension all in dimension table may determine that into dimension compared with default size
The display text attribute of which dimension is then arranged these dimensions more than size limitation beyond the limitation of file size in table
Handled, i.e., these display text attributes are pointed into newly-increased data row, its size is not broken through the limitation of file size, solve
Dimension table data of having determined is well over the problem of limitation, and then reduces the effect that file size limitation brings adverse effect
Fruit.
The embodiment of the present invention also provides a kind of processing unit of dimension table data, and the processing unit is mainly used in performing this hair
The processing method for the dimension table data that bright embodiment the above is provided, the dimension table provided below the embodiment of the present invention
The processing unit of data is specifically introduced:
Fig. 2 is the structural representation of the processing unit of the dimension table data of the embodiment of the present invention, as shown in Fig. 2 the device
Including establishing unit 10, setting unit 20 and control unit 30:
Unit 10 is established to be used to increase data row in the database belonging to dimension table, wherein, the size of data row is less than
First preset value.Specifically, row can be calculated by increasing by one into the database belonging to dimension table by establishing unit, row are calculated
It can be by being obtained to other row in database by same calculation formula, calculate row name that row can be non-computational row, often
The combination of amount or function or above-mentioned element.But preset value, Analysis should be less than by calculating the length of row
Services is limited to be no more than 4GB to the size of text, then the first preset value is not more than 4GB.
Setting unit 20 is used to set the display text attribute of target dimension in dimension table to point to data row.
Control unit 30 is loaded into data again for control dimension table.Because the file format of Key row does not have size limitation,
Therefore only change shows the attribute of text attribute.After showing that text attribute points to the data row newly increased, data are loaded into again,
Then show that the size of text attribute is equal with the data newly increased row, that is, show that the size of text attribute is no more than preset value.Tool
Body, Process Full operations can be performed in Analysis Services, database is loaded into data again.Perform
When Process Full are operated, all unique values for showing text attribute are first extracted from database, these values are converted
For Analysis Services text formatting.
Further, the processing unit of the dimension table data of the embodiment of the present invention also include acquiring unit, judging unit and
Determining unit, wherein:
Acquiring unit is used for the size for obtaining each dimension in dimension table.Due to only having Name to exceed file size
Limitation, therefore only obtain and show text attribute size,
Judging unit is used to judge whether the size of each dimension is more than the second preset value respectively, and second preset value can be with
More than or equal to the first preset value, but likewise not greater than 4GB.
The dimension that the size that determining unit is used to determine to judge is more than preset value is target dimension.
By the way that the display text attribute of dimension all in dimension table may determine that into dimension compared with default size
The display text attribute of which dimension is then arranged these dimensions more than size limitation beyond the limitation of file size in table
Handled, i.e., these display text attributes are pointed into newly-increased data row, its size is not broken through the limitation of file size, solve
Dimension table data of having determined is well over the problem of limitation, and then reduces the effect that file size limitation brings adverse effect
Fruit.
As can be seen from the above description, the present invention solves the problems, such as that dimension table data is well over limitation, and then
Reach and reduced the effect that file size limitation brings adverse effect.
Obviously, those skilled in the art should be understood that above-mentioned each module of the invention or each step can be with general
Computing device realize that they can be concentrated on single computing device, or be distributed in multiple computing devices and formed
Network on, alternatively, they can be realized with the program code that computing device can perform, it is thus possible to they are stored
Performed in the storage device by computing device, either they are fabricated to respectively each integrated circuit modules or by they
In multiple modules or step be fabricated to single integrated circuit module to realize.So, the present invention is not restricted to any specific
Hardware and software combines.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area
For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies
Change, equivalent substitution, improvement etc., should be included in the scope of the protection.