import { ViewSelectionDefinition, ViewGroupDefinition, ViewAggregationDefinition, ViewFilterDefinition, ViewLoadDefinition } from '@elaraai/core/analytics'; import { Partition } from '@elaraai/core/data'; import { EastFunction, PrimitiveType, StandardAggregationDefinition, SetType, StandardAggregationType } from '@elaraai/core/east'; import { PipelineDefinition } from '@elaraai/core/pipeline'; import { ELARASchema } from '@elaraai/core/schema'; /** * Utility plugin to simplify creating both a {@link PipelineDefinition} and {@link ViewDefinition} with diagnostic pages. * * @param definition: the desired {@link PipelineDefinition}. * @return a {@link ELARASchema} containing a {@link PipelineDefinition} and {@link ViewDefinition} contents * * @category Pipeline * * @example * ```typescript * // Create a Pipeline and View to aggregate costs into weekly totals per category. * const pipeline = PipelineViewPlugin(Pipeline({ * name: 'Weekly Costs', * input_table: table, * operations: [ * AggregateOperation({ * // create a group key * group_field: Variable("Key", StringType), * // group by the start of the week * group_value: StringJoin`WC${Floor(Variable('date', DateTimeType), "week")}`, * aggregations: { * // keep the date for each week * week: Unique(Floor(Variable('date', DateTimeType), "week")), * // collect the sum of costs per category in a `Dict` * costs: CollectDictSum( * Variable("Category", StringType), * Variable("Cost", IntegerType) * ) * } * }) * ] * })) * ``` */ export declare function PipelineViewPlugin(definition: PipelineDefinition & { /** the {@link Partition}'s to build the {@link ViewDefinition} from */ partition?: Partition; /** set to true to output all input fields as {@link ViewSelection}s */ keep_all?: boolean; /** a `Record` of the evaluated {@link Expression}'s */ selections?: Record; /** a `Record` of the {@link ViewGroupDefinition}'s to apply to group the data */ groups?: Record>; /** a `Record` of the {@link ViewAggregationDefinition}'s to apply to within each group */ aggregations?: Record>; /** a `Record` of the {@link ViewFilterDefinition}'s to enable filtering of the {@link ViewDefinition} in the UI */ filters?: Record; /** a `Record` of the {@link ViewFilterDefinition}'s to facilitate loading different {@link Partition}'s in the UI */ load?: Record; }): ELARASchema; //# sourceMappingURL=pipeline_view.d.ts.map