"BI Project Notes" Report Information Analysis cube

Source: Internet
Author: User

In the original: BI Project notes report information Analysis cube

Data Source settings:

Data processing logic:

--handling lost foreign key relationship dataSELECT  * fromT_reportleafgradeWHEREFsubfid not inch(SELECTFID fromt_raceleafreport)DELETE   fromT_reportleafgradeWHEREFsubfid not inch(SELECTFID fromt_raceleafreport)--dealing with supplier relationshipsSELECT  * fromT_raceleafreportWHEREV_customer not inch(SELECTC_custcode fromt_providerinfo)--Change the field typeALTER TABLET_raceleafreportALTER COLUMNV_customerINT --set Primary key to not NULLALTER TABLET_providerinfoALTER COLUMNC_custcodeINT  not NULL--Set Primary KeyALTER TABLET_providerinfoADD CONSTRAINTPk_custcodePRIMARY KEY(C_custcode)--Unit of CarriageSELECT  * fromT_raceleafreportWHEREI_carryid not inch(SELECTI_carryid fromt_racecarryunitinfo)--Transportation ToolsSELECT  * fromT_raceleafreportWHEREI_conveyanceid not inch(SELECTI_conveyanceid fromt_raceconveyance)--Acquisition TypeSELECT  * fromT_raceleafreportWHEREI_purchasetypeid not inch(SELECTI_purchaseid fromT_purchasetype)--type of processing--New I_tlproctypecode FieldALTER TABLET_raceleafreportADDI_tlproctypecodeINT NULLUPDATET_raceleafreportSETT_raceleafreport.i_tlproctypecode=T_tlproctype.i_tlproctypecode fromT_tlproctypeWHERET_raceleafreport.v_tlproctype=T_tlproctype.v_tlproctypeDELETE   fromT_raceleafreportWHEREI_tlproctypecode is NULL--commit flag \ Delete TagDELETE   fromT_raceleafreportWHEREV_issubmit= 'Not submitted'DELETE   fromT_raceleafreportWHEREI_deleteflaginch(1,2 )--New business Date businessdate fieldALTER TABLET_raceleafreportADDBusinessdateINT NULL--Convert datetime to intUPDATET_raceleafreportSETBusinessdate= CAST(REPLACE(CONVERT(CHAR(Ten), D_reportdate, -),'-',                                    "') as INT)                                                                        --origin processingDELETE   fromT_reportleafgradeWHEREI_shapecode not inch(SELECTI_originid fromT_origin)

Dimension tables that need to be extracted:

Serial number

Table name

Description

Note

1

T_providerinfo

Suppliers

2

T_racecarryunitinfo

Unit of carriage

3

T_raceconveyance

Transportation Tools

4

T_gbgradecode

Tobacco leaf Grade

5

T_distinction

Tobacco Grade

6

T_origin

Origin

7

T_purchasetype

Acquisition Type

8

T_tlproctype

Type of processing

The fact table that needs to be extracted:

Serial number

Table name

Description

Note

1

T_raceleafreport

Registration Main Table

2

T_reportleafgrade

Registration Sub-table

Main indicators:
I_piececount Number of pieces _ Total
I_weight Weight _ Total

Project structure:

Browsing effect:

Client effects:

"BI Project Notes" Report Information Analysis cube

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.