<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:46:47 JST 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>PFS-JIRA</title>
    <link>https://pfspipe.ipmu.jp/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.3.4</version>
        <build-number>803005</build-number>
        <build-date>13-09-2019</build-date>
    </build-info>


<item>
            <title>[SCIDB-124] SciServer/Compute sql.pandas_read_sql not working</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/SCIDB-124</link>
                <project id="10601" key="SCIDB">Science Database</project>
                    <description>&lt;p&gt;&#160;I got a kind of timeout error when simply trying this:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
# &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; the hscdata module to talk to the database
from hscdata &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; sql# SQL script
# &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; details of each database column, please refer to the schema browser linked from the previous cell
script = &apos;&apos;&apos;
SELECT
    object_id
    ,spec.ra
    ,spec.dec
    ,spec.z0
    ,spec.reliability0
    ,phot.g_cmodel_mag
    ,phot.r_cmodel_mag
    ,phot.i_cmodel_mag
    ,phot.patch_s
    ,phot.tract
FROM
    scidb_25.gal_specline AS spec JOIN
    pdr2_dud.forced AS phot USING (object_id)
WHERE
    phot.isprimary AND
    pdr2_dud.search_cosmos(object_id) AND
    phot.i_cmodel_mag &amp;lt; 22
    --- feel free to include more constraints here
&apos;&apos;&apos;# query the database.  you will get the result in pandas dataframe
data = sql.pandas_read_sql(script)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;--&amp;gt;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/python-extra/lib/python3.9/site-packages/hscdata/config.py:35: UserWarning: Waiting &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; the db connection information... warnings.warn(&lt;span class=&quot;code-quote&quot;&gt;&apos;Waiting &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; the db connection information...&apos;&lt;/span&gt;) --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) &amp;lt;ipython-input-2-36c45ed638a2&amp;gt; in &amp;lt;module&amp;gt; 27 28 # query the database. you will get the result in pandas dataframe ---&amp;gt; 29 data = sql.pandas_read_sql(script)/python-extra/lib/python3.9/site-packages/hscdata/sql.py in pandas_read_sql(sql, index_col, coerce_float, params, parse_dates, columns, chunksize) 29 raise ValueError(&lt;span class=&quot;code-quote&quot;&gt;&apos;Use pandas_read_sql_chunked instead.&apos;&lt;/span&gt;) 30 ---&amp;gt; 31 with connect2db() as conn: 32 &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; pandas.read_sql( 33 sql=sql, con=conn, index_col=index_col,/usr/local/lib/python3.9/contextlib.py in __enter__(self) 115 del self.args, self.kwds, self.func 116 &lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;: --&amp;gt; 117 &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; next(self.gen) 118 except StopIteration: 119 raise RuntimeError(&lt;span class=&quot;code-quote&quot;&gt;&quot;generator didn&lt;span class=&quot;code-quote&quot;&gt;&apos;t yield&quot;&lt;/span&gt;) from None/python-extra/lib/python3.9/site-packages/hscdata/sql.py in connect2db() 55 @contextlib.contextmanager 56 def connect2db(): ---&amp;gt; 57 conn = psycopg2.connect(config.sql_dsn) 58 &lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;: 59 yield conn/python-extra/lib/python3.9/site-packages/hscdata/config.py in __getattr__(self, key) 23 24 def __getattr__(self, key): ---&amp;gt; 25 self._wait_until_config_ready() 26 &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; getattr(self._config, key) 27 /python-extra/lib/python3.9/site-packages/hscdata/config.py in _wait_until_config_ready(self) 39 time.sleep(1) 40 &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;: ---&amp;gt; 41 raise RuntimeError(&apos;&lt;/span&gt;Failed to get db connection information&apos;) 42 43 RuntimeError: Failed to get db connection information
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="15604">SCIDB-124</key>
            <summary>SciServer/Compute sql.pandas_read_sql not working</summary>
                <type id="3" iconUrl="https://pfspipe.ipmu.jp/jira/secure/viewavatar?size=xsmall&amp;avatarId=10518&amp;avatarType=issuetype">Task</type>
                                            <priority id="10000" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/priorities/medium.svg">Normal</priority>
                        <status id="10002" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/statuses/generic.png" description="The issue is resolved, reviewed, and merged">Done</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="michitaro">michitaro</assignee>
                                    <reporter username="kiyoto.yabe">Kiyoto Yabe</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 May 2021 02:12:29 +0000</created>
                <updated>Thu, 13 May 2021 03:09:36 +0000</updated>
                            <resolved>Thu, 13 May 2021 03:09:36 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                <comments>
                            <comment id="19316" author="michitaro" created="Thu, 13 May 2021 03:06:10 +0000"  >&lt;p&gt;To connect the DB, users need keystone token.&lt;br/&gt;
The location of a file that holds the keystone token changed in Compute, but the Jupyter image didn&apos;t follow the file location.&lt;/p&gt;</comment>
                            <comment id="19319" author="michitaro" created="Thu, 13 May 2021 03:09:36 +0000"  >&lt;p&gt;The new Jupyter image follows the new location of the keystone token file.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10500" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|zzs594:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10100" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                        <customfieldname>Reviewers</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>kiyoto.yabe</customfieldvalue>

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