Techniques for transforming and loading data into a fact table in a data warehouse
First Claim
1. A method of facilitating transformation of a set of records, the method comprising:
- determining, by a computer system, a plurality of dimension tables associated with a fact table in a data warehouse;
determining, by the computer system, a set of one or more dimension tables from the plurality of dimension tables for which an outer join operation is to be used for adding foreign keys corresponding to the dimension tables to a plurality of records stored in a staging table prior to loading of the records in the fact table in the data warehouse,wherein determining the set of dimension tables comprises;
executing, by the computer system, a query in which a first dimension table from the plurality of dimension tables is outer joined with the staging table, anddetermining, by the computer system, if the first dimension table belongs to the set of dimension tables based upon information determined from execution of the query,wherein the information comprises an indication of whether at least a portion of the staging table was written to disk in response to execution of the query;
providing, by the computer system, a query for outer joining the dimension tables in the set of dimension tables to the staging table, wherein execution of the query causes, for each dimension table in the set of dimension tables, one or more foreign keys for the dimension table to be added to the records of the staging table; and
creating, by the computer system, one or more lookup transformations for each dimension table in the plurality of dimension tables that is not included in the set of dimension tables, wherein a lookup transformation for a dimension table is usable for adding one or more foreign keys corresponding to the dimension table to the records in the staging table.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques for transforming records prior to loading the records into a data warehouse in an efficient manner. In one embodiment, instead of using lookup transformations, a database operation such as an outer join operation is used to transform records stored in a fact staging table to add foreign keys to the records corresponding to the dimension tables that are associated with a fact table in a data warehouse to which the records are to be loaded. Since the outer join operation is memory intensive, a determination is made as to which dimension tables from the multiple dimension tables associated with the fact table are suitable, from a performance perspective, for the outer join operation. Only those suitable dimension tables are outer joined to the fact staging table to add the foreign keys for the outer joined dimension tables to the fact staging table records. Lookup transformations may be used to add foreign keys to the fact staging table records for the non-suitable dimension tables. The transformed fact records with the foreign keys may then be loaded into the fact table in the data warehouse.
-
Citations
18 Claims
-
1. A method of facilitating transformation of a set of records, the method comprising:
-
determining, by a computer system, a plurality of dimension tables associated with a fact table in a data warehouse; determining, by the computer system, a set of one or more dimension tables from the plurality of dimension tables for which an outer join operation is to be used for adding foreign keys corresponding to the dimension tables to a plurality of records stored in a staging table prior to loading of the records in the fact table in the data warehouse, wherein determining the set of dimension tables comprises; executing, by the computer system, a query in which a first dimension table from the plurality of dimension tables is outer joined with the staging table, and determining, by the computer system, if the first dimension table belongs to the set of dimension tables based upon information determined from execution of the query, wherein the information comprises an indication of whether at least a portion of the staging table was written to disk in response to execution of the query; providing, by the computer system, a query for outer joining the dimension tables in the set of dimension tables to the staging table, wherein execution of the query causes, for each dimension table in the set of dimension tables, one or more foreign keys for the dimension table to be added to the records of the staging table; and creating, by the computer system, one or more lookup transformations for each dimension table in the plurality of dimension tables that is not included in the set of dimension tables, wherein a lookup transformation for a dimension table is usable for adding one or more foreign keys corresponding to the dimension table to the records in the staging table. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 11, 12, 13)
-
-
9. A method of facilitating transformation of a set of records, the method comprising:
-
determining, by a computer system, which one or more dimension tables from a plurality of dimension tables are included in a first set of dimension tables; wherein determining comprises; executing, by the computer system, a query in which a first dimension table from the plurality of dimension tables is outer joined with a staging table, and determining, by the computer system, if the first dimension table belongs to the first set of dimension tables based upon information determined from execution of the query, wherein the information comprises an indication of whether at least a portion of the staging table was written to disk in response to execution of the query; and for the first set of dimension tables from the plurality of dimension tables associated with a fact table, providing, by the computer system, a query for outer joining the dimension tables in the first set of dimension tables to the staging table, wherein execution of the query causes, for each dimension table in the first set of dimension tables, one or more foreign keys for the dimension table to be added to records of the staging table; and for a second set of dimension tables comprising one or more dimension tables from the plurality of dimension tables associated with the fact table that are not included in the first set of dimension tables, providing, by the computer system, one or more lookup transformations, wherein the lookup transformations are usable for adding one or more foreign keys corresponding to the dimension tables in the second set of dimension tables to the records of the staging table; and creating, by the computer system, one or more lookup transformations for each dimension table in the plurality of dimension tables associated with the fact table that is not included in the first set of dimension tables, wherein a lookup transformation for a dimension table is usable for adding one or more foreign keys corresponding to the dimension table to the records in the staging table. - View Dependent Claims (10)
-
-
14. A system for facilitating transformation of a set of records, the system comprising:
-
a processor configured to; determine a plurality of dimension tables associated with a fact table in a data warehouse; determine a set of one or more dimension tables from the plurality of dimension tables for which an outer join operation is to be used for adding foreign keys corresponding to the dimension tables to a plurality of records stored in a staging table prior to loading of the records in the fact table in the data warehouse, wherein to determine the set of dimension tables, the processor is configured to; execute a query in which a first dimension table from the plurality of dimension tables is outer joined with the staging table, and determine if the first dimension table belongs to the set of dimension tables based upon information determined from execution of the query, wherein to determine if the first dimension table belongs to the set of dimension tables, the processor is configured to determine if the information determined from execution of the query indicates a wait event over the staging table; provide a query for outer joining the dimension tables in the set of dimension tables to the staging table, wherein execution of the query causes, for each dimension table in the set of dimension tables, one or more foreign keys for the dimension table to be added to the records of the staging table; and create one or more lookup transformations for each dimension table in the plurality of dimension tables that is not included in the set of dimension tables, wherein a lookup transformation for a dimension table is usable for adding one or more foreign keys corresponding to the dimension table to the records in the staging table. - View Dependent Claims (15, 16, 17, 18)
-
Specification