deephaven_enterprise.system_table_logger

This module defines functions for logging tables to Intraday storage.

class Codec(j_codec)[source]

Bases: object

A Simple wrapper class around io.deephaven.util.codec.ObjectCodec

byte_array_codec()[source]

Creates a new byte array codec

Return type:

Codec

Returns:

a new byte array codec

char_array_codec()[source]

Creates a new char array codec

Return type:

Codec

Returns:

a new char array codec

codec(codec)[source]

Creates a Codec instance for use with log_table and log_table_incremental

Parameters:

codec (Union[str, JObjectCodec]) – the codec as either a string representing the fully qualified java class, or an instance of a java io.deephaven.util.codec.ObjectCodec

Return type:

Codec

Returns:

Codec

Raises:

DHError

double_array_codec()[source]

Creates a new double array codec

Return type:

Codec

Returns:

a new double array codec

float_array_codec()[source]

Creates a new float array codec

Return type:

Codec

Returns:

a new float array codec

int_array_codec()[source]

Creates a new int array codec

Return type:

Codec

Returns:

a new int array codec

log_table(namespace, table_name, table, columnPartition, internalPartition=None, applicationVersion=None, zone=None, useLas=True, logDir=None, codecs=None)[source]

Writes tableToLog to Intraday storage.

The table is logged to Intraday storage and can be retrieved with db.live_table. Historical tables should be written using a merge process.

Parameters:
  • namespace (str) – the namespace of the table

  • table_name (str) – the name of the table

  • table (Table) – the table to log

  • columnPartition (str) – the column partition to log to, if None then uses the current date

  • internalPartition (str) – the internal partition, defaults to None, meaning an internal partition is generated

  • applicationVersion (int) – the application version, if None, defaults to zero

  • zone (str) – the time zone ID (as interpreted by java.time.ZoneId.of)

  • useLas (bool) – whether to use the log aggregator service, defaults to True

  • logDir (str) – the directory for writing binary log files, if not None, useLas must be False. Defaults to None

  • codecs (dict[str, Codec]) – an optional map of column name to Codec for encoding the values, defaults to None

Return type:

None

Returns:

None

log_table_incremental(namespace, table_name, table, columnPartition, internalPartition=None, applicationVersion=None, zone=None, useLas=True, logDir=None, codecs=None)[source]

TODO: 1. parameter naming is not Python convention would be a breaking change to fix, sooner better than later?” 2. Not sure about the System -> Intraday change

Return type:

AutoCloseable

long_array_codec()[source]

Creates a new long array codec

Return type:

Codec

Returns:

a new long array codec

short_array_codec()[source]

Creates a new short array codec

Return type:

Codec

Returns:

a new short array codec

string_array_codec()[source]

Creates a new string array codec

Return type:

Codec

Returns:

a new string array codec