<?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 files transer(.csv) to Unix sever from CDSW in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/files-transer-csv-to-Unix-sever-from-CDSW/m-p/371644#M241038</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to transfer .csv or txt file from CDSW environment to Unix server using sftp?&lt;/P&gt;&lt;P&gt;Or do we have any inbuild service to transfer files from CDSW to Unix?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;- Sharing public key to UNIX server&lt;/P&gt;&lt;P&gt;- run sftp scripts to trassfer using python or unix script&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to enable sftp protocol?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 May 2023 10:58:27 GMT</pubDate>
    <dc:creator>krishna2023</dc:creator>
    <dc:date>2023-05-29T10:58:27Z</dc:date>
    <item>
      <title>files transer(.csv) to Unix sever from CDSW</title>
      <link>https://community.cloudera.com/t5/Support-Questions/files-transer-csv-to-Unix-sever-from-CDSW/m-p/371644#M241038</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to transfer .csv or txt file from CDSW environment to Unix server using sftp?&lt;/P&gt;&lt;P&gt;Or do we have any inbuild service to transfer files from CDSW to Unix?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;- Sharing public key to UNIX server&lt;/P&gt;&lt;P&gt;- run sftp scripts to trassfer using python or unix script&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to enable sftp protocol?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 May 2023 10:58:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/files-transer-csv-to-Unix-sever-from-CDSW/m-p/371644#M241038</guid>
      <dc:creator>krishna2023</dc:creator>
      <dc:date>2023-05-29T10:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: files transer(.csv) to Unix sever from CDSW</title>
      <link>https://community.cloudera.com/t5/Support-Questions/files-transer-csv-to-Unix-sever-from-CDSW/m-p/371645#M241039</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/105298"&gt;@krishna2023&lt;/a&gt;&amp;nbsp;Welcome to the Cloudera Community!&lt;BR /&gt;&lt;BR /&gt;To help you get the best possible solution, I have tagged our CDSW experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/28743"&gt;@Gopinath&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/25179"&gt;@Mike&lt;/a&gt;&amp;nbsp; who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated on your post, and we hope you find a satisfactory solution to your query.&lt;/P&gt;</description>
      <pubDate>Mon, 29 May 2023 12:09:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/files-transer-csv-to-Unix-sever-from-CDSW/m-p/371645#M241039</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2023-05-29T12:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: files transer(.csv) to Unix sever from CDSW</title>
      <link>https://community.cloudera.com/t5/Support-Questions/files-transer-csv-to-Unix-sever-from-CDSW/m-p/371732#M241071</link>
      <description>&lt;P&gt;Hi, do you have access to the actual CDSW host environment on the CDSW master host? If so, you will be ablet o use sftp - the project files will be located in&lt;FONT face="courier new,courier"&gt; /var/lib/cdsw/current/projects/projects/[number]/[number] &lt;/FONT&gt;where the first [number] is usually 0 and the next number will be the id of your project. You can find what this ID is by running something like:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;kubectl exec -it $(kubectl get pods -l role=db -o jsonpath='{.items[*].metadata.name}') -- psql -P pager=off --expanded -U sense -c "select id from projects where name='my_test_project'"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another way you could transfer files from the CDSW project would be to simply open the project, start a session, open the _Terminal, and run:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;python -m http.server 8080 --bind 127.0.0.1&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;This will start the SimpleHTTPServer.&amp;nbsp; Let this run, and go back to the project. Where the little 9 dot menu is, there will be a new option to view the directory listing:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mike_0-1685453865692.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37684i76AE3D670B7C5967/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Mike_0-1685453865692.png" alt="Mike_0-1685453865692.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You can just click this, or manually go to the generated URL (&lt;A href="https://public-9hcxj43aavpxk7gt.cdsw.ip-10-17-78-41.support.fuse.cloudera.com/" target="_blank"&gt;https://public-9hcxj43aavpxk7gt.cdsw.company.com/&lt;/A&gt; in your browser (where the public- is required, and the next chunk is the user session) or use wget or something to download files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are probably a lot of other ways to pull files directly from CDSW, but these two methods should get you started on whatever you are trying to do.&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 13:39:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/files-transer-csv-to-Unix-sever-from-CDSW/m-p/371732#M241071</guid>
      <dc:creator>Mike</dc:creator>
      <dc:date>2023-05-30T13:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: files transer(.csv) to Unix sever from CDSW</title>
      <link>https://community.cloudera.com/t5/Support-Questions/files-transer-csv-to-Unix-sever-from-CDSW/m-p/371887#M241109</link>
      <description>&lt;P&gt;Thank you for reply,I will keep update with you.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 05:19:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/files-transer-csv-to-Unix-sever-from-CDSW/m-p/371887#M241109</guid>
      <dc:creator>krishna2023</dc:creator>
      <dc:date>2023-06-01T05:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: files transer(.csv) to Unix sever from CDSW</title>
      <link>https://community.cloudera.com/t5/Support-Questions/files-transer-csv-to-Unix-sever-from-CDSW/m-p/372128#M241160</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/105298"&gt;@krishna2023&lt;/a&gt;&amp;nbsp;Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2023 13:28:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/files-transer-csv-to-Unix-sever-from-CDSW/m-p/372128#M241160</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2023-06-05T13:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: files transer(.csv) to Unix sever from CDSW</title>
      <link>https://community.cloudera.com/t5/Support-Questions/files-transer-csv-to-Unix-sever-from-CDSW/m-p/372666#M241337</link>
      <description>&lt;P&gt;This is not fitting to us.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 08:11:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/files-transer-csv-to-Unix-sever-from-CDSW/m-p/372666#M241337</guid>
      <dc:creator>krishna2023</dc:creator>
      <dc:date>2023-06-15T08:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: files transer(.csv) to Unix sever from CDSW</title>
      <link>https://community.cloudera.com/t5/Support-Questions/files-transer-csv-to-Unix-sever-from-CDSW/m-p/372667#M241338</link>
      <description>&lt;P&gt;It's not fixed.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 08:11:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/files-transer-csv-to-Unix-sever-from-CDSW/m-p/372667#M241338</guid>
      <dc:creator>krishna2023</dc:creator>
      <dc:date>2023-06-15T08:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: files transer(.csv) to Unix sever from CDSW</title>
      <link>https://community.cloudera.com/t5/Support-Questions/files-transer-csv-to-Unix-sever-from-CDSW/m-p/377995#M243387</link>
      <description>&lt;P&gt;Hi Krishna&lt;/P&gt;&lt;P&gt;We have done this by pushing commands out to the shell after setting up a trusted SSH connection between CDSW and the Unix server.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the python function we use:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;user_name = "username"
unix_server = "my.unix.host"
unix_path = "/some/path"
file_to_transfer = "my_csv_file.csv"

def scp_file_to_sas(local_path, file_name, user_name, unix_server, unix_path):

    p = subprocess.Popen(
        [
            "scp",
            "-v",
            local_path + file_name,
            user_name + "@" + unix_server + ":/" + unix_path + "/" + file_name,
        ]
    )
    sts = os.waitpid(p.pid, 0)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 20 Oct 2023 18:53:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/files-transer-csv-to-Unix-sever-from-CDSW/m-p/377995#M243387</guid>
      <dc:creator>BubbaBoBobBrain</dc:creator>
      <dc:date>2023-10-20T18:53:30Z</dc:date>
    </item>
  </channel>
</rss>

