<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SnakePlane suggestion: Add get_constant to 'logger' or generic 'alteryx_engine' namesp in Dev Space</title>
    <link>https://community.alteryx.com/t5/Dev-Space/SnakePlane-suggestion-Add-get-constant-to-logger-or-generic/m-p/438451#M966</link>
    <description>&lt;P&gt;Done! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jul 2019 17:12:13 GMT</pubDate>
    <dc:creator>cam_w</dc:creator>
    <dc:date>2019-07-12T17:12:13Z</dc:date>
    <item>
      <title>SnakePlane suggestion: Add get_constant to 'logger' or generic 'alteryx_engine' namespace</title>
      <link>https://community.alteryx.com/t5/Dev-Space/SnakePlane-suggestion-Add-get-constant-to-logger-or-generic/m-p/436979#M962</link>
      <description>&lt;P&gt;While working on a recent tool using SnakePlane, I needed a temp directory for files. While I ended up using the Python tempfile package instead, I tried finding the TempFilePath workflow constant at one point.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It appears that the alteryx_engine inside AyxPlugin is hidden from the 'pilot', and as such, the output_message method is only exposed to the 'pilot' through the logger. So to get access to get_constant method, I added it temporarily to the self.logging SimpleNamespace following the pattern, and was able to use the following in Pdb:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;(Pdb) logger.get_constant(0)
('Engine.GuiInteraction', '', '0', False)
(Pdb) logger.get_constant(1)
('Engine.IterationNumber', '', '0', True)
(Pdb) logger.get_constant(2)
('Engine.ModuleDirectory', '', 'C:\\Users\\&amp;lt;user&amp;gt;\\Documents\\~Alteryx\\snakeplane-master\\pilot\\debug_workflows\\', False)
(Pdb) logger.get_constant(3)
('Engine.TempFilePath', '', 'C:\\Users\\&amp;lt;user&amp;gt;\\AppData\\Local\\Temp\\Engine_7016_d592e2b9ab1c4a87b2c08afb64a01e81_\\', False)
(Pdb) logger.get_constant(4)
('Engine.Version', '', '2019.2.5.62427', False)
(Pdb) logger.get_constant(5)
('Engine.WorkflowDirectory', '', 'C:\\Users\\&amp;lt;user&amp;gt;\\Documents\\~Alteryx\\snakeplane-master\\pilot\\debug_workflows\\', False)
(Pdb) logger.get_constant(6)
('Engine.WorkflowFileName', '', './debug_workflows/SFTPInput.yxmd', False)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does alteryx_engine need to be hidden in this fashion? If so, can we add some more features of the engine to either the logger, or a new SimpleNamespace? When I check dir(sdk.AlteryxEngine) I see the following methods that could be valuable to 'pilot':&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;[..., 'create_connect_metadata', 'create_temp_file_name', 'debug_message_out', 'decrypt_password', 'field_conversion_error_limit', 'get_constant', 'get_init_var', 'output_message', 'output_tool_progress', 'pre_sort', 'xmsg']&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Several of these look indispensable!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The change to helper_classes for get_constant was simple enough:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;            ...
            get_constant=partial(
                self._engine_vars.alteryx_engine.get_constant,
                self._engine_vars.n_tool_id,
            ),
            ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I can figure out how to submit a pull request on github ... I'll try it out.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 22:07:27 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Dev-Space/SnakePlane-suggestion-Add-get-constant-to-logger-or-generic/m-p/436979#M962</guid>
      <dc:creator>cam_w</dc:creator>
      <dc:date>2019-07-09T22:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: SnakePlane suggestion: Add get_constant to 'logger' or generic 'alteryx_engine' namesp</title>
      <link>https://community.alteryx.com/t5/Dev-Space/SnakePlane-suggestion-Add-get-constant-to-logger-or-generic/m-p/438389#M965</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/33339"&gt;@cam_w&lt;/a&gt;&amp;nbsp;- can you post this as an issue in the snakeplane GitHub &lt;A href="https://github.com/alteryx/snakeplane/issues" target="_self"&gt;repo&lt;/A&gt;? It will get more traction with the team who manages it. Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 15:52:33 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Dev-Space/SnakePlane-suggestion-Add-get-constant-to-logger-or-generic/m-p/438389#M965</guid>
      <dc:creator>BlytheE</dc:creator>
      <dc:date>2019-07-12T15:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: SnakePlane suggestion: Add get_constant to 'logger' or generic 'alteryx_engine' namesp</title>
      <link>https://community.alteryx.com/t5/Dev-Space/SnakePlane-suggestion-Add-get-constant-to-logger-or-generic/m-p/438451#M966</link>
      <description>&lt;P&gt;Done! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 17:12:13 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Dev-Space/SnakePlane-suggestion-Add-get-constant-to-logger-or-generic/m-p/438451#M966</guid>
      <dc:creator>cam_w</dc:creator>
      <dc:date>2019-07-12T17:12:13Z</dc:date>
    </item>
  </channel>
</rss>

