|
| 1 | +============================ |
| 2 | +Kafka Time Series Properties |
| 3 | +============================ |
| 4 | + |
| 5 | +.. default-domain:: mongodb |
| 6 | + |
| 7 | +.. contents:: On this page |
| 8 | + :local: |
| 9 | + :backlinks: none |
| 10 | + :depth: 2 |
| 11 | + :class: singlecol |
| 12 | + |
| 13 | +Overview |
| 14 | +-------- |
| 15 | + |
| 16 | +Use the following configuration settings to specify how the connector |
| 17 | +should sink data to a MongoDB time series collection. |
| 18 | + |
| 19 | +.. include:: /includes/sink-config-link.rst |
| 20 | + |
| 21 | +Settings |
| 22 | +-------- |
| 23 | + |
| 24 | +.. list-table:: |
| 25 | + :header-rows: 1 |
| 26 | + :widths: 45 55 |
| 27 | + |
| 28 | + * - Name |
| 29 | + - Description |
| 30 | + |
| 31 | + * - | **timeseries.timefield** |
| 32 | + - | **Type:** string |
| 33 | + | |
| 34 | + | **Description:** |
| 35 | + | The name of the top-level field in the source data that contains time |
| 36 | + information that you want to associate with the new document in the |
| 37 | + time series collection. |
| 38 | + | |
| 39 | + | **Default**: ``""`` |
| 40 | + | **Accepted Values**: An empty string or the name of a field |
| 41 | + that contains a BSON ``DateTime`` value |
| 42 | + |
| 43 | + * - | **timeseries.timefield.auto.convert.date.format** |
| 44 | + - | **Type:** string |
| 45 | + | |
| 46 | + | **Description:** |
| 47 | + | The date format pattern the connector should use to convert the |
| 48 | + source data contained in the field specified by the |
| 49 | + ``timeseries.timefield`` setting. |
| 50 | + The connector passes the date format pattern to the Java |
| 51 | + `DateTimeFormatter.ofPattern(pattern, locale) <https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#ofPattern-java.lang.String-java.util.Locale->`__ |
| 52 | + method to perform date and time conversions on the time field. |
| 53 | + | If the date value from the source data only contains date information, |
| 54 | + the connector sets the time information to the start of the specified |
| 55 | + day. If the date value does not contain the timezone offset, the |
| 56 | + connector sets the offset to UTC. |
| 57 | + | |
| 58 | + | **Default**: |
| 59 | + |
| 60 | + .. code-block:: none |
| 61 | + |
| 62 | + yyyy-MM-dd[['T'][ ]][HH:mm:ss[[.][SSSSSS][SSS]][ ]VV[ ]'['VV']'][HH:mm:ss[[.][SSSSSS][SSS]][ ]X][HH:mm:ss[[.][SSSSSS][SSS]]] |
| 63 | + |
| 64 | + | **Accepted Values**: A valid ``DateTimeFormatter`` format |
| 65 | + |
| 66 | + * - | **timeseries.timefield.auto.convert** |
| 67 | + - | **Type:** boolean |
| 68 | + | |
| 69 | + | **Description:** |
| 70 | + | Whether to convert the data in the field into the BSON ``Date`` |
| 71 | + format. |
| 72 | + | When set to ``true``, the connector uses the milliseconds |
| 73 | + after epoch and discards fractional parts if the value is |
| 74 | + a number. If the value is a string, the connector uses the |
| 75 | + setting in the ``timeseries.timefield.auto.convert.date.format`` |
| 76 | + configuration to parse the date. |
| 77 | + | If the connector fails to convert the value, it sends the |
| 78 | + original value to the time series collection. |
| 79 | + | |
| 80 | + | **Default**: ``false`` |
| 81 | + | **Accepted Values**: ``true`` or ``false`` |
| 82 | + |
| 83 | + * - | **timeseries.timefield.auto.convert.locale.language.tag** |
| 84 | + - | **Type:** string |
| 85 | + | |
| 86 | + | **Description:** |
| 87 | + | Which ``DateTimeFormatter`` locale language tag to use with the date |
| 88 | + format pattern (e.g. ``"en-US"``). For more information on |
| 89 | + locales, see the Java SE documentation of `Locale <https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html>`__. |
| 90 | + | |
| 91 | + | **Default**: ``ROOT`` |
| 92 | + | **Accepted Values**: A valid ``Locale`` language tag format |
| 93 | + |
| 94 | + * - | **timeseries.metafield** |
| 95 | + - | **Type:** string |
| 96 | + | |
| 97 | + | **Description:** |
| 98 | + | Which top-level field to read from the source data to describe |
| 99 | + a group of related time series documents. |
| 100 | + |
| 101 | + .. important:: |
| 102 | + |
| 103 | + This field must not be the ``_id`` field nor the field you specified |
| 104 | + in the ``timeseries.timefield`` setting. |
| 105 | + |
| 106 | + | **Default**: ``""`` |
| 107 | + | **Accepted Values**: An empty string or the name of a field |
| 108 | + that contains any BSON type except ``BsonArray``. |
| 109 | + |
| 110 | + * - | **timeseries.expire.after.seconds** |
| 111 | + - | **Type:** int |
| 112 | + | |
| 113 | + | **Description:** |
| 114 | + | The number of seconds MongoDB should wait before automatically |
| 115 | + removing the time series collection data. The connector disables |
| 116 | + timed expiry when the setting value is less than ``1``. |
| 117 | + For more information on this collection setting, see the MongoDB |
| 118 | + Server Manual page on :manual:`Automatic Removal for Time Series Collections </core/timeseries/timeseries-automatic-removal/>`. |
| 119 | + | |
| 120 | + | **Default**: ``0`` |
| 121 | + | **Accepted Values**: An integer |
| 122 | + |
| 123 | + |
| 124 | + * - | **timeseries.granularity** |
| 125 | + - | **Type:** string |
| 126 | + | |
| 127 | + | **Description:** |
| 128 | + | The expected interval between subsequent measurements of your |
| 129 | + source data. For more information on this setting, see the |
| 130 | + MongoDB Server Manual page on :manual:`Granularity for Time |
| 131 | + Series Data </core/timeseries/timeseries-granularity/>`. |
| 132 | + | |
| 133 | + | *Optional* |
| 134 | + | **Default**: ``""`` |
| 135 | + | **Accepted Values**: ``""``, ``"seconds"``, ``"minutes"``, ``"hours"`` |
| 136 | + |
| 137 | +For an example on how to convert an existing collection to a time series |
| 138 | +collection, see the (TODO: link to Time Series Collection Example) page. |
| 139 | + |
| 140 | + |
0 commit comments