Perform engine-specific initialization steps for this dataset Parameters ---------- df: dask.dataframe.DataFrame fs: FileSystem path: str Destination directory for data. Prepend with protocol like ``s3://`` or ``hdfs://`` for remote d
(
cls,
df,
fs,
path,
append=False,
partition_on=None,
ignore_divisions=False,
division_info=None,
**kwargs,
)
| 147 | |
| 148 | @classmethod |
| 149 | def initialize_write( |
| 150 | cls, |
| 151 | df, |
| 152 | fs, |
| 153 | path, |
| 154 | append=False, |
| 155 | partition_on=None, |
| 156 | ignore_divisions=False, |
| 157 | division_info=None, |
| 158 | **kwargs, |
| 159 | ): |
| 160 | """Perform engine-specific initialization steps for this dataset |
| 161 | |
| 162 | Parameters |
| 163 | ---------- |
| 164 | df: dask.dataframe.DataFrame |
| 165 | fs: FileSystem |
| 166 | path: str |
| 167 | Destination directory for data. Prepend with protocol like ``s3://`` |
| 168 | or ``hdfs://`` for remote data. |
| 169 | append: bool |
| 170 | If True, may use existing metadata (if any) and perform checks |
| 171 | against the new data being stored. |
| 172 | partition_on: List(str) |
| 173 | Column(s) to use for dataset partitioning in parquet. |
| 174 | ignore_divisions: bool |
| 175 | Whether or not to ignore old divisions when appending. Otherwise, |
| 176 | overlapping divisions will lead to an error being raised. |
| 177 | division_info: dict |
| 178 | Dictionary containing the divisions and corresponding column name. |
| 179 | **kwargs: dict |
| 180 | Other keyword arguments (including `index_cols`) |
| 181 | |
| 182 | Returns |
| 183 | ------- |
| 184 | tuple: |
| 185 | engine-specific instance |
| 186 | list of filenames, one per partition |
| 187 | """ |
| 188 | raise NotImplementedError |
| 189 | |
| 190 | @classmethod |
| 191 | def write_partition( |