หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา
- What's New
- Service Overview
- Getting Started
-
User Guide
- IAM Permissions Management
- Getting Started
- Managing DIS Streams
-
Using DIS
- Checking and Configuring DNS Information
- Uploading Data by Using Agent
- Using DIS Flume Plugin to Upload and Download Data
- Using a DIS Logstash Plugin to Upload and Download Data
- Using Kafka Adapter to Upload and Download Data
- Using SparkStreaming SDK to Download Data
- Using a DIS Flink Connector to Upload and Download Data
- Managing a Dump Task
- Managing Enterprise Projects
- Notifying Events
- Monitoring
- Best Practices
-
SDK Reference
- Overview
- Related Resources
- Enabling DIS
- Creating a DIS Stream
- Obtaining Authentication Information
-
Getting Started with SDK
-
Using the Java SDK
- Preparing the Environment
- Configuring a Sample Project
- Initializing a DIS SDK Client Instance
- Creating a Stream
- Creating a Dump Task
- Updating a Dump Task
- Deleting a Dump Task
- Querying a Dump Task List
- Querying Dump Details
- Deleting a Stream
- Querying a Stream List
- Querying Stream Details
- Downloading Streaming Data
- Uploading Streaming Data
- Obtaining the Data Cursor
- Creating an Application
- Deleting an Application
- Adding a Checkpoint
- Querying a Checkpoint
- Changing Partition Quantity
- Using Kafka Adapter to Upload and Download Data
-
Using the Python SDK
- Preparing the Installation Environment
- Configuring a Sample Project
- Initializing a DIS SDK Client Instance
- Creating a Stream
- Creating a Dump Task
- Deleting a Stream
- Deleting a Dump Task
- Querying a Stream List
- Querying a Dump Task List
- Querying Stream Details
- Querying Dump Details
- Uploading Streaming Data in JSON Format
- Uploading Streaming Data in Protobuf Format
- Downloading Streaming Data
- Creating an Application
- Deleting an Application
- Viewing Application Details
- Querying an Application List
- Adding a Checkpoint
- Querying a Checkpoint
- Changing Partition Quantity
- Obtaining a Data Cursor
-
Using the Java SDK
- Error Codes
- Change History
- API Reference
-
FAQs
-
General Questions
- What Is DIS?
- What Is a Partition?
- What Can I Do with DIS?
- What Advantages Does DIS Have?
- Which Modules Do DIS Have?
- How Do I Create a DIS Stream?
- What Is the Difference Between Storing Data into DIS and Dumping Data Elsewhere?
- How Do I Check Software Package Integrity?
- How Do I Send and Retrieve Data Using DIS?
- What Is Data Control?
- Dump Questions
- DIS Agent Questions
-
General Questions
- General Reference
Copied.
Managing a Source Data Schema
A source data schema is a user's JSON or CSV data sample used to describe the JSON or CSV data format. For example, DIS can generate an Avro schema based on the JSON or CSV data sample and convert the JSON or CSV data uploaded to a stream to the Parquet or CarbonData format.
Three entrances are available for creating a source data schema:
- Enable Schema when creating a stream. For details, see Figure 1.
- Keep Schema disabled when creating a stream. After the stream is created, choose Stream Management in the navigation tree and click the created stream. Click Create Source Data Schema next to Source Data Type. For details, see Figure 2.
- Keep Schema disabled when creating a stream. After the stream is created, choose Stream Management in the navigation tree and click the created stream. On the Dump Tasks tab page, click Create Dump Task. On the displayed page, create a source data schema. For details, see Figure 3.
Creating a Schema for Source Data by Importing Files
Use the following method to create a source data schema:
- When configuring Source Data Schema, click Import File.
- In the left text box, enter a JSON or CSV source data sample or click
to import a source data sample. Example:
NOTE:
When importing source data samples, you can import only .txt, .json, .csv, and .java files.
- In the left text box, click
to generate an Avro schema in the right text box according to the source data sample. Example:
- In the right text box, click
to modify the Avro schema. Example:
- Click Format to format the parsed data. Example:
- To delete the source data sample, click
.
Creating a Schema for Source Data by Creating a Schema Tree
Use the following method to create a source data schema:
- When configuring Source Data Schema, click Create Schema Tree.
- After configuring an attribute name and data type, click Add to add a root node, as shown in Figure 4.
- Select the created root node and configure an attribute name and data type in the same way to add subnodes.
Figure 5 Creating a subnode
NOTE:
- To delete a node, select the check box of the node and click Delete.
- To edit the attributes of a node, select the check box of the node and click Edit.
- To delete all nodes, click Reset.
- Click Submit.
Modifying a Source Data Schema
Do not modify the source data schema of a stream if the stream has dump tasks.
- Use the account to log in to the DIS console.
- Click
in the upper left corner of the page and select a region.
- In the navigation tree on the left, choose Stream Management.
- Click a stream name to access its details page.
- Click View Existing Source Data Schema next to Source Data Type.
- In the Source Data Schema text box, click
to modify the source data schema.
Figure 6 Modifying the source data schemaNOTE:
If a stream has dump tasks, modifying the source data schema of the stream will cause some data unable to be successfully dumped.
- After the modification is complete, click Submit. Click Cancel to give up modifying the source data schema.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot