A method and device for etl testing
A technology of test sub and test object, applied in the field of data warehouse analysis, can solve the problems of low test efficiency, complex test process, huge amount of tasks, etc., and achieve the effect of reducing test complexity, small test scope, and clear test scope
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
test Embodiment 1
[0079]
[0080] (6) Verification of test results
[0081] Test result verification consists of two steps:
[0082] The first step is to verify whether the number of records is consistent. If the number of records is inconsistent, there must be a problem. Check the problem and find out the reason. In the second step, if the number of records is consistent, check whether the value is correct.
[0083] Specifically, two methods can be used to achieve this:
[0084] Method 1: use minus
[0085] SELECT * FROM target_a
[0086] MINUS
[0087] SELECT * FROM test_map;
[0088] It is worth noting that the positions of the two tables must be exchanged here for comparison. When the Minus function is compared, the first table shall prevail, and the inconsistency between the first table and the second table shall be found. That is: find out the results that are inconsistent with the map table in the sumdt0 table.
[0089] Method 2: Write a script for verification.
[0090] The ...
test Embodiment 2
[0134] Test Case 2: Indicator Check
[0135] Inserting results
[0136] selectid, sum(a.gmv) asgmvfromtable01agroupbya.id
[0137] Sub-step S31-2, obtaining source table information on which the current test sub-object depends. In a specific implementation, data preparation can be performed directly through SQL statements. Such as insertintotestable(a,b)values(a,b); or, you can write a stored procedure or a java program to achieve, such as: write a loop to realize the Cartesian set of certain fields, assign values, etc., and generate SQL statements to realize the data Preparation, the data prepared here is only the test data for a single test sub-object, and the structure is relatively simple.
[0138] For example, it is analyzed that the source table that test sub-object 1 depends on is table01, so the data preparation script for table01 data preparation:
[0139] insertintotable01(id, gmv) values(1, 200);
[0140] insertintotable01(id, gmv) values(2, 300);
[0141] Sub...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


