Skip to content

Commit a168239

Browse files
committed
fixes for Acrolynx generated suggestions
1 parent a676aed commit a168239

File tree

2 files changed

+27
-24
lines changed

2 files changed

+27
-24
lines changed

articles/cosmos-db/postgresql/howto-ingest-azure-blob-storage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pg_size_pretty | 5257 kB
6666
content_type | application/x-gzip
6767
```
6868

69-
You can filter the output either by using a regular SQL `WHERE` clause, or by using the `prefix` parameter of the `blob_list` UDF. The latter will filter the returned rows on the Azure Blob Storage side.
69+
You can filter the output either by using a regular SQL `WHERE` clause, or by using the `prefix` parameter of the `blob_list` UDF. The latter filters the returned rows on the Azure Blob Storage side.
7070

7171

7272
> [!NOTE]
@@ -178,7 +178,7 @@ Currently the extension supports the following file formats:
178178

179179
### Load data with blob_get()
180180

181-
The `COPY` command is convenient, but limited in flexibility. Internally COPY uses the `blob_get` function, which you can use directly to manipulate data in much more complex scenarios.
181+
The `COPY` command is convenient, but limited in flexibility. Internally COPY uses the `blob_get` function, which you can use directly to manipulate data in more complex scenarios.
182182

183183
```sql
184184
SELECT *

articles/cosmos-db/postgresql/reference-pg-azure-storage.md

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ An Azure blob storage (ABS) account contains all of your ABS objects: blobs, fil
101101
#### user_p
102102
Role created by user visible on the cluster.
103103

104+
> [!Note]
105+
> `account_user_add`,`account_add`,`account_remove`,`account_user_remove` functions require setting permissions for each individual nodes in cluster.
106+
104107
## azure_storage.account_user_remove
105108
The function allows removing access for a role to a storage account.
106109

