Опции
Bases: FileDFReadOptions, GenericOptions
Options for FileDFReader.
Added in 0.9.0
Examples
Note
You can pass any value supported by Spark,
even if it is not mentioned in this documentation. Option names should be in camelCase!
The set of supported options depends on Spark version.
from onetl.file import FileDFReader
options = FileDFReader.Options(recursive=True)
Source code in onetl/file/file_df_reader/options.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
recursive = Field(default=None, alias='recursiveFileLookup')
class-attribute
instance-attribute
If True, perform recursive file lookup.
Warning
This disables partition inferring using file paths.
Warning
Can be used only in Spark 3+. See SPARK-27990.
apply_to_reader(reader)
Apply provided format to pyspark.sql.DataFrameReader.
Returns
pyspark.sql.DataFrameReader Reader with options applied.
Source code in onetl/file/file_df_reader/options.py
58 59 60 61 62 63 64 65 66 67 68 69 | |