Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-19477][docs-zh][python] Translate page "python_table_api_connectors" into Chinese #13528

Conversation

wangxlong
Copy link
Contributor

What is the purpose of the change

Translate page "python_table_api_connectors" into Chinese

Brief change log

Translate page "python_table_api_connectors" into Chinese

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no )
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@flinkbot
Copy link
Collaborator

flinkbot commented Oct 1, 2020

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit 6c34d14 (Thu Oct 01 06:08:41 UTC 2020)

✅no warnings

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.


The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Collaborator

flinkbot commented Oct 1, 2020

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run travis re-run the last Travis build
  • @flinkbot run azure re-run the last Azure build

@wangxlong
Copy link
Contributor Author

Hi @dianfu CC in your free time, Thank you~

Copy link
Contributor

@dianfu dianfu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wangxlong Thanks for the work! Have left a few comments.

@@ -23,26 +23,26 @@ under the License.
-->


This page describes how to use connectors in PyFlink and highlights the details to be aware of when using Flink connectors in Python programs.
这篇描述了如何在 PyFlink 中使用连接器,并强调了在 Python 程序中使用 Flink 连接器时需要注意的细节。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
这篇描述了如何在 PyFlink 中使用连接器,并强调了在 Python 程序中使用 Flink 连接器时需要注意的细节。
本篇描述了如何在 PyFlink 中使用连接器,并着重介绍了在 Python 程序中使用 Flink 连接器时需要注意的细节。


Since Flink is a Java/Scala-based project, for both connectors and formats, implementations are available as jars that need to be specified as job [dependencies]({{ site.baseurl }}/zh/dev/python/user-guide/table/dependency_management.html).
由于 Flink 是一个基于 Java/Scala-based 的项目,对于连接器和格式的实现可以作为 jar 包使用,将其指定为作业的 [依赖]({{ site.baseurl }}/zh/dev/python/user-guide/table/dependency_management.html)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
由于 Flink 是一个基于 Java/Scala-based 的项目,对于连接器和格式的实现可以作为 jar 包使用,将其指定为作业的 [依赖]({{ site.baseurl }}/zh/dev/python/user-guide/table/dependency_management.html)。
由于 Flink 是一个基于 Java/Scala-based 的项目,连接器和格式的实现是作为 jar 包存在的,需要将其指定为作业的 [依赖]({{ site.baseurl }}/zh/dev/python/user-guide/table/dependency_management.html)。


In PyFink's Table API, DDL is the recommended way to define sources and sinks, executed via the `execute_sql()` method on the `TableEnvironment`. This makes the table available for use by the application.
PyFink Table API 中,DDL 是定义 sources sinks 推荐的方式,通过执行在 `TableEnvironment` 中的 `execute_sql()` 方法。这样使得在应用程序可以使用这张表。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
在 PyFink Table API 中,DDL 是定义 sources 和 sinks 推荐的方式,通过执行在 `TableEnvironment` 中的 `execute_sql()` 方法。这样使得在应用程序可以使用这张表
在 PyFink Table API 中,DDL 是定义 sources 和 sinks 比较推荐的方式,这可以通过 `TableEnvironment` 中的 `execute_sql()` 方法来完成。然后就可以在作业中使用这张表了


Some data sources and sinks are built into Flink and are available out-of-the-box. These predefined data sources include reading from Pandas DataFrame, or ingesting data from collections. The predefined data sinks support writing to Pandas DataFrame.
有些 sources sinks 被内置在 Flink 中,并且可以直接使用。这些内置的 sources 包括可以从 Pandas DataFrame 读数据,或者从 collections 消费数据。内置的 sinks 支持将数据写到 Pandas DataFrame 中。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
有些 sources 和 sinks 被内置在 Flink 中,并且可以直接使用。这些内置的 sources 包括可以从 Pandas DataFrame 读数据,或者从 collections 消费数据。内置的 sinks 支持将数据写到 Pandas DataFrame 中。
有些 sources 和 sinks 被内置在 Flink 中,可以直接使用。这些内置的 sources 包括可以从 Pandas DataFrame 读取数据,或者从 collections 中消费数据。内置的 sinks 包括将数据写到 Pandas DataFrame 中。


PyFlink Tables support conversion to and from Pandas DataFrame.
PyFlink 表支持和 Pandas DataFrame 之间转换数据。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PyFlink 表支持和 Pandas DataFrame 之间转换数据
PyFlink 表支持与 Pandas DataFrame 之间互相转换

table_env.from_elements([(1, 'Hi'), (2, 'Hello')], ['a', 'b'])

# use the second parameter to specify a custom table schema
# 使用第二个参数指定自定义表模式
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 使用第二个参数指定自定义表模式
# 使用第二个参数指定自定义表结构


In some cases, you may want to define custom sources and sinks. Currently, sources and sinks must be implemented in Java/Scala, but you can define a `TableFactory` to support their use via DDL. More details can be found in the [Java/Scala documentation]({{ site.baseurl }}/zh/dev/table/sourceSinks.html).
在某些情况下,你可能想要自定义 sources sinks。目前,sources sinks 必须使用 Java/Scala 实现,但是你可以通过DDL定义一个 `TableFactory` 来使用它们。更多详情,可查阅 [Java/Scala 文档]({{ site.baseurl }}/zh/dev/table/sourceSinks.html)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
在某些情况下,你可能想要自定义 sources 和 sinks。目前,sources 和 sinks 必须使用 Java/Scala 实现,但是你可以通过DDL定义一个 `TableFactory` 来使用它们。更多详情,可查阅 [Java/Scala 文档]({{ site.baseurl }}/zh/dev/table/sourceSinks.html)。
在某些情况下,你可能想要自定义 sources 和 sinks。目前,sources 和 sinks 必须使用 Java/Scala 实现,但是你可以定义一个 `TableFactory` ,然后通过 DDL 来使用它们。更多详情,可查阅 [Java/Scala 文档]({{ site.baseurl }}/zh/dev/table/sourceSinks.html)。


## Download connector and format jars
## 下载连接器和格式 jar 包
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## 下载连接器和格式 jar 包
## 下载连接器(connector)和格式(format) jar 包

@wangxlong
Copy link
Contributor Author

@dianfu Updated~

@dianfu dianfu self-assigned this Oct 13, 2020
@dianfu dianfu closed this in f77fe23 Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants