<?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: Load data to ODBC Library with EG in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Load-data-to-ODBC-Library-with-EG/m-p/954929#M42909</link>
    <description>&lt;P&gt;You seem to be flipping the meaning of IMPORT and EXPORT back and forth during your description so I really cannot tell what you are trying to do.&amp;nbsp; Perhaps if you used different verbs it would be clearer.&amp;nbsp; Is your goal to push data from a SAS dataset into a&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;Postgres table that already exists?&amp;nbsp; Just us PROC APPEND if you have a libref already defined that points to the&amp;nbsp;&amp;nbsp;Postgres database.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname target odbc .... connection details ...;
proc append base=target.tablename data=libref.memname ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Or perhaps use the INSERT statement of PROC SQL.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also do not understand the digression into discussion of CSV files.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jan 2025 18:32:26 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2025-01-02T18:32:26Z</dc:date>
    <item>
      <title>Load data to ODBC Library with EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Load-data-to-ODBC-Library-with-EG/m-p/954925#M42907</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure if the subject location is correct but i'd give it a try.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So our main goal is to situation where user makes some workflow with EG and in the end it loads data to dataset which is actually ODBC type Library and linked to postgre database (already included with our SAS package).&lt;/P&gt;
&lt;P&gt;At the moment we have a working solution where there's some data in Postgre DB table and we can read it from EG.&lt;/P&gt;
&lt;P&gt;For example, there's 3 column table created and filled with pgAdmin:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PriitL_0-1735838949915.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103424i0A30F5B6BAB32C0D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PriitL_0-1735838949915.png" alt="PriitL_0-1735838949915.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When I open it from EG, I can see data inside it:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PriitL_1-1735839003398.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103425iB302B3734525DC39/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PriitL_1-1735839003398.png" alt="PriitL_1-1735839003398.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now if I export it to csv file for example and add another line, save and try to Import the csv again with EG, the behavior is as expected:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PriitL_0-1735839176003.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103426i9B849DCE951BC6F4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PriitL_0-1735839176003.png" alt="PriitL_0-1735839176003.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As seen on the image there's a third record (10;pole;kirjet). But when opening the same table from pgAdmin, the record is still missing (exactly the same as on the first image). It means the data actually doesn't flow from EG to database.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What we are missing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to find similar solution and found&amp;nbsp;&lt;A title="Load SAS Dataset to MS SQL Server via SQL server job" href="https://communities.sas.com/t5/SAS-Data-Management/Load-SAS-Dataset-to-MS-SQL-Server-via-SQL-server-job/td-p/290472" target="_blank" rel="noopener"&gt;Load SAS Dataset to MS SQL Server via SQL server job&lt;/A&gt;&amp;nbsp;but it is not quite that. Basically the main goal would be the solution where we can import filtered and processed data and import it to database (probably automatically in the future). We also could use the solution where we take the whole&amp;nbsp;sas7bdat dataset and import it directly to database but let's say it would be a backup plan.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PL&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 17:44:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Load-data-to-ODBC-Library-with-EG/m-p/954925#M42907</guid>
      <dc:creator>PriitL</dc:creator>
      <dc:date>2025-01-02T17:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Load data to ODBC Library with EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Load-data-to-ODBC-Library-with-EG/m-p/954926#M42908</link>
      <description>&lt;P&gt;Unfortunately the screenshots hardly tell us anything. Please post the log as text.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 17:53:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Load-data-to-ODBC-Library-with-EG/m-p/954926#M42908</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2025-01-02T17:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Load data to ODBC Library with EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Load-data-to-ODBC-Library-with-EG/m-p/954929#M42909</link>
      <description>&lt;P&gt;You seem to be flipping the meaning of IMPORT and EXPORT back and forth during your description so I really cannot tell what you are trying to do.&amp;nbsp; Perhaps if you used different verbs it would be clearer.&amp;nbsp; Is your goal to push data from a SAS dataset into a&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;Postgres table that already exists?&amp;nbsp; Just us PROC APPEND if you have a libref already defined that points to the&amp;nbsp;&amp;nbsp;Postgres database.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname target odbc .... connection details ...;
proc append base=target.tablename data=libref.memname ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Or perhaps use the INSERT statement of PROC SQL.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also do not understand the digression into discussion of CSV files.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 18:32:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Load-data-to-ODBC-Library-with-EG/m-p/954929#M42909</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-01-02T18:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Load data to ODBC Library with EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Load-data-to-ODBC-Library-with-EG/m-p/954975#M42910</link>
      <description>&lt;P&gt;The following is for data in SQL server&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LIBNAME YourLib ODBC noprompt="DRIVER={WriteYourDriverName};
Trusted_Connection=yes; server=ServerName;
database=YourDataBase" schema="YourSchema";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Jan 2025 22:45:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Load-data-to-ODBC-Library-with-EG/m-p/954975#M42910</guid>
      <dc:creator>Barkat</dc:creator>
      <dc:date>2025-01-02T22:45:07Z</dc:date>
    </item>
  </channel>
</rss>

