# 5. 创建数据管道和调度任务

在将模型创建和优化完成后，可以创建一个数据管道，并创建任务来调度工作流的执行。这确保了每次运行时转换的可复现性和可靠性。

## 发布模型

在从模型创建管道之前，您需要先发布模型。打开每个模型，并按照以下步骤操作：

1. 在右上角，点击 **发布/ Publish**。

   <figure><img src="/files/EiTNNyY9eVwrV5gqi2Fe" alt=""><figcaption></figcaption></figure>

2. 填写版本号和描述。

   对于第一次发布，我们将保持默认设置。

   <figure><img src="/files/uU5tVv35Zpj9la4L3EQA" alt="" width="375"><figcaption></figcaption></figure>

3. 点击**发布/ Publish**。

数据模型现在已准备好，可以继续创建数据建模管道。

## 创建数据建模管道

请按照以下步骤操作：

1. 切换到 **数据管道/Pipelines** 标签页。
2. 点击 **+** 图标，选择 **创建建模管道/Creating modeling pipeline**。

   <figure><img src="/files/KkQUlt5z68PWK4k2w884" alt=""><figcaption></figcaption></figure>
3. 为您的数据管道提供名称。
4. 选择该数据管道应包含的数据模型。

   此处，我们添加在前一步设置的三个模型。

   <figure><img src="/files/DD6ZrWaFCibjXaWxuHiZ" alt=""><figcaption></figcaption></figure>
5. 点击**确认/ Confirm**。

   新建的建模管道将被添加到 **模型/ Models** 文件夹下，并在 DAG 视图中展示。

   <figure><img src="/files/kOcKZmlia63MAVflEH7I" alt=""><figcaption></figcaption></figure>
6. 点击**发布/ Publish**。

## 创建调度任务

数据管道创建并发布后，您可以创建任务来调度执行时间。请按照以下步骤操作：

1. 打开您创建的数据管道。
2. 切换到 **调度/Jobs** 标签页，点击 **创建调度/Create a job**。
3. 填写任务配置。

{% tabs %}
{% tab title="1. 基础设置" %}
填写名称、选择目标环境，并自定义关联的模型变量。

由于我们已经通过控制台执行并验证了模型，现在可以选择 **生产环境** 来在生产数据库上运行数据清洗流程。

<figure><img src="/files/LP1FaRqw4jBw540WhwSw" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="2. 调度设置" %}
填写任务的时间安排和触发类型：

* 标准设置：在特定时间间隔内触发运行。
* 高级设置：使用 crontab 格式指定调度，适用于熟悉 `cron` 调度器的用户。请参考文档： [Cron](https://en.wikipedia.org/wiki/Cron)。
* 手动触发：不进行调度，可以在 **数据管道健康/Pipeline Health** 仪表板中手动触发。请参考： [数据管道健康](/cn-reorc-help-center/jian-kang-jian-ce/shu-ju-guan-dao-jian-kang.md)。

<figure><img src="/files/YWMzw5b1Oc9EmEGAvwNy" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="3. 提醒设置" %}
在此处，您可以配置任务失败时的通知。默认情况下，通知会通过电子邮件发送。

<figure><img src="/files/KqpF9eVuTphEiCypAupH" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

4. 点击**创建/ Create。**

新任务将显示在 **调度/Jobs** 部分，Recurve 将在预定时间执行该任务。

<figure><img src="/files/P5ff2H3pBD1qBrMJQJnk" alt=""><figcaption></figcaption></figure>

您可以在 [数据管道健康](/cn-reorc-help-center/jian-kang-jian-ce/shu-ju-guan-dao-jian-kang.md) 中查看任务的执行状态和进度。

{% hint style="success" %}
恭喜！您已经完成了使用 Recurve 构建数据工作流的过程。
{% endhint %}

下一步，您可以详细探索每个功能和模块：

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>连接 | Connections</strong></td><td>了解可用的连接</td><td></td><td><a href="/pages/DT07FCGpl37SnDAJcF7Y">/pages/DT07FCGpl37SnDAJcF7Y</a></td></tr><tr><td><strong>数据建模 | Data modeling</strong></td><td>了解数据建模中的核心内容</td><td></td><td><a href="/pages/6cs9PuthpoQgIpIqEQxh">/pages/6cs9PuthpoQgIpIqEQxh</a></td></tr><tr><td><strong>健康监控 | Health tracking</strong></td><td>探索健康监控仪表板</td><td></td><td><a href="/pages/CMT05Q74cynVSGxLj4OD">/pages/CMT05Q74cynVSGxLj4OD</a></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.reorc.com/cn-reorc-help-center/kuai-su-kai-shi/5.-chuang-jian-shu-ju-guan-dao-he-diao-du-ren-wu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
