import { friendlyName } from '../types/field';
import { convertMetricFilterToDbt } from '../types/filterGrammarConversion';
import { getFormatExpression } from './formatting';
export function convertCustomMetricToDbt(field) {
    const filters = convertMetricFilterToDbt(field.filters);
    return {
        label: field.label || friendlyName(field.name),
        description: field.description,
        type: field.type,
        format: getFormatExpression(field),
        percentile: field.percentile,
        filters,
    };
}
//# sourceMappingURL=convertCustomMetricsToYaml.js.map