diff --git a/app/server/data_source_collection.go b/app/server/data_source_collection.go index fed6b9cf..df26f6d0 100644 --- a/app/server/data_source_collection.go +++ b/app/server/data_source_collection.go @@ -40,7 +40,14 @@ func (dsc *DataSourceCollection) DescribeTable( api_common.EDataSourceKind_MYSQL, api_common.EDataSourceKind_GREENPLUM, api_common.EDataSourceKind_ORACLE: ds, err := dsc.rdbms.Make(logger, kind) if err != nil { - return nil, err + return nil, fmt.Errorf("make data source: %w", err) + } + + return ds.DescribeTable(ctx, logger, request) + case api_common.EDataSourceKind_LOGGING: + ds, err := dsc.rdbms.Make(logger, api_common.EDataSourceKind_YDB) + if err != nil { + return nil, fmt.Errorf("make data source: %w", err) } return ds.DescribeTable(ctx, logger, request) @@ -65,7 +72,14 @@ func (dsc *DataSourceCollection) DoReadSplit( api_common.EDataSourceKind_MYSQL, api_common.EDataSourceKind_GREENPLUM, api_common.EDataSourceKind_ORACLE: ds, err := dsc.rdbms.Make(logger, kind) if err != nil { - return err + return fmt.Errorf("make data source: %w", err) + } + + return readSplit[any](logger, stream, request, split, ds, dsc.memoryAllocator, dsc.readLimiterFactory, dsc.cfg) + case api_common.EDataSourceKind_LOGGING: + ds, err := dsc.rdbms.Make(logger, api_common.EDataSourceKind_YDB) + if err != nil { + return fmt.Errorf("make data source: %w", err) } return readSplit[any](logger, stream, request, split, ds, dsc.memoryAllocator, dsc.readLimiterFactory, dsc.cfg) diff --git a/app/server/datasource/rdbms/ydb/schema_provider.go b/app/server/datasource/rdbms/ydb/schema_provider.go index ef71d108..8ba4ab14 100644 --- a/app/server/datasource/rdbms/ydb/schema_provider.go +++ b/app/server/datasource/rdbms/ydb/schema_provider.go @@ -31,7 +31,7 @@ func (f *schemaProvider) GetSchema( desc := options.Description{} prefix := path.Join(db.Name(), request.Table) - logger.Debug("obtaining table metadata", zap.String("prefix", prefix)) + logger.Debug("Obtaining table metadata", zap.String("prefix", prefix)) err := db.Table().Do( ctx, diff --git a/app/server/validate.go b/app/server/validate.go index 2c2b64bd..55800105 100644 --- a/app/server/validate.go +++ b/app/server/validate.go @@ -87,9 +87,9 @@ func validateDataSourceOptions(dsi *api_common.TDataSourceInstance) error { case api_common.EDataSourceKind_GREENPLUM: return nil case api_common.EDataSourceKind_CLICKHOUSE, api_common.EDataSourceKind_S3, api_common.EDataSourceKind_YDB, - api_common.EDataSourceKind_MYSQL: + api_common.EDataSourceKind_MYSQL, api_common.EDataSourceKind_LOGGING: default: - return fmt.Errorf("unsupported data source: %w", common.ErrInvalidRequest) + return fmt.Errorf("unsupported data source %s: %w", dsi.GetKind().String(), common.ErrInvalidRequest) } return nil