FIX: add table_schema to request

This commit is contained in:
Gabriel Amorim
2023-03-14 16:00:57 -03:00
parent 2abc19c589
commit 7b25bfdb69
6 changed files with 50 additions and 23 deletions
+5 -6
View File
@@ -17,6 +17,7 @@ import {
import { ApiCreatedResponse, ApiHeaders, ApiTags } from '@nestjs/swagger';
import {
Authenticated,
RequireAllPermissions,
RequireSomePermission,
} from '../../decorators/authentication.decorator';
import { PERMISSIONS_GROUPS } from '../../authentication/permissions.enum';
@@ -583,9 +584,8 @@ export class CatalogController {
}
@Post('dataset-catalog-task')
@RequireSomePermission(
PERMISSIONS_GROUPS.CATALOG.permissions.UPDATE,
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
@RequireAllPermissions(
PERMISSIONS_GROUPS.CATALOG.permissions.TRIGGER_CATALOG_TASK,
)
@ApiCreatedResponse({ type: TriggerCatalogRes })
async triggerCatalog(
@@ -605,9 +605,8 @@ export class CatalogController {
}
@Get('dataset-catalog-task/:session')
@RequireSomePermission(
PERMISSIONS_GROUPS.CATALOG.permissions.UPDATE,
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
@RequireAllPermissions(
PERMISSIONS_GROUPS.CATALOG.permissions.TRIGGER_CATALOG_TASK,
)
@ApiCreatedResponse({ type: TriggerCatalogRes })
async getCatalogTask(
+15 -3
View File
@@ -273,10 +273,22 @@ export class IColumnsMetadataResponse {
}
export class TriggerCatalogReq {
@ApiProperty()
pipeline_id: string;
@ApiProperty()
@ApiProperty({
description: 'Name of the table on Snowflake',
example: 'TB__4DXSD4_TEST',
})
table_name: string;
@ApiPropertyOptional({
description:
'Schema where the asset is located. If not set defaults to "PUBLIC"',
})
table_schema?: string;
@ApiPropertyOptional({
description: 'Id of the pipeline that generated the asset.',
})
pipeline_id: string;
}
export class TriggerCatalogRes {