snowflake.snowpark.DataFrameWriter.csv¶
- DataFrameWriter.csv(location: str, *, partition_by: Optional[Union[Column, str]] = None, format_type_options: Optional[Dict[str, str]] = None, header: bool = False, statement_params: Optional[Dict[str, str]] = None, block: bool = True, **copy_options: Optional[str]) Union[List[Row], AsyncJob][source]¶
Executes internally a COPY INTO <location> to unload data from a
DataFrameinto one or more CSV files in a stage or external stage.- Parameters:
location – The destination stage location.
partition_by – Specifies an expression used to partition the unloaded table rows into separate files. It can be a
Column, a column name, or a SQL expression.format_type_options – Depending on the
file_format_typespecified, you can include more format specific options. Use the options documented in the Format Type Options.header – Specifies whether to include the table column headings in the output files.
statement_params – Dictionary of statement level parameters to be set while executing this action.
copy_options – The kwargs that are used to specify the copy options. Use the options documented in the Copy Options.
block – A bool value indicating whether this function will wait until the result is available. When it is
False, this function executes the underlying queries of the dataframe asynchronously and returns anAsyncJob.
- Returns:
A list of
Rowobjects containing unloading results.
Example: