(action: dataform.IExecutionAction)
| 309 | } |
| 310 | |
| 311 | public async setMetadata(action: dataform.IExecutionAction): Promise<void> { |
| 312 | const { target, actionDescriptor } = action; |
| 313 | |
| 314 | const metadata = await this.getMetadata(target); |
| 315 | const schemaWithDescription = addDescriptionToMetadata( |
| 316 | actionDescriptor.columns, |
| 317 | metadata.schema.fields |
| 318 | ); |
| 319 | |
| 320 | await this.getClient(target.database) |
| 321 | .dataset(target.schema) |
| 322 | .table(target.name) |
| 323 | .setMetadata({ |
| 324 | description: actionDescriptor.description, |
| 325 | schema: schemaWithDescription, |
| 326 | labels: actionDescriptor.bigqueryLabels |
| 327 | }); |
| 328 | } |
| 329 | |
| 330 | private async getMetadata(target: dataform.ITarget): Promise<TableMetadata> { |
| 331 | try { |
nothing calls this directly
no test coverage detected