congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ResourceDictionaries
Code IndexAdd Tabnine to your IDE (free)

How to use
ResourceDictionaries
in
com.yahoo.bard.webservice.data.config

Best Java code snippets using com.yahoo.bard.webservice.data.config.ResourceDictionaries (Showing top 20 results out of 315)

origin: yahoo/fili

/**
 * Load the Dimensions, Metrics, and Tables.
 */
public void load() {
  dimensionLoader.loadDimensionDictionary(dictionaries.getDimensionDictionary());
  // metric loader might dependent on dimension dictionary, so load dimension first
  metricLoader.loadMetricDictionary(dictionaries.getMetricDictionary(), dictionaries.getDimensionDictionary());
  tableLoader.loadTableDictionary(dictionaries);
  LOG.info("Initialized ConfigurationLoader");
  LOG.info(dictionaries.toString());
}
origin: yahoo/fili

/**
 * Load a logical table into the logicalDictionary.
 * <p>
 * Note: This builds the logical table as well.
 *
 * @param logicalTableName  The logical table name
 * @param nameGroup  The table group information for the logical table
 * @param validGrains  The accepted grains for the logical table
 * @param dictionaries  The resource dictionaries for reading and storing configuration
 */
public void loadLogicalTableWithGranularities(
    String logicalTableName,
    TableGroup nameGroup,
    Set<? extends Granularity> validGrains,
    ResourceDictionaries dictionaries
) {
  loadLogicalTableWithGranularities(
      logicalTableName,
      nameGroup,
      validGrains,
      dictionaries.getLogicalDictionary(),
      dictionaries.getMetricDictionary()
  );
}
origin: yahoo/fili

public PhysicalTableDictionary getPhysicalTableDictionary() {
  return dictionaries.getPhysicalDictionary();
}
origin: yahoo/fili

public DimensionDictionary getDimensionDictionary() {
  return dictionaries.getDimensionDictionary();
}
origin: yahoo/fili

Set<Column> columns = buildColumns(dictionaries.getDimensionDictionary());
Set<String> metricNames = Utils.getSubsetByType(columns, MetricColumn.class).stream()
    .map(MetricColumn::getName)
    dictionaries.getPhysicalDictionary()
);
origin: yahoo/fili

  public LogicalTableDictionary getLogicalTableDictionary() {
    return resourceDictionaries.getLogicalDictionary();
  }
}
origin: yahoo/fili

public MetricDictionary getMetricDictionary() {
  return dictionaries.getMetricDictionary();
}
origin: yahoo/fili

/**
 * The dictionary of configured dimensions.
 *
 * @return A dictionary of dimensions
 */
default DimensionDictionary getDimensionDictionary() {
  return getResourceDictionaries().getDimensionDictionary();
}
origin: yahoo/fili

@Override
public ConfigPhysicalTable build(ResourceDictionaries dictionaries, DataSourceMetadataService metadataService) {
  Map<ConfigPhysicalTable, DataSourceFilter> availabilityFilters = tablePartDefinitions.entrySet().stream()
      .collect(Collectors.toMap(
          entry -> dictionaries.getPhysicalDictionary().get(entry.getKey().asName()),
          entry -> new DimensionIdFilter(toDimensionValuesMap(
              entry.getValue(),
              dictionaries.getDimensionDictionary()
          ))
      ));
  return new BaseCompositePhysicalTable(
      getName(),
      getTimeGrain(),
      buildColumns(dictionaries.getDimensionDictionary()),
      availabilityFilters.keySet(),
      getLogicalToPhysicalNames(),
      PartitionAvailability.build(availabilityFilters)
  );
}
origin: yahoo/fili

public LogicalTableDictionary getLogicalTableDictionary() {
  return dictionaries.getLogicalDictionary();
}
origin: yahoo/fili

/**
 * The dictionary of configured metrics.
 *
 * @return A metric dictionary.
 */
default MetricDictionary getMetricDictionary() {
  return getResourceDictionaries().getMetricDictionary();
}
origin: yahoo/fili

