Walks through data source configuration, network connectivity, and batch sync task setup to load data from a single OSS table into MaxCompute.
OSS overview
Alibaba Cloud OSS provides 99.9999999999% (twelve 9s) data durability and 99.995% availability with multiple storage classes for cost optimization. Data Integration supports syncing data between OSS and other sources or destinations.
Get OSS bucket information
In the OSS console, locate the target bucket and note its public and internal endpoints from the bucket overview page.
-
The public endpoint allows internet access. Inbound traffic (writes) is free; outbound traffic (reads) incurs charges per OSS Pricing and Billing Items.
-
The internal endpoint connects Alibaba Cloud products within the same region with no traffic charges. Use the internal endpoint when the OSS bucket and your Data Integration resource group are in the same region; otherwise, use the public endpoint.
Prerequisites
-
You have purchased a serverless resource group.
-
OSS and MaxCompute data sources are configured. Configure a data source.
-
Network connectivity between the resource group and the data sources is established. Network connectivity configuration.
Limitations
Syncing source data to MaxCompute external tables is not supported.
Procedure
This tutorial uses the Data Studio (new version) UI.
Step 1: Create a node and task
Create a batch sync node following Codeless UI configuration.
Step 2: Configure the source and destination
Configure the source (OSS)
Configure the following OSS source parameters.
|
Parameter |
Description |
|
File Type |
Select the file type to sync. The Codeless UI supports reading files in |
|
File Path |
Enter the path to the source file.
|
|
Field Delimiter |
Column delimiter used in the file. |
|
Encoding |
Character encoding for reading the source file. |
|
Null String |
|
|
Compression Format |
Compression format. Supported: |
|
Skip Header |
Whether to skip the header row in CSV-like files. Default: header included. Note
Skipping the header is not supported for compressed files. |
|
Table Data Structure |
After you configure the data source parameters, click Confirm Data Structure to verify the data format. |
Configure the destination (MaxCompute)
Configure the following MaxCompute destination parameters.
Parameters not listed below can use default values.
|
Parameter |
Description |
|
Tunnel Resource Group |
MaxCompute data transfer resource (Tunnel Quota). Defaults to the free public quota. If an exclusive Tunnel Quota becomes unavailable due to overdue payments or expiration, the task falls back to the public quota. |
|
Table |
Select the destination MaxCompute table. In a standard workspace, ensure a table with the same name and schema exists in both development and production environments. Alternatively, click Generate Destination Table Schema to auto-create a destination table and adjust the DDL as needed. Note
Consider the following:
|
|
Partition Information |
Partition column values for partitioned destination tables.
|
|
Write Method |
Clear existing data or append new data to the target table. |
Step 3: Configure field mapping
Map columns between source and destination using Map Fields with the Same Name, Map Fields in the Same Line, Delete All Mappings, or Edit Field Mappings.
Step 4: Configure advanced settings
Configure advanced settings such as Expected Maximum Concurrency and Policy for Dirty Data Records. For this tutorial, set the Policy for Dirty Data Records to Disallow Dirty Data Records and keep defaults for other settings. Codeless UI configuration.
Step 5: Configure and run the debug task
-
Click Run Configuration, set the Resource Group and Script Parameters for the debug run, and then click Run to test the task.
-
In the left-side navigation pane, click
, then click the new icon next to Personal Directory to create an SQL file. Run the following query to verify the destination table data.Note-
Before running this query, bind the destination MaxCompute project as a compute engine for DataWorks.
-
In the
.sqlfile editor, click Run Configuration on the right side. Specify the data source Type, Computing Resources, and Resource Group, and then click Run in the top toolbar.
SELECT * FROM <your_maxcompute_table_name> WHERE pt=<your_partition> LIMIT 20; -
Step 6: Configure scheduling and publish the task
In the right pane, click Scheduling Settings to configure scheduling parameters. Then click Publish to publish the task.