<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:05:43 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[KAFKA-159] Support dynamic collection naming strategies</title>
                <link>https://jira.mongodb.org/browse/KAFKA-159</link>
                <project id="16285" key="KAFKA">Kafka Connector</project>
                    <description>&lt;p&gt;Currently the strategy for where data is saved by the Sink connector is based upon the topics&apos; database and collection configuration.  This maps the data from each topic to a single collection.&lt;/p&gt;

&lt;p&gt;Some users would like to dynamically create the collection to save the data into based upon the value in a SinkRecord.  Examples could be: &lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Use a date based field as the basis for the collection naming to allow bucketing of data into MongoDB&lt;/li&gt;
	&lt;li&gt;Use a string field directly for the collection naming strategy&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Users should also be able to write their own collection naming strategy class and include it to allow for full customizability.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1481711">KAFKA-159</key>
            <summary>Support dynamic collection naming strategies</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13201">Fixed</resolution>
                                        <assignee username="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="ross@mongodb.com">Ross Lawley</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 Sep 2020 08:22:18 +0000</created>
                <updated>Sat, 28 Oct 2023 10:46:05 +0000</updated>
                            <resolved>Mon, 8 Feb 2021 11:12:08 +0000</resolved>
                                                    <fixVersion>1.4.0</fixVersion>
                                    <component>Sink</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="3603956" author="xgen-internal-githook" created="Mon, 8 Feb 2021 11:10:35 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Ross Lawley&apos;, &apos;email&apos;: &apos;ross.lawley@gmail.com&apos;, &apos;username&apos;: &apos;rozza&apos;}
&lt;p&gt;Message: Added Dynamic Namespace Mapping for the Sink&lt;/p&gt;

&lt;p&gt;Added a new interface `NamespaceMapper` with a `getNamespace` method.&lt;br/&gt;
Implementations can use either the raw `SinkRecord` or the `SinkDocument` to&lt;br/&gt;
determine the correct `MongoNamespace` to sink the data to.&lt;/p&gt;

&lt;p&gt;The sink connector includes two implementations:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;`DefaultNamespaceMapper`&lt;br/&gt;
   Uses the configured database and the collection or topic name if no collection configured as the namespace.&lt;/li&gt;
	&lt;li&gt;`FieldPathNamespaceMapper`&lt;br/&gt;
   Uses a string from either the key or value document as the database or collection name.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/KAFKA-159&quot; title=&quot;Support dynamic collection naming strategies&quot; class=&quot;issue-link&quot; data-issue-key=&quot;KAFKA-159&quot;&gt;&lt;del&gt;KAFKA-159&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-kafka/commit/3d799f189da04f6f35217151a7a704ec9385ae10&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-kafka/commit/3d799f189da04f6f35217151a7a704ec9385ae10&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1599177">KAFKA-186</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10250"><![CDATA[Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14266" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Documentation Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;Dynamic Namespace Mapping for the Sink&lt;/p&gt;

&lt;p&gt;Added a new interface `com.mongodb.kafka.connect.sink.namespace.mapping.NamespaceMapper` with a `getNamespace` method.&lt;br/&gt;
Implementations can use either the raw `SinkRecord` or the `SinkDocument` to determine the correct `MongoNamespace` to sink the data to.&lt;/p&gt;

&lt;p&gt;The sink connector includes two implementations:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;`DefaultNamespaceMapper`&lt;br/&gt;
    Uses the configured database and the collection or topic name if no collection configured as the namespace.&lt;/li&gt;
	&lt;li&gt;`FieldPathNamespaceMapper`&lt;br/&gt;
    Uses a string from either the key or value document as the database or collection name.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The following configuration options can help configure namespace mapping:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;`namespace.mapper`&lt;br/&gt;
    The class that determines the namespace to write the sink data to. By default this will be based on the &apos;database&apos; configuration and either the topic name or the &apos;collection&apos; configuration. Users can provide their own implementations of the &apos;NamespaceMapper&apos; interface.&lt;br/&gt;
    Default: com.mongodb.kafka.connect.sink.namespace.mapping.DefaultNamespaceMapper.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;`namespace.mapper.error.if.invalid`&lt;br/&gt;
   Throw an error if the mapped field is missing or an invalid bson type. Defaults to false. Requires the &apos;namespace.mapper&apos; to be set to &apos;com.mongodb.kafka.connect.sink.topic.mapping.FieldPathNamespaceMapper&apos;.&lt;/li&gt;
	&lt;li&gt;`namespace.mapper.key.database.field`&lt;br/&gt;
    The key field to use as the destination database name. Requires the &apos;namespace.mapper&apos; to be set to &apos;com.mongodb.kafka.connect.sink.namespace.mapping.FieldPathNamespaceMapper&apos;.&lt;/li&gt;
	&lt;li&gt;`namespace.mapper.key.collection.field`&lt;br/&gt;
    The key field to use as the destination collection name. Requires the &apos;namespace.mapper&apos; to be set to &apos;com.mongodb.kafka.connect.sink.namespace.mapping.FieldPathNamespaceMapper&apos;.&lt;/li&gt;
	&lt;li&gt;`namespace.mapper.value.database.field`&lt;br/&gt;
    The value field to use as the destination database name. Requires the &apos;namespace.mapper&apos; to be set to &apos;com.mongodb.kafka.connect.sink.namespace.mapping.FieldPathNamespaceMapper&apos;.&lt;/li&gt;
	&lt;li&gt;`namespace.mapper.value.collection.field`&lt;br/&gt;
    The value field to use as the destination collection name. Requires the &apos;namespace.mapper&apos; to be set to &apos;com.mongodb.kafka.connect.sink.namespace.mapping.FieldPathNamespaceMapper&apos;.&lt;/li&gt;
&lt;/ul&gt;
</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>KAFKA-47</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr69yn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>