@@ -3,9 +3,9 @@ import pli from "../internals/polars_internal";
3
3
import type { Series } from "../series" ;
4
4
import type { Deserialize , GroupByOps , Serialize } from "../shared_traits" ;
5
5
import type {
6
+ CsvWriterOptions ,
6
7
LazyJoinOptions ,
7
8
LazyOptions ,
8
- SinkCsvOptions ,
9
9
SinkParquetOptions ,
10
10
} from "../types" ;
11
11
import {
@@ -541,7 +541,7 @@ export interface LazyDataFrame extends Serialize, GroupByOps<LazyGroupBy> {
541
541
>>> lf.sinkCsv("out.csv")
542
542
*/
543
543
544
- sinkCSV ( path : string , options ?: SinkCsvOptions ) : void ;
544
+ sinkCSV ( path : string , options ?: CsvWriterOptions ) : void ;
545
545
546
546
/***
547
547
*
@@ -580,6 +580,18 @@ export interface LazyDataFrame extends Serialize, GroupByOps<LazyGroupBy> {
580
580
@param simplifyExpression - Run simplify expressions optimization. Default -> true
581
581
@param slicePushdown - Slice pushdown optimization. Default -> true
582
582
@param noOptimization - Turn off (certain) optimizations. Default -> false
583
+ @param cloudOptions - Options that indicate how to connect to a cloud provider.
584
+ If the cloud provider is not supported by Polars, the storage options are passed to `fsspec.open()`.
585
+
586
+ The cloud providers currently supported are AWS, GCP, and Azure.
587
+ See supported keys here:
588
+
589
+ * `aws <https://docs.rs/object_store/latest/object_store/aws/enum.AmazonS3ConfigKey.html>`_
590
+ * `gcp <https://docs.rs/object_store/latest/object_store/gcp/enum.GoogleConfigKey.html>`_
591
+ * `azure <https://docs.rs/object_store/latest/object_store/azure/enum.AzureConfigKey.html>`_
592
+
593
+ If `cloudOptions` is not provided, Polars will try to infer the information from environment variables.
594
+ @param retries - Number of retries if accessing a cloud instance fails.
583
595
584
596
Examples
585
597
--------
@@ -1078,7 +1090,7 @@ export const _LazyDataFrame = (_ldf: any): LazyDataFrame => {
1078
1090
withRowCount ( name = "row_nr" ) {
1079
1091
return _LazyDataFrame ( _ldf . withRowCount ( name ) ) ;
1080
1092
} ,
1081
- sinkCSV ( path , options : SinkCsvOptions = { } ) {
1093
+ sinkCSV ( path , options : CsvWriterOptions = { } ) {
1082
1094
options . maintainOrder = options . maintainOrder ?? false ;
1083
1095
_ldf . sinkCsv ( path , options ) ;
1084
1096
} ,
0 commit comments