Help Center> Data Lake Insight> Best Practices> Consulting Service Data Analysis in Financial Industry

Consulting Service Data Analysis in Financial Industry

Application Scenarios

  • Description

    Company H is the first commercial organization in China engaged in gathering trade statistics and buyer information of major trading participants worldwide. It has the world's largest trade statistics database for industry research, international trade promotion, and other uses.

    Before using DLI, company H used its own big data queue. It had to hire O&M personnel, purchase the dedicated bandwidth from China Telecom and China Unicom, and invest heavily in equipment room, electric power, private networks, and servers. Even with the huge input, the company cannot satisfy customers' ever-changing service requirements due to insufficient manpower and capability restrictions of its big data queue. As a result, only 4% of 100 TB data is actually used.

    After migrating to the cloud and adopting DLI as its data analysis tool, company H made full use of the 100 TB database to maximize asset monetization, without the need to construct and maintain infrastructures. Using the pay-per-use billing mode, DLI requires no O&M personnel and lower dedicated bandwidth cost, which in total saves the maintenance cost by 70% compared with the offline data center. In addition, DLI requires no expertise and enables smooth migration of existing services, shortening the service rollout period by 50%.

    DLI helps company H build its big data analysis platform with extremely low cost, so that it can focus on constant innovation on business needs.

  • Solutions
    Figure 1 Solutions

    Process the existing data (for example: trade details and basic information) of company H in the system based on the original customer data. Then, complete trade statistics analysis using CDM, OBS, and DLI.

  • Data Types
    • Trade detail records

      Trade detail records include trade statistics of major trading nations around the world.

      Table 1 Trade detail records

      Field

      Field Type

      Field Description

      m_month

      smallint

      Month

      hs_code

      string

      Product code

      country

      smallint

      Country code

      dollar_value

      double

      Transaction amount

      quantity

      double

      Transaction volume

      unit

      smallint

      Measurement unit

      b_country

      smallint

      Destination country code

      imex

      smallint

      Import or export

      y_year

      smallint

      Year

    • Basic information

      The basic information includes dictionary data corresponding to the fields in the trade detail records.

      Table 2 Basic country information

      Field

      Field Type

      Field Description

      countryid

      smallint

      Country code

      country_en

      string

      English name of a country

      country_cn

      string

      Chinese name of a country

      Table 3 Update time information

      Field

      Field Type

      Field Description

      countryid

      smallint

      Country code

      imex

      smallint

      Import or export

      hs_len

      smallint

      Product code length

      minstartdate

      string

      Minimum start time

      startdate

      string

      Start time

      newdate

      string

      Update time

      minnewdate

      string

      Last update time

      Table 4 Import and export product code information table (hs246)

      Field

      Field Type

      Field Description

      id

      bigint

      ID

      hs

      string

      Product code

      hs_cn

      string

      Chinese name of a product

      hs_en

      string

      English name of a product

      Table 5 Unit information (unit_general)

      Field

      Field Type

      Field Description

      id

      smallint

      Measurement unit code

      unit_en

      string

      English name of the measurement unit

      unit_cn

      string

      Chinese name of the measurement unit

Analysis Process

To use DLI to analyze trade statistics data, you need to perform the following three steps:

Step 1: Registering an Account. Before the data analysis, register a public cloud account and perform real name authentication.

Step 2: Uploading Data. Upload incremental data every day using OBS Browser+ and use CDM to migrate inventory data from OBS to DLI to prepare for data analysis using DLI.

Step 3: Analyzing Data. Interconnect the customer service system with DLI to enable trade statistics analysis for company H.

Step 1: Registering an Account

Register a public cloud account and perform real name authentication.

For details about how to register an account, see Registering a HUAWEI ID and Enabling HUAWEI CLOUD Services.

For details about real-name authentication, see Real-Name Authentication Entry.

If you have registered a public cloud account and completed real-name authentication, skip this step.

