简体   繁体   中英

Upload data in star data warehouse

I recently build a simple data warehouse with 2 dimension tables and 1 fact table.

First Dim hold the user input "queryId, dna sequence, dna database name, other parameters". Second Dim hold database description "databaseId, other parameters". The fact table will hold the result of the search "queryId, databaseID, hit founded, other parameters describe the hit".

Now, where should I upload the data (The result)? To the fact table? or to the dimensions table?

To where should I upload "queryId and databaseID"? because they are in dimensions and in the fact. Sorry for this question but, I am new to DW.

Thanks a lot,

You have to create an ETL that loads like this (this assumes we rebuild the DW on each import, the steps are different for incremental loading):

  • Truncate fact table
  • Truncate dimensions
  • Populate dimensions, (your keys should be in the dimensions)
  • Populate the fact with with your dimension keys and measures

Then, when querying, you'll join your dimensions onto your fact via the keys.

Neither nor.

You UPLOAD data into staging tables. Those are created for optimal upload speed. Staging tables may be flat, may not be complete and require joining with other tables.

Then you use a loading process to load them from staging into the data warehouse.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM