tencent cloud

Tencent Cloud WeData

Release Notes
Dynamic Release Record (2026)
Product Introduction
Product Overview
Product Advantages
Product Architecture
Product Features
Application Scenarios
Purchase Guide
Billing Overview
Product Version Purchase Instructions
Execute Resource Purchase Description
Billing Modes
Overdue Policy
Refund
Preparations
Overview of Account and Permission Management
Add allowlist /security groups (Optional)
Sign in to WeData with Microsoft Entra ID (Azure AD) Single Sign-On (SSO)
Operation Guide
Console Operation
Project Management
Data Integration
Studio
Data Development
Data Analysis
Data Science
Data Governance (with Unity Semantics)
API Documentation
History
Introduction
API Category
Making API Requests
Smart Ops Related Interfaces
Project Management APIs
Resource Group APIs
Data Development APIs
Data Asset - Data Dictionary APIs
Data Development APIs
Ops Center APIs
Data Operations Related Interfaces
Data Exploration APIs
Asset APIs
Metadata Related Interfaces
Task Operations APIs
Data Security APIs
Instance Operation and Maintenance Related Interfaces
Data Map and Data Dictionary APIs
Data Quality Related Interfaces
DataInLong APIs
Platform Management APIs
Data Source Management APIs
Data Quality APIs
Platform Management APIs
Asset Data APIs
Data Source Management APIs
Data Types
Error Codes
WeData API 2025-08-06
Service Level Agreements
Related Agreement
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

Resource Management

PDF
Focus Mode
Font Size
Last updated: 2025-03-21 16:09:35

Feature Overview

The resource management feature supports uploading .jar, .zip, .csv, .sh, .py, .kjb, and .ktr files from the user's local system to the COS bucket on the platform, for use in subsequent script development, computational task development, function development, and other feature scenarios.

Create Resource

Method 1: Create a Resource in Resource Management

Upload local resource files to WeData for management, providing the ability to create custom functions for the data development process.
1. 1. Log in to WeData Console.
2. Click Project List in the left menu and find the target project for which the resource management feature requires operation.
3. After selecting a project, click to enter the Data Development module.
4. Click Resource Management in the left menu.
5. In the resource management directory, click

to expand the operation menu and then select Create Resource.

6. Upload the local resource file in the pop-up window, input the resource name, and select the resource directory folder and storage path.

7. Once the configuration is complete, click Confirm to maintain the script resource in the resource management feature. At the same time, you can view detailed information on the corresponding resource page.


Method 2: Export From Python Task

1.In the Offline Development > Orchestration Space > Python Task interface, edit the required resources in the Python Task and click Export as Resource in the operation bar above the editor.

2.Export configuration as resource: Support two kinds of configuration modes.
If you need to configure the code in a Python Task as a new resource, you can choose to create a resource as the configuration mode.
If you need to overwrite the content of existing resources with the code in a Python Task, you can choose to overwrite existing resources. Fill in configuration information and click Confirm to create a resource or replace the content of existing resources.
Note:
The resource content refers to the content in the Python Task code editor when clicking export as a resource, not the saved content or the submitted version content.


Resource Management

1. Click

icon to perform create folder, create new resource item operations.
2. Click

icon to perform delete in batches operation.
3. Click

icon to open, rename, delete, or download resources.
4. Double-click the created resource to view the detailed information of the corresponding resource, including the resource name, resource type, storage path, file size, creating user, creation time, and provide the operation feature of re-uploading resources.
5. Delete in batches: After clicking Delete in Batches, users can choose the resource packs that need to be deleted, and click Confirm to delete resources.
Note
Referenced resources cannot be deleted.

6. Create Resource: After clicking Create Resource, users need to configure the file name and file address. After selecting the uploaded file, click Confirm to complete the resource upload.

Example of Referenced Resource

Using Python File in the File in Python

1. Develop a local Python script named demo.py file.
## demo.py
def print_method():
print("hello, world")

if __name__ == "__main__":
print("This is demo .py ")
print_method()
2. Upload to the folder in the resource file uploaded to WeData, for example, the folder jaydata.



3. Create a Python Task in the Orchestration Space, for example, python_demo. Meanwhile, open the resource file, select Referenced Resource in more operations, and the file path of the current resource will be automatically placed into the Python Task code.
For example: ##@resource_reference("jaydata/demo.py")
Reference for reference codes of different task types:
Task Type
Code Format
Development space: SQL
Orchestration space: HiveSQL, JDBC SQL, SparkSQL, DLCSQL, Impala, TCHouse-P, Trino, TChouse-X
--@resource_reference("resource management path/resource name")
Development space: Shell, Python
Orchestration space: Shell, Python
--@resource_reference("resource management path/resource name")



The following is sample code for importing demo.py as a library in Python and calling the print_method method in the demo library.
##@resource_reference("jaydata/demo.py")
import sys
import os
sys.path.append(os.path.dirname(os.path.abspath('jaydata/demo.py')))
import demo
demo.print_method()


Calling Python in Shell

Create a Shell task, open the resource file, select Referenced Resource in more operations, and the file path of the current resource will be automatically placed into the Shell task code.
For example: ##@resource_reference("jaydata/demo.py")
1. Execute Python commands in Shell. Execute python scripts.
##@resource_reference ("jaydata/demo.py")
#!/bin/bash
python jaydata/demo.py



Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback