Skip to content

Commit

Permalink
[SPARK-47439][PYTHON] Document Python Data Source API in API referenc…
Browse files Browse the repository at this point in the history
…e page

### What changes were proposed in this pull request?

This PR proposes to document Python Data Source API in Python API reference page.

### Why are the changes needed?

For users/developers to know how to use them.

### Does this PR introduce _any_ user-facing change?

Yes, it documents Python Data Source API.

### How was this patch tested?

Manually checked the output from Python API reference build

```bash
cd python/docs
make clean html
open build/html/index.html
```

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes apache#45561 from HyukjinKwon/SPARK-47439.

Authored-by: Hyukjin Kwon <gurwls223@apache.org>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
  • Loading branch information
HyukjinKwon authored and sweisdb committed Apr 1, 2024
1 parent 71d54fc commit 4969ff9
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/docs/source/reference/pyspark.sql/core_classes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,10 @@ Core Classes
UDTFRegistration
udf.UserDefinedFunction
udtf.UserDefinedTableFunction
datasource.DataSource
datasource.DataSourceReader
datasource.DataSourceStreamReader
datasource.DataSourceWriter
datasource.DataSourceRegistration
datasource.InputPartition
datasource.WriterCommitMessage
44 changes: 44 additions & 0 deletions python/docs/source/reference/pyspark.sql/datasource.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
==================
Python Data Source
==================

.. currentmodule:: pyspark.sql.datasource

.. autosummary::
:toctree: api/

DataSource.name
DataSource.reader
DataSource.schema
DataSource.streamReader
DataSource.writer
DataSourceReader.partitions
DataSourceReader.read
DataSourceRegistration.register
DataSourceStreamReader.commit
DataSourceStreamReader.initialOffset
DataSourceStreamReader.latestOffset
DataSourceStreamReader.partitions
DataSourceStreamReader.read
DataSourceStreamReader.stop
DataSourceWriter.abort
DataSourceWriter.commit
DataSourceWriter.write
1 change: 1 addition & 0 deletions python/docs/source/reference/pyspark.sql/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ This page gives an overview of all public Spark SQL API.
udf
udtf
protobuf
datasource
1 change: 1 addition & 0 deletions python/docs/source/reference/pyspark.sql/spark_session.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ See also :class:`SparkSession`.
SparkSession.catalog
SparkSession.conf
SparkSession.createDataFrame
SparkSession.dataSource
SparkSession.getActiveSession
SparkSession.newSession
SparkSession.profile
Expand Down

0 comments on commit 4969ff9

Please sign in to comment.