<?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: Sleep, wait for file task into SAP DataSphere ? in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/sleep-wait-for-file-task-into-sap-datasphere/qaa-p/12672300#M4754396</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;No, there is nothing similar.&lt;/P&gt;&lt;P&gt;I don't think you can implement that logic with what is actually available in DSP, because although in a Data Flow you have python and there you could "wait", the transformation ONLY read the input data once, and not multiple times which would be necessary to be able to do the check while waiting.&lt;/P&gt;&lt;P&gt;Probably until a Data Flow can be launched externally, or they add that function to the SFTP connector, the only option I think is to schedule the DF to run regularly.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2023 07:48:17 GMT</pubDate>
    <dc:creator>XaviPolo</dc:creator>
    <dc:date>2023-05-18T07:48:17Z</dc:date>
    <item>
      <title>Sleep, wait for file task into SAP DataSphere ?</title>
      <link>https://community.sap.com/t5/technology-q-a/sleep-wait-for-file-task-into-sap-datasphere/qaq-p/12672299</link>
      <description>&lt;P&gt;Hello experts,&lt;/P&gt;
  &lt;P&gt;is it possible to add a sleep task into DWC?&lt;/P&gt;
  &lt;P&gt;I need to "wait for a file" before start to read it.&lt;/P&gt;
  &lt;P&gt;Is it there something similar to BODS "Wait_For_File()" function in SAP Datasphere ?&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Alberto&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 14:06:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sleep-wait-for-file-task-into-sap-datasphere/qaq-p/12672299</guid>
      <dc:creator>albertosimeoni</dc:creator>
      <dc:date>2023-05-17T14:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: Sleep, wait for file task into SAP DataSphere ?</title>
      <link>https://community.sap.com/t5/technology-q-a/sleep-wait-for-file-task-into-sap-datasphere/qaa-p/12672300#M4754396</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;No, there is nothing similar.&lt;/P&gt;&lt;P&gt;I don't think you can implement that logic with what is actually available in DSP, because although in a Data Flow you have python and there you could "wait", the transformation ONLY read the input data once, and not multiple times which would be necessary to be able to do the check while waiting.&lt;/P&gt;&lt;P&gt;Probably until a Data Flow can be launched externally, or they add that function to the SFTP connector, the only option I think is to schedule the DF to run regularly.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 07:48:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sleep-wait-for-file-task-into-sap-datasphere/qaa-p/12672300#M4754396</guid>
      <dc:creator>XaviPolo</dc:creator>
      <dc:date>2023-05-18T07:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sleep, wait for file task into SAP DataSphere ?</title>
      <link>https://community.sap.com/t5/technology-q-a/sleep-wait-for-file-task-into-sap-datasphere/qaa-p/12672301#M4754397</link>
      <description>&lt;P&gt;Hello Xavier,&lt;/P&gt;&lt;P&gt;Probably a task chain with a dummy step:&lt;/P&gt;&lt;P&gt;step 1) dataflow with wait for file. &lt;/P&gt;&lt;P&gt;step 2) dataflow with read from csv/xlsx/txt. &lt;/P&gt;&lt;P&gt;Step 1) DUMMY (table) -&amp;gt; WAIT (Script) -&amp;gt; DUMMY (target).&lt;/P&gt;&lt;P&gt;Other problems are:&lt;/P&gt;&lt;P&gt;- can you set a "wait"? ( is it available as function in the script block ?)&lt;/P&gt;&lt;P&gt;- can you read the file from a connection? (or better can you check if the file is available).&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 08:22:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sleep-wait-for-file-task-into-sap-datasphere/qaa-p/12672301#M4754397</guid>
      <dc:creator>albertosimeoni</dc:creator>
      <dc:date>2023-05-18T08:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sleep, wait for file task into SAP DataSphere ?</title>
      <link>https://community.sap.com/t5/technology-q-a/sleep-wait-for-file-task-into-sap-datasphere/qaa-p/12672302#M4754398</link>
      <description>&lt;P&gt;the problem is that you can "wait" in python (script) but nothing will change in the input.&lt;/P&gt;&lt;P&gt;In the DF:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Source (File from SFTP Connection or hyperscaler) &lt;/LI&gt;&lt;LI&gt;Pass the content of the file (0 or more rows) to the Python transform &lt;/LI&gt;&lt;LI&gt;Inside Python you can use sleep() or something like this to "wait", but data from source is already sent to python, and the file will no longer be read in that execution. So is not a "wait 1 second and check the file" loop, is just "wait 1 second to do nothing"&lt;/LI&gt;&lt;LI&gt;Data from python is sent to output.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;You get the data present in the file at the time of execution.&lt;/P&gt;&lt;P&gt;It may even happen (depending on the software used and the configuration of the system) that if the file is very large, you read it when it has not yet been completely uploaded to SFTP.&lt;/P&gt;&lt;P&gt;An option is to use an external job scheduller solution, which sends the file to the SFTP with a temporary name FILE1.XLS.TEMP, checks that the file size is the same (so you know if it has been fully loaded into the SFTP) and then renames it to the original name FILE1.XLS.&lt;/P&gt;&lt;P&gt;Then the tool calls DSP and executes the DF. &lt;STRONG&gt;But this last step is not yet available &lt;/STRONG&gt;(in the DSP roadmap it is planned for Q2-2023).&lt;/P&gt;&lt;P&gt;In other words, doing a process as was done in Data Services, where you leave a JOB running and wait for a file to be present to load it, cannot be done.&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 09:58:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sleep-wait-for-file-task-into-sap-datasphere/qaa-p/12672302#M4754398</guid>
      <dc:creator>XaviPolo</dc:creator>
      <dc:date>2023-05-18T09:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Sleep, wait for file task into SAP DataSphere ?</title>
      <link>https://community.sap.com/t5/technology-q-a/sleep-wait-for-file-task-into-sap-datasphere/qaa-p/12672303#M4754399</link>
      <description>&lt;P&gt;Sorry we misunderstood each other,&lt;/P&gt;&lt;P&gt;I mean a 2 step procedure,&lt;/P&gt;&lt;P&gt;1) a dataflow that read from a "Dummy" table (1 row 1 column DUMMY), then in python it uses some function to verify the file exists in a connection with a wait in a loop. The purpose of this dataflow is only acting as semaphore for another dataflow that will read the file.&lt;/P&gt;&lt;P&gt;2) a &lt;U&gt;Second&lt;/U&gt; dataflow that uses the file as source and do what it needs to do.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Your reply was helpful as I didn't know there will be the possibility to trigger task chains from external tools in the near future.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Alberto&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 10:46:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sleep-wait-for-file-task-into-sap-datasphere/qaa-p/12672303#M4754399</guid>
      <dc:creator>albertosimeoni</dc:creator>
      <dc:date>2023-05-19T10:46:18Z</dc:date>
    </item>
  </channel>
</rss>

