<?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>Question Re: Pandas function to read table data in Datasphere Dataflow script editor in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/pandas-function-to-read-table-data-in-datasphere-dataflow-script-editor/qaa-p/12747388#M4784604</link>
    <description>&lt;P&gt;Thanks  &lt;SPAN class="mention-scrubbed"&gt;xavierpolo&lt;/SPAN&gt; for the reply. But in my case, I need to have a DataFrame of Lookup table which is not linked in this flow. I need this to derive some fields. PFB screenshot &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2213287-dataframe-ss.jpg" /&gt;&lt;/P&gt;&lt;P&gt;Could you please let me know how to achieve this.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Sep 2023 14:04:52 GMT</pubDate>
    <dc:creator>t_ravichandra</dc:creator>
    <dc:date>2023-09-28T14:04:52Z</dc:date>
    <item>
      <title>Pandas function to read table data in Datasphere Dataflow script editor</title>
      <link>https://community.sap.com/t5/technology-q-a/pandas-function-to-read-table-data-in-datasphere-dataflow-script-editor/qaq-p/12747386</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
  &lt;P&gt;Can someone please help me in getting the Pandas DataFrame function to read table data in Dataflow python transformation editor.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 10:01:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/pandas-function-to-read-table-data-in-datasphere-dataflow-script-editor/qaq-p/12747386</guid>
      <dc:creator>t_ravichandra</dc:creator>
      <dc:date>2023-09-28T10:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Pandas function to read table data in Datasphere Dataflow script editor</title>
      <link>https://community.sap.com/t5/technology-q-a/pandas-function-to-read-table-data-in-datasphere-dataflow-script-editor/qaa-p/12747387#M4784603</link>
      <description>&lt;P&gt;in a DF add the source (table or view,) then connect it to the python transform.&lt;/P&gt;&lt;P&gt;When you execute the DF it will pass the connected source to the function as a Pandas Dataframe.&lt;/P&gt;&lt;P&gt;the Python transform implements this function as &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;def transform(data):&lt;BR /&gt;    # data param is a pandas dataframe that has the data of the connected source&lt;BR /&gt;    data['NEW'] = data['ID'] + data['NAME']&lt;BR /&gt;    return data
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So if you connect a table with 2 fields (ID and NAME), you will have into the ptyhon function a dataframe data with this two columns. You can modify the dataframe adding or removing columns like data['NEW'] = data['ID'] + data['NAME']&lt;/P&gt;&lt;P&gt;Then update the output of python transform in the "Columns section", adding or removing columns.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 12:59:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/pandas-function-to-read-table-data-in-datasphere-dataflow-script-editor/qaa-p/12747387#M4784603</guid>
      <dc:creator>XaviPolo</dc:creator>
      <dc:date>2023-09-28T12:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Pandas function to read table data in Datasphere Dataflow script editor</title>
      <link>https://community.sap.com/t5/technology-q-a/pandas-function-to-read-table-data-in-datasphere-dataflow-script-editor/qaa-p/12747388#M4784604</link>
      <description>&lt;P&gt;Thanks  &lt;SPAN class="mention-scrubbed"&gt;xavierpolo&lt;/SPAN&gt; for the reply. But in my case, I need to have a DataFrame of Lookup table which is not linked in this flow. I need this to derive some fields. PFB screenshot &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2213287-dataframe-ss.jpg" /&gt;&lt;/P&gt;&lt;P&gt;Could you please let me know how to achieve this.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 14:04:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/pandas-function-to-read-table-data-in-datasphere-dataflow-script-editor/qaa-p/12747388#M4784604</guid>
      <dc:creator>t_ravichandra</dc:creator>
      <dc:date>2023-09-28T14:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Pandas function to read table data in Datasphere Dataflow script editor</title>
      <link>https://community.sap.com/t5/technology-q-a/pandas-function-to-read-table-data-in-datasphere-dataflow-script-editor/qaa-p/12747389#M4784605</link>
      <description>&lt;P&gt;sorry but the python transformation can only access data passed to it by connecting a source.&lt;/P&gt;&lt;P&gt;It is not allowed to access from the code to external data, nor the use of communication functions to for example read with pandas a CSV via a URL, etc.&lt;/P&gt;&lt;P&gt;This limitation also only allows a single input source to be sent as a dataframe (you can combine multiple sources in a view with join or union, but always prior to python transformation). In addition, the function will be called for each 10,000 rows of the source, i.e. it does not pass the entire set, it does it by blocks. &lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 16:50:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/pandas-function-to-read-table-data-in-datasphere-dataflow-script-editor/qaa-p/12747389#M4784605</guid>
      <dc:creator>XaviPolo</dc:creator>
      <dc:date>2023-09-28T16:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Pandas function to read table data in Datasphere Dataflow script editor</title>
      <link>https://community.sap.com/t5/technology-q-a/pandas-function-to-read-table-data-in-datasphere-dataflow-script-editor/qaa-p/12747390#M4784606</link>
      <description>&lt;P&gt;Hmm....  lot of restrictions &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then what is the purpose of this python transformation, the existing logic can be derived using SQL View as well. Do we have any specific usecase, where we can go for Python transformation ? &lt;/P&gt;&lt;P&gt;And SAP has any plan to implement the &lt;STRONG&gt;DataFrame&lt;/STRONG&gt; &lt;STRONG&gt;READ_TABLE&lt;/STRONG&gt; function ? &lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 17:47:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/pandas-function-to-read-table-data-in-datasphere-dataflow-script-editor/qaa-p/12747390#M4784606</guid>
      <dc:creator>t_ravichandra</dc:creator>
      <dc:date>2023-09-28T17:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Pandas function to read table data in Datasphere Dataflow script editor</title>
      <link>https://community.sap.com/t5/technology-q-a/pandas-function-to-read-table-data-in-datasphere-dataflow-script-editor/qaa-p/12747391#M4784607</link>
      <description>&lt;P&gt;well, you can do "advanced" transformations in SQL Scripting or in Pyhton, It is up to each person which one to choose depending on his or her knowledge,&lt;/P&gt;&lt;P&gt;In the product roadpam there is nothing about it, and I don't think it is an apriority for SAP to extend python capabilities. Besides that to run python you need resources and this has a direct impact on costs, &lt;/P&gt;&lt;P&gt;In SAC you can use R in two ways, a "limited" version if you use the one provided by SAP, or you can provide an RServe with all the possibilities since you host and manage it yourself.&lt;/P&gt;&lt;P&gt;I don't think there is anything similar to RServe in Python so ... &lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 07:01:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/pandas-function-to-read-table-data-in-datasphere-dataflow-script-editor/qaa-p/12747391#M4784607</guid>
      <dc:creator>XaviPolo</dc:creator>
      <dc:date>2023-09-29T07:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Pandas function to read table data in Datasphere Dataflow script editor</title>
      <link>https://community.sap.com/t5/technology-q-a/pandas-function-to-read-table-data-in-datasphere-dataflow-script-editor/qaa-p/12747392#M4784608</link>
      <description>&lt;P&gt;Got it, thanks so much  &lt;SPAN class="mention-scrubbed"&gt;xavierpolo&lt;/SPAN&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 09:57:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/pandas-function-to-read-table-data-in-datasphere-dataflow-script-editor/qaa-p/12747392#M4784608</guid>
      <dc:creator>t_ravichandra</dc:creator>
      <dc:date>2023-09-29T09:57:56Z</dc:date>
    </item>
  </channel>
</rss>

