|
29 | 29 | <a name="createSchemaBq"></a>
|
30 | 30 |
|
31 | 31 | ## createSchemaBq(result, queryString, schemaName) ⇒ <code>Array</code>
|
| 32 | + |
32 | 33 | Monta as linhas para serem inseridas no BQ
|
33 | 34 |
|
34 | 35 | **Kind**: global function
|
35 |
| -**Returns**: <code>Array</code> - Dados estruturados para o BQ |
| 36 | +**Returns**: <code>Array</code> - Dados estruturados para o BQ |
36 | 37 |
|
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 | |
42 | 43 |
|
43 | 44 | <a name="addTimestamp"></a>
|
44 | 45 |
|
45 | 46 | ## addTimestamp(data) ⇒ <code>Object</code>
|
| 47 | + |
46 | 48 | Adiciona o atributo data para o objeto, contendo o timestamp do momento da execução
|
47 | 49 |
|
48 | 50 | **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 |
50 | 52 |
|
51 |
| -| Param | Type | Description | |
52 |
| -| --- | --- | --- | |
53 |
| -| data | <code>Object</code> | Objeto | |
| 53 | +| Param | Type | Description | |
| 54 | +| ----- | ------------------- | ----------- | |
| 55 | +| data | <code>Object</code> | Objeto | |
54 | 56 |
|
55 | 57 | <a name="insertRowsAsStream"></a>
|
56 | 58 |
|
57 | 59 | ## insertRowsAsStream(data)
|
| 60 | + |
58 | 61 | Realiza a persistências dos dados por Stream no BigQuery
|
59 | 62 |
|
60 |
| -**Kind**: global function |
| 63 | +**Kind**: global function |
61 | 64 |
|
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 | |
65 | 68 |
|
66 | 69 | <a name="loadProjectConfig"></a>
|
67 | 70 |
|
68 | 71 | ## loadProjectConfig()
|
| 72 | + |
69 | 73 | Carrega o arquivo de configuração armazenado no GCS
|
70 | 74 |
|
71 | 75 | **Kind**: global function
|
72 | 76 | <a name="trace"></a>
|
73 | 77 |
|
74 | 78 | ## trace(log)
|
| 79 | + |
75 | 80 | Enviado o log para o stdout, se somente se, a variável debugging = true
|
76 | 81 |
|
77 |
| -**Kind**: global function |
| 82 | +**Kind**: global function |
78 | 83 |
|
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 | |
82 | 87 |
|
83 | 88 | <a name="getOrCreateDataset"></a>
|
84 | 89 |
|
85 | 90 | ## getOrCreateDataset(datasetId) ⇒ <code>Dataset</code>
|
| 91 | + |
86 | 92 | Returns a bigquery dataset. If it doesn't exist, creates a new and then returns.
|
87 | 93 |
|
88 |
| -**Kind**: global function |
| 94 | +**Kind**: global function |
89 | 95 |
|
90 |
| -| Param | Type | |
91 |
| -| --- | --- | |
92 |
| -| datasetId | <code>String</code> | |
| 96 | +| Param | Type | |
| 97 | +| --------- | ------------------- | |
| 98 | +| datasetId | <code>String</code> | |
93 | 99 |
|
94 | 100 | <a name="insertRowsAsStream"></a>
|
95 | 101 |
|
96 | 102 | ## insertRowsAsStream(rows, datasetId, tableName, schema)
|
| 103 | + |
97 | 104 | Insert rows as stream at the given table and dataset.
|
98 | 105 |
|
99 |
| -**Kind**: global function |
| 106 | +**Kind**: global function |
100 | 107 |
|
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. | |
107 | 114 |
|
108 | 115 | <a name="hubMessage"></a>
|
109 | 116 |
|
110 | 117 | ## 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>"GCP Project"</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>"\"00-00\""</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 | |
125 | 118 |
|
| 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>"GCP Project"</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>"\"00-00\""</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 | |
0 commit comments