You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "HyukjinKwon (via GitHub)" <gi...@apache.org> on 2023/10/20 05:35:56 UTC
Re: [PR] [SPARK-44753][PYTHON] XML: pyspark sql xml reader writer [spark]
HyukjinKwon commented on code in PR #43462:
URL: https://github.com/apache/spark/pull/43462#discussion_r1366491264
##########
python/pyspark/sql/readwriter.py:
##########
@@ -821,6 +821,128 @@ def func(iterator):
},
)
+ def xml(
+ self,
+ path: PathOrPaths,
+ rowTag: str,
+ schema: Optional[Union[StructType, str]] = None,
+ excludeAttribute: Optional[Union[bool, str]] = None,
+ attributePrefix: Optional[str] = None,
+ valueTag: Optional[str] = None,
+ ignoreSurroundingSpaces: Optional[Union[bool, str]] = None,
+ rowValidationXSDPath: Optional[str] = None,
+ ignoreNamespace: Optional[Union[bool, str]] = None,
+ wildcardColName: Optional[str] = None,
+ encoding: Optional[str] = None,
+ inferSchema: Optional[Union[bool, str]] = None,
+ nullValue: Optional[str] = None,
+ dateFormat: Optional[str] = None,
+ timestampFormat: Optional[str] = None,
+ mode: Optional[str] = None,
+ columnNameOfCorruptRecord: Optional[str] = None,
+ multiLine: Optional[Union[bool, str]] = None,
+ samplingRatio: Optional[Union[float, str]] = None,
+ locale: Optional[str] = None,
+ ) -> "DataFrame":
+ r"""Loads a XML file and returns the result as a :class:`DataFrame`.
+
+ If the ``schema`` parameter is not specified, this function goes
+ through the input once to determine the input schema.
+
+ .. versionadded:: 4.0.0
+
+ Parameters
+ ----------
+ path : str or list
Review Comment:
```suggestion
path : str, list or :class:`RDD`
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org