Skip to content

Commit 75cdad3

Browse files
1cadumagalhaesactions-user
authored andcommitted
style: 💄 Apply formatting changes
1 parent 97282c3 commit 75cdad3

File tree

4 files changed

+53
-46
lines changed

4 files changed

+53
-46
lines changed

bigquery.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let schemaExample = [
1414
/**
1515
* Returns a bigquery dataset. If it doesn't exist, creates a new and then returns.
1616
* @param {String} datasetId
17-
* @returns {Dataset}
17+
* @returns {Dataset}
1818
*/
1919
async function getOrCreateDataset(datasetId) {
2020
const bq = new BigQuery();

docs/index.md

+50-43
Original file line numberDiff line numberDiff line change
@@ -29,97 +29,104 @@
2929
<a name="createSchemaBq"></a>
3030

3131
## createSchemaBq(result, queryString, schemaName) ⇒ <code>Array</code>
32+
3233
Monta as linhas para serem inseridas no BQ
3334

3435
**Kind**: global function
35-
**Returns**: <code>Array</code> - Dados estruturados para o BQ
36+
**Returns**: <code>Array</code> - Dados estruturados para o BQ
3637

37-
| Param | Type | Description |
38-
| --- | --- | --- |
39-
| result | <code>Array</code> | Status das chaves validadas |
40-
| queryString | <code>Object</code> | |
41-
| schemaName | <code>String</code> | Identificação do schema usado para validação |
38+
| Param | Type | Description |
39+
| ----------- | ------------------- | -------------------------------------------- |
40+
| result | <code>Array</code> | Status das chaves validadas |
41+
| queryString | <code>Object</code> | |
42+
| schemaName | <code>String</code> | Identificação do schema usado para validação |
4243

4344
<a name="addTimestamp"></a>
4445

4546
## addTimestamp(data) ⇒ <code>Object</code>
47+
4648
Adiciona o atributo data para o objeto, contendo o timestamp do momento da execução
4749

4850
**Kind**: global function
49-
**Returns**: <code>Object</code> - Objeto com o atributo no padrão yyyy-mm-ddThh:mm:ss
51+
**Returns**: <code>Object</code> - Objeto com o atributo no padrão yyyy-mm-ddThh:mm:ss
5052

51-
| Param | Type | Description |
52-
| --- | --- | --- |
53-
| data | <code>Object</code> | Objeto |
53+
| Param | Type | Description |
54+
| ----- | ------------------- | ----------- |
55+
| data | <code>Object</code> | Objeto |
5456

5557
<a name="insertRowsAsStream"></a>
5658

5759
## insertRowsAsStream(data)
60+
5861
Realiza a persistências dos dados por Stream no BigQuery
5962

60-
**Kind**: global function
63+
**Kind**: global function
6164

62-
| Param | Type | Description |
63-
| --- | --- | --- |
64-
| data | <code>Array</code> | Dados estruturados no padrão de persistência do BQ |
65+
| Param | Type | Description |
66+
| ----- | ------------------ | -------------------------------------------------- |
67+
| data | <code>Array</code> | Dados estruturados no padrão de persistência do BQ |
6568

6669
<a name="loadProjectConfig"></a>
6770

6871
## loadProjectConfig()
72+
6973
Carrega o arquivo de configuração armazenado no GCS
7074

7175
**Kind**: global function
7276
<a name="trace"></a>
7377

7478
## trace(log)
79+
7580
Enviado o log para o stdout, se somente se, a variável debugging = true
7681

77-
**Kind**: global function
82+
**Kind**: global function
7883

79-
| Param | Type | Description |
80-
| --- | --- | --- |
81-
| log | <code>Object</code> | Que será apresentado no stdout |
84+
| Param | Type | Description |
85+
| ----- | ------------------- | ------------------------------ |
86+
| log | <code>Object</code> | Que será apresentado no stdout |
8287

8388
<a name="getOrCreateDataset"></a>
8489

8590
## getOrCreateDataset(datasetId) ⇒ <code>Dataset</code>
91+
8692
Returns a bigquery dataset. If it doesn't exist, creates a new and then returns.
8793

88-
**Kind**: global function
94+
**Kind**: global function
8995

90-
| Param | Type |
91-
| --- | --- |
92-
| datasetId | <code>String</code> |
96+
| Param | Type |
97+
| --------- | ------------------- |
98+
| datasetId | <code>String</code> |
9399

94100
<a name="insertRowsAsStream"></a>
95101

96102
## insertRowsAsStream(rows, datasetId, tableName, schema)
103+
97104
Insert rows as stream at the given table and dataset.
98105

99-
**Kind**: global function
106+
**Kind**: global function
100107

101-
| Param | Type | Description |
102-
| --- | --- | --- |
103-
| rows | <code>Array</code> | Array of objects that will be inserted |
104-
| datasetId | <code>\*</code> | |
105-
| tableName | <code>\*</code> | |
106-
| schema | <code>\*</code> | Schema of the table, in case you need to create it. |
108+
| Param | Type | Description |
109+
| --------- | ------------------ | --------------------------------------------------- |
110+
| rows | <code>Array</code> | Array of objects that will be inserted |
111+
| datasetId | <code>\*</code> | |
112+
| tableName | <code>\*</code> | |
113+
| schema | <code>\*</code> | Schema of the table, in case you need to create it. |
107114

108115
<a name="hubMessage"></a>
109116

110117
## hubMessage(body) ⇒ <code>Object</code>
111-
**Kind**: global function
112-
**Returns**: <code>Object</code> - - Structured message.
113-
114-
| Param | Type | Default | Description |
115-
| --- | --- | --- | --- |
116-
| body | <code>object</code> | | Request body |
117-
| [body.project] | <code>string</code> | <code>&quot;GCP Project&quot;</code> | Name of the project. |
118-
| body.module | <code>string</code> | | Name of the module that sent the message. |
119-
| body.spec | <code>string</code> | | Division of the module |
120-
| body.deploy | <code>number</code> | | Module or Cloud Function version |
121-
| [body.code] | <code>string</code> | <code>&quot;\&quot;00-00\&quot;&quot;</code> | Status code, will be used to get the message. |
122-
| [body.description] | <code>string</code> | | Description of the status |
123-
| [body.details] | <code>string</code> | | JSON field with details and specific log to explain the status |
124-
| [body.payload] | <code>Object</code> | | JSON payload that will be passed without changing the table structure |
125118

119+
**Kind**: global function
120+
**Returns**: <code>Object</code> - - Structured message.
121+
122+
| Param | Type | Default | Description |
123+
| ------------------ | ------------------- | -------------------------------------------- | --------------------------------------------------------------------- |
124+
| body | <code>object</code> | | Request body |
125+
| [body.project] | <code>string</code> | <code>&quot;GCP Project&quot;</code> | Name of the project. |
126+
| body.module | <code>string</code> | | Name of the module that sent the message. |
127+
| body.spec | <code>string</code> | | Division of the module |
128+
| body.deploy | <code>number</code> | | Module or Cloud Function version |
129+
| [body.code] | <code>string</code> | <code>&quot;\&quot;00-00\&quot;&quot;</code> | Status code, will be used to get the message. |
130+
| [body.description] | <code>string</code> | | Description of the status |
131+
| [body.details] | <code>string</code> | | JSON field with details and specific log to explain the status |
132+
| [body.payload] | <code>Object</code> | | JSON payload that will be passed without changing the table structure |

log.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
"details": ""
1414
},
1515
"payload": "{}"
16-
}
16+
}

log_schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@
3535
"name": "payload",
3636
"type": "STRING"
3737
}
38-
]
38+
]

0 commit comments

Comments
 (0)