Step 2: Uploading Data

  • Upload Incremental Data
    Upload the incremental data to OBS.
    1. Download OBS Browser+. For details about the download address, see the Object Storage Service Tools Guide.
    2. Install OBS Browser+. For details about the installation process, see the Object Storage Service Tools Guide.
    3. Log in to OBS Browser+. OBS Browser+ supports two login modes: AK login (using access keys) or authorization code login. For details about the login process, see the Object Storage Service Tools Guide.
    4. Upload data using the OBS browser+.

      On the OBS Browser+ page, click Create Bucket. Select a region and enter a bucket name (for example, DLI_demo). After the bucket is created, return to the bucket list and click DLI_demo. OBS Browser+ supports upload by dragging. You can drag one or more files or folders from a local path to the object list of a bucket or a parallel file system on OBS Browser+. You can even drag a file or folder directly to a specified folder on OBS Browser+.

  • Upload Inventory Data

    Cloud Data Migration (CDM) enables data migration among various data sources, including services of public cloud or between public cloud and on-premises service systems. You can use CDM to upload the inventory data of company H stored on OBS to DLI through table or file migration for data analysis.

    1. By default, data is stored on OBS. For details about how to upload data to OBS, see Incremental Data Upload.
    2. Create a resource queue, a database, and a table in DLI. For details, see the Data Lake Insight User Guide.
    3. Log in to the CDM management console and click Buy CDM in the upper right corner to create a CDM cluster, as shown in Figure 2.
      Figure 2 Creating a CDM cluster

      The VPC chosen must be the same on both CDM and DLI. You are advised to retain the same Subnet and Security Group settings on both CDM and DLI.

      If the Subnet and Security Group settings cannot be the same due to security control, ensure that the security group rule is configured to allow CDM to access DLI databases.

    4. After a CDM cluster is created, click Job Management under Operation. See Figure 3.
      Figure 3 Job management
    5. On the Job Management page, choose Link Management > Create Link. See Figure 4.
      Figure 4 Selecting a link type
    6. Create a DLI link. Specifically, select Data Lake Insight for Data Warehouse and click Next. Specify DLI link parameters as required. See Figure 5.
      Figure 5 Configuring the DLI link
      Table 6 Parameters used for linking CDM to DLI

      Parameter

      Description

      Example Value

      Name

      Link name, which can be defined based on the data source type for easy memorization.

      dli_link

      Connector

      Data source to be connected, which is the data type selected in the previous step.

      DLI

      AK

      AK required for authentication during accessing the DLI database. To obtain the AK and SK, log in to the management console, click the username in the upper right corner, select My Credentials from the drop-down list, and click Access Keys on the displayed page.

      -

      SK

      SK required for authentication during accessing the DLI database. To obtain the SK, log in to the management console, click the username in the upper right corner, select My Credentials from the drop-down list, and click Access Keys on the displayed page.

      -

      Project ID

      Project ID of the region where DLI resides. Obtain the value from My Credentials.

      a46ed0f02bde42e7afe36777eb9d0f42

    7. Click Save. CDM automatically checks whether the link is available. If the link is available, a message is displayed, indicating that the link is successfully saved, and the link management page is displayed. If the link is unavailable, check whether the link parameters are correctly configured.
    8. Click New Link to create an OBS link. Specifically, select Object Storage Service for Data Warehouse and click Next. Set the OBS link parameters as required. See Figure 6.
      Figure 6 Creating an OBS link
      Table 7 Parameters used for linking CDM to OBS

      Parameter

      Description

      Example Value

      Name

      Link name, which can be defined based on the data source type for easy memorization.

      obslink

      OBS Server

      Set this parameter to the domain name or IP address of OBS.

      obs.cn-north-1.myhuaweicloud.com

      Port

      Port number of the OBS server

      443

      AK

      Access Key ID required for authentication during accessing the DLI database. To obtain the AK, log in to the management console, click the username in the upper right corner, select My Credentials from the drop-down list, and click Access Keys on the displayed page.

      -

      SK

      Secret Key required for authentication during accessing the DLI database. To obtain the SK, log in to the management console, click the username in the upper right corner, select My Credentials from the drop-down list, and click Access Keys on the displayed page.

      -

    9. Click Save. CDM automatically checks whether the link is available. If the link is available, a message is displayed, indicating that the link is successfully saved, and the link management page is displayed. If the link is unavailable, check whether the link parameters are correctly configured.
    10. Choose Table/File Migration > Create Job to create a task for migrating OBS data to DLI. See Figure 7.
      Figure 7 Creating a job
      Table 8 Job configuration parameters

      Parameter

      Description

      Example Value

      Job Name

      User-defined job name.

      obs2dli

      Table 9 Parameters for configuring the OBS as the source connection

      Parameter

      Description

      Example Value

      Source link name

      Select the created OBS connection.

      obslink

      Bucket Name

      Name of the bucket from which data is to be migrated

      -

      Source Directory/File

      Path of the data to be migrated.

      -

      File format

      File format used for data transmission. The value can be CSV or JSON.

      CSV

      Table 10 Parameters for configuring DLI as the destination connection

      Parameter

      Description

      Example Value

      Destination connection name

      Select the created DLI connection.

      dlilink

      Database Name

      DLI service database to which data is to be migrated.

      sqoop

      Table Name

      Name of the DLI table to which data is to be migrated. It is recommended that the field type and format of the table be consistent with those of the data to be migrated.

      car_detail

      Resource Queue

      Queue to which data is to be migrated.

      cdm

      Clear Data Before Import

      Before importing data, determine whether to clear the original data in the destination queue.

      No

    11. After basic job information is configured, click Next to verify whether the field mapping is correct.
      Specifically, check the following items:
      • Whether the source field type can be converted to the destination field type
      • Whether the mapping between the source and destination fields is correct. If the mapping is incorrect, you can click the arrows in the Operation column to adjust the sequence of the destination fields.
      • Whether the date and time format is correct. If the format is incorrect, modify the format or select an existing time format.

      Users can customize field content conversion.

    12. Click Next to set task parameters. See Figure 8.
      Figure 8 Task configuration
      Table 11 Task configuration parameters

      Parameter

      Description

      Example Value

      Concurrent Extractors

      Indicates the number of concurrent extraction jobs that are performed concurrently.

      1

      Schedule Execution

      If you select Yes, you can customize a scheduled task.

      No

      Write Dirty Data

      Indicates whether to record dirty data.

      No

    13. After the job is created, click Save and Run. The Job Management page is displayed. You can view the job execution progress and result.

Step 3: Analyzing Data

Query data in the corresponding table. For details, see Step 3: Analyzing Data.