@@ -209,7 +212,7 @@ azure_storage.blob_get
209212
)
210213
RETURNS SETOF record;
211214
```
212-
There is an overloaded version of function, containing rec parameter which allows you to conveniently define the output format record.
215+
There's an overloaded version of function, containing rec parameter that allows you to conveniently define the output format record.
213216
```postgresql
214217
azure_storage.blob_get
215218
(account_name text
@@ -245,9 +248,9 @@ Decoder can be set to auto (default) or any of the following values
245248
| text | A file containing a single text value (for example, large JSON or XML) |
246249

247250
#### compression
248-
defines the compression format. Available options are `auto`, `gzip` & `none`. The use of the `auto` option (default), guesses the compression based on the file extension (.gz == gzip). The option none forces to ignore the extension and not attempt to decode and gzip forces using the gzip decoder (for when you have a gzipped file with a non-standard extension). We currently don't support any other compression formats for the extension.
251+
defines the compression format. Available options are `auto`, `gzip` & `none`. The use of the `auto` option (default), guesses the compression based on the file extension (.gz == gzip). The option `none` forces to ignore the extension and not attempt to decode. While gzip forces using the gzip decoder (for when you have a gzipped file with a non-standard extension). We currently don't support any other compression formats for the extension.
249252
#### options
250-
for handling custom headers, custom separators, escape characters etc., `options` works in similar fashion to `COPY` command in PostgreSQL, parameter utilises to blob_get function.
253+
for handling custom headers, custom separators, escape characters etc., `options` works in similar fashion to `COPY` command in PostgreSQL, parameter utilizes to blob_get function.
251254

252255
### Return Type
253256
SETOF Record
@@ -256,7 +259,7 @@ SETOF Record
256259
> There are four utility functions, called as a parameter within blob_get that help building values for it. Each utility function is designated for the decoder matching its name.
257260
258261
## azure_storage.options_csv_get
259-
The function acts as a utility function called as a parameter within blob_get. This is useful for decoding the csv content.
262+
The function acts as a utility function called as a parameter within blob_get, which is useful for decoding the csv content.
260263

261264
```postgresql
262265
azure_storage.options_csv_get
@@ -274,7 +277,7 @@ Returns jsonb;
274277

275278
### Arguments
276279
#### delimiter
277-
Specifies the character that separates columns within each row (line) of the file. The default is a tab character in text format, a comma in CSV format. This must be a single one-byte character.
280+
Specifies the character that separates columns within each row (line) of the file. The default is a tab character in text format, a comma in CSV format. It must be a single one-byte character.
278281

279282
#### null_string
280283
Specifies the string that represents a null value. The default is \N (backslash-N) in text format, and an unquoted empty string in CSV format. You might prefer an empty string even in text format for cases where you don't want to distinguish nulls from empty strings.
@@ -283,19 +286,19 @@ Specifies the string that represents a null value. The default is \N (backslash-
283286
Specifies that the file contains a header line with the names of each column in the file. On output, the first line contains the column names from the table.
284287

285288
#### quote
286-
Specifies the quoting character to be used when a data value is quoted. The default is double-quote. This must be a single one-byte character.
289+
Specifies the quoting character to be used when a data value is quoted. The default is double-quote. It must be a single one-byte character.
287290

288291
#### escape
289-
Specifies the character that should appear before a data character that matches the QUOTE value. The default is the same as the QUOTE value (so that the quoting character is doubled if it appears in the data). This must be a single one-byte character.
292+
Specifies the character that should appear before a data character that matches the QUOTE value. The default is the same as the QUOTE value (so that the quoting character is doubled if it appears in the data). It must be a single one-byte character.
290293

291294
#### force_not_null
292-
Do not match the specified columns' values against the null string. In the default case where the null string is empty, this means that empty values will be read as zero-length strings rather than nulls, even when they are not quoted.
295+
Don't match the specified columns' values against the null string. In the default case where the null string is empty, it means that empty values are read as zero-length strings rather than nulls, even when they aren't quoted.
293296

294297
#### force_null
295-
Match the specified columns' values against the null string, even if it has been quoted, and if a match is found set the value to NULL. In the default case where the null string is empty, this converts a quoted empty string into NULL.
298+
Match the specified columns' values against the null string, even if it has been quoted, and if a match is found set the value to NULL. In the default case where the null string is empty, it converts a quoted empty string into NULL.
296299

297300
#### content_encoding
298-
Specifies that the file is encoded in the encoding_name. If this option is omitted, the current client encoding is used.
301+
Specifies that the file is encoded in the encoding_name. If the option is omitted, the current client encoding is used.
299302

300303
### Return Type
301304
jsonb
@@ -320,7 +323,7 @@ Returns jsonb;
320323

321324
### Arguments
322325
#### delimiter
323-
Specifies the character that separates columns within each row (line) of the file. The default is a tab character in text format, a comma in CSV format. This must be a single one-byte character.
326+
Specifies the character that separates columns within each row (line) of the file. The default is a tab character in text format, a comma in CSV format. It must be a single one-byte character.
324327

325328
#### null_string
326329
Specifies the string that represents a null value. The default is \N (backslash-N) in text format, and an unquoted empty string in CSV format. You might prefer an empty string even in text format for cases where you don't want to distinguish nulls from empty strings.
@@ -329,28 +332,28 @@ Specifies the string that represents a null value. The default is \N (backslash-
329332
Specifies that the file contains a header line with the names of each column in the file. On output, the first line contains the column names from the table.
330333

331334
#### quote
332-
Specifies the quoting character to be used when a data value is quoted. The default is double-quote. This must be a single one-byte character.
335+
Specifies the quoting character to be used when a data value is quoted. The default is double-quote. It must be a single one-byte character.
333336

334337
#### escape
335-
Specifies the character that should appear before a data character that matches the QUOTE value. The default is the same as the QUOTE value (so that the quoting character is doubled if it appears in the data). This must be a single one-byte character.
338+
Specifies the character that should appear before a data character that matches the QUOTE value. The default is the same as the QUOTE value (so that the quoting character is doubled if it appears in the data). It must be a single one-byte character.
336339

337340
#### force_quote
338-
Forces quoting to be used for all non-NULL values in each specified column. NULL output is never quoted. If * is specified, non-NULL values will be quoted in all columns.
341+
Forces quoting to be used for all non-NULL values in each specified column. NULL output is never quoted. If * is specified, non-NULL values are quoted in all columns.
339342

340343
#### force_not_null
341-
Do not match the specified columns' values against the null string. In the default case where the null string is empty, this means that empty values will be read as zero-length strings rather than nulls, even when they are not quoted.
344+
Don't match the specified columns' values against the null string. In the default case where the null string is empty, it means that empty values are read as zero-length strings rather than nulls, even when they aren't quoted.
342345

343346
#### force_null
344-
Match the specified columns' values against the null string, even if it has been quoted, and if a match is found set the value to NULL. In the default case where the null string is empty, this converts a quoted empty string into NULL.
347+
Match the specified columns' values against the null string, even if it has been quoted, and if a match is found set the value to NULL. In the default case where the null string is empty, it converts a quoted empty string into NULL.
345348

346349
#### content_encoding
347-
Specifies that the file is encoded in the encoding_name. If this option is omitted, the current client encoding is used.
350+
Specifies that the file is encoded in the encoding_name. If the option is omitted, the current client encoding is used.
348351

349352
### Return Type
350353
jsonb
351354

352355
## azure_storage.options_tsv
353-
The function acts as a utility function called as a parameter within blob_get. This is useful for decoding the tsv content.
356+
The function acts as a utility function called as a parameter within blob_get. It's useful for decoding the tsv content.
354357

355358
```postgresql
356359
azure_storage.options_tsv
@@ -363,19 +366,19 @@ Returns jsonb;
363366

364367
### Arguments
365368
#### delimiter
366-
Specifies the character that separates columns within each row (line) of the file. The default is a tab character in text format, a comma in CSV format. This must be a single one-byte character.
369+
Specifies the character that separates columns within each row (line) of the file. The default is a tab character in text format, a comma in CSV format. It must be a single one-byte character.
367370

368371
#### null_string
369372
Specifies the string that represents a null value. The default is \N (backslash-N) in text format, and an unquoted empty string in CSV format. You might prefer an empty string even in text format for cases where you don't want to distinguish nulls from empty strings.
370373

371374
#### content_encoding
372-
Specifies that the file is encoded in the encoding_name. If this option is omitted, the current client encoding is used.
375+
Specifies that the file is encoded in the encoding_name. If the option is omitted, the current client encoding is used.
373376

374377
### Return Type
375378
jsonb
376379

377380
## azure_storage.options_binary
378-
The function acts as a utility function called as a parameter within blob_get. This is useful for decoding the binary content.
381+
The function acts as a utility function called as a parameter within blob_get. It's useful for decoding the binary content.
379382

380383
```postgresql
381384
azure_storage.options_binary
@@ -498,7 +501,7 @@ LIMIT 5;
498501
```
499502

500503
### Use compression with decoder option
501-
The example below shows how to enforce using the gzip compression on a gzip compressed file without a standard .gz extension..
504+
The example shows how to enforce using the gzip compression on a gzip compressed file without a standard .gz extension.
502505

503506
```sql
504507
SELECT * FROM azure_storage.blob_get

0 commit comments

Comments
 (0)