<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:57:02 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>[DOCS-8817] mongoimport process sends everything to stderr</title>
                <link>https://jira.mongodb.org/browse/DOCS-8817</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;Hello - I am trying to run mongoimport inside some ruby code, and determine if the import succeeded or failed. Unfortunately, it seems that mongoimport always sends to stderr, instead of stdout for success and stderr for failures. &lt;/p&gt;

&lt;p&gt;This is my code - let me know if I&apos;m mis-using, or if this is a bug! &lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Jacinda&lt;/p&gt;


&lt;p&gt;def import_csv&lt;br/&gt;
      Database.mongo_mapper_db # create a connection to the db&lt;/p&gt;

&lt;p&gt;      command = &quot;mongoimport --db learnup --collection #&lt;/p&gt;
{@file_name}
&lt;p&gt; --type csv --headerline --file #&lt;/p&gt;
{@file_path}
&lt;p&gt;&quot;&lt;/p&gt;

&lt;p&gt;      Open3.popen3(command) do |stdin, stdout, stderr, wait_thr|&lt;br/&gt;
        standard_out = stdout.read&lt;br/&gt;
        standard_err = stderr.read&lt;/p&gt;

&lt;p&gt;        puts &quot;stdout is: &quot; + standard_out&lt;br/&gt;
        puts &quot;stderr is: &quot; + standard_err&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;here i&apos;m hoping to have a message w/ either stdout or stderr depending on if it succeeded/failed&lt;br/&gt;
      end&lt;/li&gt;
&lt;/ol&gt;

</description>
                <environment>osx yosemite 10.10.5&lt;br/&gt;
&lt;br/&gt;
*Location*: &lt;a href=&quot;https://docs.mongodb.com/manual/reference/program/mongoimport/&quot;&gt;https://docs.mongodb.com/manual/reference/program/mongoimport/&lt;/a&gt;&lt;br/&gt;
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36&lt;br/&gt;
*Referrer*: &lt;a href=&quot;https://www.google.com/&quot;&gt;https://www.google.com/&lt;/a&gt;&lt;br/&gt;
*Screen Resolution*: 1440 x 900&lt;br/&gt;
</environment>
        <key id="316182">DOCS-8817</key>
            <summary>mongoimport process sends everything to stderr</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="9">Done</resolution>
                                        <assignee username="steve.renaker@mongodb.com">Steve Renaker</assignee>
                                    <reporter username="xgen-internal-docs">Docs Collector User</reporter>
                        <labels>
                            <label>collector-298ba4e7</label>
                    </labels>
                <created>Wed, 14 Sep 2016 15:56:21 +0000</created>
                <updated>Fri, 3 Nov 2017 11:11:22 +0000</updated>
                            <resolved>Thu, 29 Sep 2016 21:30:54 +0000</resolved>
                                                    <fixVersion>01112017-cleanup</fixVersion>
                                    <component>drivers</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="1386704" author="steve.renaker" created="Fri, 16 Sep 2016 20:36:01 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jacindaz%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;jacindaz@gmail.com&quot;&gt;jacindaz@gmail.com&lt;/a&gt; Hi Jacinda,&lt;/p&gt;

&lt;p&gt;This forum is generally only for requests related to the documentation project. I would suggest you look for help at the MongoDB Google Group (&lt;a href=&quot;https://groups.google.com/forum/#!forum/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://groups.google.com/forum/#!forum/mongodb-user&lt;/a&gt;) and cite this ticket for further clarification or support.&lt;/p&gt;

&lt;p&gt;Best regards,&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Steve&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="1386609" author="jacindaz@gmail.com" created="Fri, 16 Sep 2016 19:17:22 +0000"  >&lt;p&gt;Thanks Steve - can you explain exactly which messages go to STDOUT, from which other tools, and why this decision was made? &lt;/p&gt;</comment>
                            <comment id="1386587" author="steve.renaker" created="Fri, 16 Sep 2016 18:55:22 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jacindaz%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;jacindaz@gmail.com&quot;&gt;jacindaz@gmail.com&lt;/a&gt; Hi Jacinda, &lt;/p&gt;

&lt;p&gt;All the MongoDB command line tools send status messages to STDERR, and use STDOUT for other kinds of output. If you&apos;d like to check the success or failure of a shell command, you can check the exit code ($? in Ruby &amp;#8211; there&apos;s a good description here: &lt;a href=&quot;https://gist.github.com/defunkt/326968&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gist.github.com/defunkt/326968&lt;/a&gt;). &lt;/p&gt;

&lt;p&gt;Thanks and best regards,&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Steve&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="1385481" author="steve.renaker" created="Thu, 15 Sep 2016 17:16:29 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jacindaz%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;jacindaz@gmail.com&quot;&gt;jacindaz@gmail.com&lt;/a&gt; Hi Jacinda, thanks for filing this ticket. We&apos;re looking into the issue, and I&apos;ll let you know as soon as there&apos;s something to report. Best regards,&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Steve&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="1384956" author="jacindaz@gmail.com" created="Thu, 15 Sep 2016 02:10:30 +0000"  >&lt;p&gt;Hello - I just created a jira account for mongo, I&apos;m the original reporter. Let me know if you have other questions/thoughts about this ticket!&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 14 Sep 2016 22:54:12 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        7 years, 21 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>jess.mokrzecki@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 21 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-docs</customfieldvalue>
            <customfieldvalue>jacindaz@gmail.com</customfieldvalue>
            <customfieldvalue>steve.renaker@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmi7r:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hspqk7:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrza0v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                </customfields>
    </item>
</channel>
</rss>