You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+85-8Lines changed: 85 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
FastBCP is a command line that export data from a database to CSV , JSON, Parquet or XLSX file(s) (or even binary file(s))
4
4
5
-

5
+

6
6
7
7
## Table of Contents
8
8
@@ -232,15 +232,17 @@ This field is mandatory if some parallel method is used like Rowid and Ctid
232
232
233
233
### Directory (`-D` or `--directory`)
234
234
Specify where the output file will be generated. it could be :
235
-
- a local directory `/data/db/schema/tname/` or `d:\data\db\schema\tname\`v
235
+
- a local directory `/data/db/schema/tname/` or `d:\data\db\schema\tname\`
236
+
- a remote directory `\\uncpath\db\schema\tname\`
236
237
- an aws s3 or s3 compatible s3 path : `s3://bucket/db/schema/tname/`
237
-
- a gcs localtion : `gcs://bucket/db/schema/tname/`
238
-
-*coming soon* : an azure abfss location : `abfss://<file_system>.dfs.core.windows.net/<path>/`
238
+
- a gcs localtion : `gs://bucket/db/schema/tname/`
239
+
- an azure blob storage location : `abs://<storage_account>.blob.core.windows.net/<container>/<path>/`
240
+
- an azure datalake gen2 location : `abfss://<file_system>.dfs.core.windows.net/<path>/`
239
241
240
242
### Output file (`-o` or `--fileoutput`)
241
243
The name of the final file generated by FastBCP.
242
-
**IMPORTANT : the file extension will define the output format : csv, tsv, json, bson, parquet, xlsx or binary (postgresql source only for binary)**
243
-
For parallel extraction without merge, the file name (without file extension) will be used as a prefix for the distributed files.
244
+
<br> **IMPORTANT : the file extension will define the output format : csv, tsv, json, bson, parquet, xlsx or binary (postgresql source only for binary)**
245
+
244
246
245
247
### Timestamped output (`-x` or `--timestamped` switch)
246
248
Will add a timestamp to the output file name if the switch is used
@@ -274,7 +276,7 @@ How boolean are formatted (`true/false`, `t/f` or `1/0`)
274
276
### cloud profile (--cloudprofile)
275
277
specify the name of the cloud profile
276
278
- for aws and s3 compatible aws cli : `aws configure --profile profilename`
277
-
-
279
+
-for gcs it should be the location of the json key file
278
280
279
281
**Nota1** : for **S3 compatible** target you must define the S3_ENDPOINT environment variable to define the proper S3 endpoint :
280
282
- exemple bash : `export S3_ENDPOINT = "https://play.min.io:9000"`
@@ -285,7 +287,11 @@ specify the name of the cloud profile
285
287
-`s3:AbortMultipartUpload`
286
288
-`s3:ListMultipartUploadParts`
287
289
288
-
290
+
**Nota 3**
291
+
For S3, Azure and GCS, without a cloud profile, FastBCP will try to use the default chain authentication mecanism of the cloud provider.
292
+
- For AWS/S3 : [AWS Default Credential Provider Chain](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html#credentials-default)
293
+
- For Azure : [Azure Default Credential Provider Chain](https://learn.microsoft.com/en-us/dotnet/api/azure.identity.defaultazurecredential?view=azure-dotnet)
294
+
- For GCS : [GCS Default Credential Provider Chain](https://cloud.google.com/docs/authentication/production)
289
295
290
296
## Advanced Parameters
291
297
@@ -486,5 +492,76 @@ You can have a lookp on the live [FastBCP Performance dashboard](https://public.
486
492
```
487
493
488
494
495
+
#### Parallel using RangeId from mssql to parquet on GCS bucket:
496
+
```powershell
497
+
.\FastBCP.exe `
498
+
--connectiontype mssql `
499
+
--server localhost `
500
+
--database "tpch10_collation_bin2" `
501
+
--trusted `
502
+
--query "SELECT * FROM dbo.orders" `
503
+
--directory "gs://targetbucket/bronze/tpch" `
504
+
--cloudprofile "fastbcp_profile" `
505
+
--fileoutput "mssql_orders.parquet" `
506
+
--method RangeId `
507
+
--distributekeycolumn "o_orderkey" `
508
+
--paralleldegree 12 `
509
+
--merge false `
510
+
--runid "mssql_to_parquet_aws_s3"
511
+
```
512
+
513
+
#### Parallel using DataDriven from mssql to parquet on GCS bucket with datadriven query:
514
+
```powershell
515
+
.\FastBCP.exe `
516
+
--connectiontype "mssql" `
517
+
--server "localhost" `
518
+
--database "tpch10_collation_bin2" `
519
+
--trusted `
520
+
--query "select * from orders" `
521
+
--directory "gs://aetpftoutput/test/" `
522
+
--fileoutput "mssql_orders.parquet" `
523
+
--method "DataDriven" `
524
+
--distributekeycolumn "o_orderdate" `
525
+
--datadrivenquery " select top 100 * from (select distinct o_orderdate from orders WHERE o_orderdate between '19950101' and '19950630') a order by 1desc" `
--datadrivenquery " select top 100 * from (select distinct o_orderdate from orders WHERE o_orderdate between '19950101' and '19950630') a order by 1 desc"
--datadrivenquery " select top 100 * from (select distinct o_orderdate from orders WHERE o_orderdate between '19950101' and '19950630') a order by 1 desc"
564
+
```
565
+
489
566
You can find more exemples in the [samples.ps1](samples.ps1.md) file
0 commit comments