Callbacks
Load query engine config

Load query engine config

This callback is used for the custom implementations of the Vizzly query engine. It allows you to define the aggregate and supported time trunc functions that your query engine supports.

The callback is an async function, that returns a query engine config.

Query Engine Config

type SupportedTimeTruncFunctions = {
  [key: string]: {
    publicName: string;
    // https://docs.vizzly.co/concepts/timeFormat
    dateFormat: DateTimeFormat;
  };
};
 
type SupportedAggregates = {
  [id: string]: {
    publicName: string;
    // https://docs.vizzly.co/concepts/dataType
    validDataTypes: DataType;
  };
};
 
type QueryEngineConfig = {
  supportedAggregates: SupportedAggregates;
  supportedTimeTruncFunctions: SupportedTimeTruncFunctions;
};

Please note, there are a few basic requirements for your query engine. It must support max and count aggregates, as well as year and month time trunc functions.

Last updated on March 13, 2023