All Products
Search
Document Center

Alibaba Cloud Model Studio:Import data from OSS

Last Updated:Nov 27, 2024

You can import data from Object Storage Service (OSS) to Data Management of Alibaba Cloud Model Studio. This topic describes how to authorize OSS access and how to import data from OSS.

Note

You are billed for using OSS. For more information, see Get started by using the OSS console and Billing overview.

Procedure

For this step, you must use the Alibaba Cloud account or an authorized RAM user. The authorization is granted using a service-linked role. For more information about how to manage or revoke a service-linked role, see Service-linked roles for Alibaba Cloud Model Studio.

Use the Alibaba Cloud account

  1. Log on to the Alibaba Cloud Model Studio console. In the left-side navigation pane, choose Data Center > Data Management.

  2. Click Import Data.

  3. On the Import Data page, select OSS as the Import Method.

  4. If you have not authorized Model Studio to access OSS, click Authorize Now.

    image

  5. Click Confirm Authorization.

    image

Use a RAM user

If you use a RAM user, configure a RAM role to allow the RAM user to access OSS.

  1. Log on to the RAM Console.

  2. In the left-side navigation pane, choose Permissions > Policies.

  3. Click Create Policy.

  4. Grant the permission in one of the following modes:

    • Visual editor:

      1. Select Resource Management for Service.

      2. Select ram:CreateServiceLinkedRole for Action.

      3. Click OK.

        image

    • JSON:

      1. Use the following sample to create a policy:

        {
          "Version": "1",
          "Statement": [
            {
              "Effect": "Allow",
              "Action": "ram:CreateServiceLinkedRole",
              "Resource": "*",
              "Condition": {
                "StringEquals": {
                  "ram:ServiceName": "datahub.sfm.aliyuncs.com"
                }
              }
            }
          ]
        }
      2. Click OK.

      3. Set the policy name and description, and click OK to confirm.

  5. Grant the custom policy to the RAM user. For more information about how to grant the policy, see Grant permissions to a RAM user.

Add the required tag to an OSS bucket

  1. Log on to the .

  2. In the left-side navigation pane, choose Buckets.

  3. Click image icon in the Tag column of the desired bucket. Then, click Edit.

    image

  4. Click Create Tag. Enter bailian-datahub-access for the tag and enter read for the tag value.

    image

  5. Click Save.

    Note

    Alibaba Cloud Model Studio cannot access files in the OSS root directory. Please use an existing subdirectory or create a new one for Model Studio access.

Import data from OSS

  1. Go back to the Alibaba Cloud Model Studio console.

  2. In the left-side navigation pane, choose Data Center > Data Management.

  3. Click Import Data.

  4. On the Import Data page, select OSS as the Import Method.

  5. Select a bucket from OSS.

    • Import Folder: Select folders to import. All files within the selected folders are imported, but files in the subfolders are not imported.

    • Import File: Select files within the current folder.

  6. Click Confirm. The import may take some time.