Concepts
Field

Field

Fields are used in data sets. They define various properties which are used to describe data.

Number, string and boolean fields

type Field = {
  id: string;
  publicName: string;
  dataType: "number" | "string" | "boolean";
  canBeDimension: boolean;
  canBeMeasure: boolean;
  allowedOperators: Array<Query.Operator>;
};

Date time fields

type DateTimeField = {
  id: string;
  publicName: string;
  dataType: "date_time";
 
  // Can this field be used in dimensions?
  canBeDimension: boolean;
 
  // Can this field be used in aggregates?
  canBeMeasure: boolean;
 
  // https://docs.vizzly.co/concepts/query
  allowedOperators: Array<Query.Operator>;
 
  // https://docs.vizzly.co/concepts/query
  allowedGranularities: Array<Query.TimeDimension.Truncate>;
};