All Products
Search
Document Center

Simple Log Service:Scenario 1: Use a default role to transfer data within the same account

Last Updated:Sep 03, 2024

When you use a RAM user to create a data transformation job, you can specify a default role to transfer log data within the same account.

Prerequisites

Background information

The AliyunLogETLRole system role is granted the permissions to read data from a source Logstore and write transformed data to one or more destination Logstores. You can use only an Alibaba Cloud account to create and delete the system role.

Step 1: Use an Alibaba Cloud account to create the AliyunLogETLRole system role

Note This step is required the first time you grant permissions to the AliyunLogETLRole system role. If the system role is granted the required permissions within your Alibaba Cloud account, you can skip this step.

If you want to use a RAM user that assumes the default role to create a data transformation job, make sure that the AliyunLogETLRole role exists within your Alibaba Cloud account. If the AliyunLogETLRole role does not exist in your Alibaba Cloud account, you need to contact the owner of your Alibaba Cloud account to create the role.

  1. Log on to the Log Service console by using your Alibaba Cloud account.
  2. Grant permissions to the AliyunLogETLRole system role.

Step 2: Use the RAM user to create a data transformation job

  1. Log on to the Log Service console by using the RAM user.
  2. Go to the data transformation page.
    1. In the Projects section, click the project that you want to manage.

    2. On the Log Storage > Logstores tab, click the Logstore that you want to manage.

    3. On the query and analysis page, click Data Transformation.
  3. In the upper-right corner of the page, specify a time range for the log data that you want to transform.
    Make sure that log data exists on the Raw Logs tab.
  4. In the code editor, enter a data transformation statement.
    For more information, see Data transformation syntax.
  5. Preview transformation results.
    1. Click Quick.
      You can select Quick or Advanced. For more information, see Preview mode overview.
    2. Click Preview Data.

      View the preview results.

      • If data fails to be transformed because the specified statement is invalid or the permissions that are granted are invalid, follow the on-screen instructions to troubleshoot the failure.
      • If the transformed data is returned as expected, go to the next step.
  6. Create a data transformation job.
    1. Click Save as Transformation Rule.
    2. In the Create Data Transformation Rule panel, configure the parameters and click OK.
      For more information about the parameters, see Get started with data transformation. The following table describes the key parameters.default role
      Key parameterDescription
      Authorization MethodSelect Default Role.
      Authorization Method in Storage TargetSelect Default Role.
    After the data transformation job is created and run, data can be transferred within the same account. For more information, see Manage a data transformation job.