Interface JoinableTable

All Known Implementing Classes:
JsTable, JsTotalsTable

@JsType(namespace="dh") public interface JoinableTable
Represents a table which can be joined to another table. Current implementations are JsTable and JsTotalsTable.
  • Method Summary

    Modifier and Type
    Method
    Description
    elemental2.promise.Promise<JsTable>
    asOfJoin(JoinableTable rightTable, elemental2.core.JsArray<String> columnsToMatch, @JsNullable elemental2.core.JsArray<String> columnsToAdd, @JsNullable String asOfMatchRule)
    Performs an inexact timeseries join, where rows in this table will have columns added from the closest matching row from the right table.
    elemental2.promise.Promise<JsTable>
    crossJoin(JoinableTable rightTable, elemental2.core.JsArray<String> columnsToMatch, @JsNullable elemental2.core.JsArray<String> columnsToAdd, @JsNullable Double reserveBits)
    a promise that will be resolved with the newly created table holding the results of the specified cross join operation.
    elemental2.promise.Promise<JsTable>
    exactJoin(JoinableTable rightTable, elemental2.core.JsArray<String> columnsToMatch, @JsNullable elemental2.core.JsArray<String> columnsToAdd)
    a promise that will be resolved with the newly created table holding the results of the specified exact join operation.
    elemental2.promise.Promise<JsTable>
     
    elemental2.promise.Promise<JsTable>
    join(String joinType, JoinableTable rightTable, elemental2.core.JsArray<String> columnsToMatch, @JsNullable elemental2.core.JsArray<String> columnsToAdd, @JsNullable String asOfMatchRule)
    Deprecated.
    Instead, call the specific method for the join type.
    elemental2.promise.Promise<JsTable>
    naturalJoin(JoinableTable rightTable, elemental2.core.JsArray<String> columnsToMatch, @JsNullable elemental2.core.JsArray<String> columnsToAdd)
    a promise that will be resolved with the newly created table holding the results of the specified natural join operation.
    elemental2.promise.Promise<JsTable>
    snapshot(JsTable baseTable, Boolean doInitialSnapshot, String[] stampColumns)
     
     
  • Method Details

    • state

      @JsIgnore ClientTableState state()
    • freeze

      @JsMethod elemental2.promise.Promise<JsTable> freeze()
    • snapshot

      @JsMethod elemental2.promise.Promise<JsTable> snapshot(JsTable baseTable, @JsOptional Boolean doInitialSnapshot, @JsOptional String[] stampColumns)
    • join

      @JsMethod @Deprecated elemental2.promise.Promise<JsTable> join(String joinType, JoinableTable rightTable, elemental2.core.JsArray<String> columnsToMatch, @JsOptional @JsNullable elemental2.core.JsArray<String> columnsToAdd, @JsOptional @JsNullable String asOfMatchRule)
      Deprecated.
      Instead, call the specific method for the join type.
      Joins this table to the provided table, using one of the specified join types:
      • AJ, ReverseAJ (or RAJ) - inexact timeseries joins, based on the provided matching rule.
      • CROSS_JOIN (or Join) - cross join of all rows that have matching values in both tables.
      • EXACT_JOIN (or ExactJoin - matches values in exactly one row in the right table, with errors if there is not exactly one.
      • NATURAL_JOIN (or Natural - matches values in at most one row in the right table, with nulls if there is no match or errors if there are multiple matches.
      Note that Left join is not supported here, unlike DHE.

      See the Choose a join method document for more guidance on picking a join operation.

      Parameters:
      joinType - The type of join to perform, see the list above.
      rightTable - The table to match to values in this table
      columnsToMatch - Columns that should match
      columnsToAdd - Columns from the right table to add to the result - empty/null/absent to add all columns
      asOfMatchRule - If joinType is AJ/RAJ/ReverseAJ, the match rule to use
      Returns:
      a promise that will resolve to the joined table
    • asOfJoin

      @JsMethod elemental2.promise.Promise<JsTable> asOfJoin(JoinableTable rightTable, elemental2.core.JsArray<String> columnsToMatch, @JsOptional @JsNullable elemental2.core.JsArray<String> columnsToAdd, @JsOptional @JsNullable String asOfMatchRule)
      Performs an inexact timeseries join, where rows in this table will have columns added from the closest matching row from the right table.

      The asOfMatchRule value can be one of:

      • LESS_THAN_EQUAL
      • LESS_THAN
      • GREATER_THAN_EQUAL
      • GREATER_THAN
      Parameters:
      rightTable - the table to match to values in this table
      columnsToMatch - the columns that should match, according to the asOfMatchRole
      columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all columns
      asOfMatchRule - the match rule to use, see above
      Returns:
      a promise that will resolve to the joined table
    • crossJoin

      @JsMethod elemental2.promise.Promise<JsTable> crossJoin(JoinableTable rightTable, elemental2.core.JsArray<String> columnsToMatch, @JsOptional @JsNullable elemental2.core.JsArray<String> columnsToAdd, @JsOptional @JsNullable Double reserveBits)
      a promise that will be resolved with the newly created table holding the results of the specified cross join operation. The columnsToAdd parameter is optional, not specifying it will result in all columns from the right table being added to the output. The reserveBits optional parameter lets the client control how the key space is distributed between the rows in the two tables, see the Java Table class for details.
      Parameters:
      rightTable - the table to match to values in this table
      columnsToMatch - the columns that should match exactly
      columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all columns
      reserveBits - the number of bits of key-space to initially reserve per group, null/absent will let the server select a value
      Returns:
      a promise that will resolve to the joined table
    • exactJoin

      @JsMethod elemental2.promise.Promise<JsTable> exactJoin(JoinableTable rightTable, elemental2.core.JsArray<String> columnsToMatch, @JsOptional @JsNullable elemental2.core.JsArray<String> columnsToAdd)
      a promise that will be resolved with the newly created table holding the results of the specified exact join operation. The `columnsToAdd` parameter is optional, not specifying it will result in all columns from the right table being added to the output.
      Parameters:
      rightTable - the table to match to values in this table
      columnsToMatch - the columns that should match exactly
      columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all columns
      Returns:
      a promise that will resolve to the joined table
    • naturalJoin

      @JsMethod elemental2.promise.Promise<JsTable> naturalJoin(JoinableTable rightTable, elemental2.core.JsArray<String> columnsToMatch, @JsOptional @JsNullable elemental2.core.JsArray<String> columnsToAdd)
      a promise that will be resolved with the newly created table holding the results of the specified natural join operation. The columnsToAdd parameter is optional, not specifying it will result in all columns from the right table being added to the output.
      Parameters:
      rightTable - the table to match to values in this table
      columnsToMatch - the columns that should match exactly
      columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all columns
      Returns:
      a promise that will resolve to the joined table