/**
 * Load several logical tables into the logicalDictionary, all with the globally-scoped metric dictionary.
 * <p>
 * Note: This builds the logical tables as well.
 *
 * @param nameGroupMap  A map of logical table name to table group information
 * @param validGrains  The accepted grains for the logical table
 * @param dictionaries  The resource dictionaries for reading and storing configuration
 */
public void loadLogicalTablesWithGranularities(
    Map<String, TableGroup> nameGroupMap,
    Set<? extends Granularity> validGrains,
    ResourceDictionaries dictionaries
) {
  loadLogicalTablesWithGranularities(
      nameGroupMap,
      validGrains,
      dictionaries.getLogicalDictionary(),
      nameGroupMap.keySet().stream()
          .collect(Collectors.toMap(Function.identity(), i -> dictionaries.getMetricDictionary()))
  );
}
origin: yahoo/fili

@Override
public ConfigPhysicalTable build(ResourceDictionaries dictionaries, DataSourceMetadataService metadataService) {
  try {
    Map<ConfigPhysicalTable, Set<String>> tableMetricNamesMap = getTableToMetricsMap(dictionaries);
    validateDependentMetrics(tableMetricNamesMap);
    return new BaseCompositePhysicalTable(
        getName(),
        getTimeGrain(),
        buildColumns(dictionaries.getDimensionDictionary()),
        tableMetricNamesMap.keySet(),
        getLogicalToPhysicalNames(),
        MetricUnionAvailability.build(
            tableMetricNamesMap.keySet(), tableMetricNamesMap.entrySet().stream()
                .collect(Collectors.toMap(
                    entry -> entry.getKey().getAvailability(),
                    Map.Entry::getValue
                )))
    );
  } catch (IllegalArgumentException e) {
    String message = String.format(VALIDATION_ERROR_FORMAT, e.getMessage());
    LOG.error(message);
    throw new IllegalArgumentException(message);
  }
}
origin: yahoo/fili

  /**
   * The dictionary of logical tables.
   *
   * @return A logical table dictionary
   */
  default LogicalTableDictionary getLogicalTableDictionary() {
    return getResourceDictionaries().getLogicalDictionary();
  }
}
origin: yahoo/fili

);
PhysicalTableDictionary physicalTableDictionary = dictionaries.getPhysicalDictionary();
origin: com.yahoo.fili/fili-core

MetricDictionary metricDictionary = dictionaries.getMetricDictionary();
LogicalTableDictionary tableDictionary = dictionaries.getLogicalDictionary();
loadLogicalTablesWithGranularities(
    logicalTableTableGroup,
origin: yahoo/fili

  @Override
  public ConfigPhysicalTable build(
      ResourceDictionaries dictionaries,
      DataSourceMetadataService metadataService
  ) {
    return new PermissivePhysicalTable(
        getName(),
        getTimeGrain(),
        buildColumns(dictionaries.getDimensionDictionary()),
        getLogicalToPhysicalNames(),
        metadataService
    );
  }
}
origin: yahoo/fili

    ResourceDictionaries dictionaries
) {
  PhysicalTableDictionary physicalTableDictionary = dictionaries.getPhysicalDictionary();
origin: yahoo/fili

MetricDictionary metricDictionary = dictionaries.getMetricDictionary();
LogicalTableDictionary tableDictionary = dictionaries.getLogicalDictionary();
loadLogicalTablesWithGranularities(
    logicalTableTableGroup,
origin: yahoo/fili

  @Override
  public ConfigPhysicalTable build(ResourceDictionaries dictionaries, DataSourceMetadataService metadataService) {
    return new StrictPhysicalTable(
        getName(),
        getTimeGrain(),
        buildColumns(dictionaries.getDimensionDictionary()),
        getLogicalToPhysicalNames(),
        metadataService,
        getExpectedStartDate(),
        getExpectedEndDate()
    );
  }
}
com.yahoo.bard.webservice.data.configResourceDictionaries

Javadoc

Hold the resource dictionaries.

Most used methods

  • getDimensionDictionary
  • getLogicalDictionary
  • getMetricDictionary
  • getPhysicalDictionary
  • toString

Popular in Java

  • Start an intent from android
  • compareTo (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • setContentView (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Option (scala)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now