Skip to content

Commit

Permalink
Adding an example of the IMPORT command using secret Connections. (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
morazow authored Mar 5, 2020
1 parent 85ebf2f commit f8f4e52
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ FROM SCRIPT ETL.IMPORT_PATH WITH
PARALLELISM = 'nproc()';
```

The same can be achieved by using the secret key connection object. Please check the [supported cloud storage systems](storage/cloud_storages.md) for more details.

```sql
IMPORT INTO RETAIL.SALES_POSITIONS
FROM SCRIPT ETL.IMPORT_PATH WITH
BUCKET_PATH = 'wasbs://<CONTAINER>@<AZURE_ACCOUNT_NAME>.blob.core.windows.net/data/avro/sales-positions/*'
DATA_FORMAT = 'AVRO'
CONNECTION_NAME = '<PREDEFINED_CONNECTION>'
PARALLELISM = 'nproc()';
```

When running the import, it will first execute the `IMPORT_METADATA` udf in
order to calculate the number of files in the user provided path. Then it will
distribute these files in round-robin fashion into number of `PARALLELISM`
Expand Down

0 comments on commit f8f4e52

Please sign in to comment.