<?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: Experience with SAS and Cosmos DB in Microsoft Integration with SAS</title>
    <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/479416#M2575</link>
    <description>&lt;P&gt;A Little bit more research shows that calling the following with SQL pass-through creates a table with the specified fields, and automatically adds an _id field. It also inserts a dummy record into the collection. You can now use proc append to add data to the table. Remember to omit the dummy record when selecting data from the collection. A bit spooky but that's how a schemaless Cosmos works I guess...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://cdn.cdata.com/help/EHD/odbc/pg_createtable.htm" target="_blank"&gt;http://cdn.cdata.com/help/EHD/odbc/pg_createtable.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In Cosmos it's called a collection, not a table &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jul 2018 08:26:53 GMT</pubDate>
    <dc:creator>bl_jyskebank_dk</dc:creator>
    <dc:date>2018-07-19T08:26:53Z</dc:date>
    <item>
      <title>Experience with SAS and Cosmos DB</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/479398#M2574</link>
      <description>&lt;P&gt;We are experimenting with SAS libnames pointing towards Cosmos DB in Azure cloud. The connection works through ODBC (driver from CDATA). We can read data from tables in Cosmos DB, but when it comes to creating new tables in Cosmos DB it's a bit harder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A simple bulkload is not accepted by the SAS ODBC driver. Not even a simple datastep, proc copy or proc append can create a new table in Cosmos. We tried pass-through SQL. It creates a table in Cosmos, but we are unable to insert rows into it because the database doesn't have a scheme, so the following insert statements are not accepted because number of columns does not match that in Cosmos DB.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone have experience in simple loading of data from SAS to Cosmos DB in Azure?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 07:23:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/479398#M2574</guid>
      <dc:creator>bl_jyskebank_dk</dc:creator>
      <dc:date>2018-07-19T07:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with SAS and Cosmos DB</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/479416#M2575</link>
      <description>&lt;P&gt;A Little bit more research shows that calling the following with SQL pass-through creates a table with the specified fields, and automatically adds an _id field. It also inserts a dummy record into the collection. You can now use proc append to add data to the table. Remember to omit the dummy record when selecting data from the collection. A bit spooky but that's how a schemaless Cosmos works I guess...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://cdn.cdata.com/help/EHD/odbc/pg_createtable.htm" target="_blank"&gt;http://cdn.cdata.com/help/EHD/odbc/pg_createtable.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In Cosmos it's called a collection, not a table &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 08:26:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/479416#M2575</guid>
      <dc:creator>bl_jyskebank_dk</dc:creator>
      <dc:date>2018-07-19T08:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with SAS and Cosmos DB</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/479475#M2576</link>
      <description>&lt;P&gt;A bit more details about loading data from SAS on your server into Cosmos DB in Azure cloud through the CDATA ODBC driver...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Create an empty collection in Cosmos DB via the Azure portal (don't try to use SAS to do it!).&lt;/P&gt;
&lt;P&gt;2. Use SAS to insert a dummy record with the columns/fields containing dummy values, and do it using pass-through SQL to ODBC.&lt;/P&gt;
&lt;P&gt;3. Insert the rest of your data using proc append with force option.&lt;/P&gt;
&lt;P&gt;4. Remove your dummy record using pass-through SQL to ODBC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Create an empty collection in Cosmos DB via the Azure portal (don't try to use SAS to do it!).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;connect&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;to&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; odbc(dsn=AZURE_MLU);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;execute&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; (&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;insert into [Empty_Collection] (_id, name, age, address) values (&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'&amp;lt;DUMMYKEY&amp;gt;'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'dummy'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, 0&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'dummy'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ODBC;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;3.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;LIBNAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; bldocs &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;ODBC&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DATASRC&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=AZURE_MLU;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;proc append base=bldocs.Empty_Collection data=yourdata force; run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;4.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;connect&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;to&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; odbc(dsn=AZURE_MLU);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;execute&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; (&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;delete from&amp;nbsp;Empty_Collection where _id = '&lt;FONT color="#800080" face="Courier New" size="2"&gt;&amp;lt;DUMMYKEY&amp;gt;&lt;/FONT&gt;'&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ODBC; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;disconnect&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; odbc;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;It's not fast going through the internet, so consider to only load changes in data rather than full loads. 1.000 records with 11 columns in one minute from our server.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 13:08:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/479475#M2576</guid>
      <dc:creator>bl_jyskebank_dk</dc:creator>
      <dc:date>2018-07-19T13:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with SAS and Cosmos DB</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/480650#M2577</link>
      <description>Thanks for posting this ... I am about to set up SAS connections to Cosmos DB.&lt;BR /&gt;&lt;BR /&gt;I have had issues with bulk uploads to Azure SQL database using ODBC - worked with OLE DB.</description>
      <pubDate>Mon, 23 Jul 2018 22:21:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/480650#M2577</guid>
      <dc:creator>NZ_Hockey_Mum</dc:creator>
      <dc:date>2018-07-23T22:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with SAS and Cosmos DB</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/480707#M2578</link>
      <description>&lt;P&gt;Did you get the OLE-DB connection working alright?&lt;/P&gt;
&lt;P&gt;Does it Work with bulkloads?&lt;/P&gt;
&lt;P&gt;And how is your experience with performance?&lt;/P&gt;
&lt;P&gt;Our performance towards Azure is poor.&lt;/P&gt;
&lt;P&gt;If we dont't get that solved, cloud is probably not an option for us, having to transfer to a lot of data.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 04:23:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/480707#M2578</guid>
      <dc:creator>bl_jyskebank_dk</dc:creator>
      <dc:date>2018-07-24T04:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with SAS and Cosmos DB</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/480717#M2579</link>
      <description>We can down load fast and upload using ole DB drivers, between our sas&lt;BR /&gt;servers and azure sql database.&lt;BR /&gt;&lt;BR /&gt;Worked out the odbc drivers would insert a row at a time but not bulk ....&lt;BR /&gt;13 hours for 7 columns and 350,000 records. Hence we tried the sas ole db&lt;BR /&gt;drivers.&lt;BR /&gt;&lt;BR /&gt;I am waiting for IT to install the cosmos drivers for the azure nosql&lt;BR /&gt;database. So that will be interesting. I only need to download from that&lt;BR /&gt;database.&lt;BR /&gt;&lt;BR /&gt;Good luck!&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Jul 2018 05:54:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/480717#M2579</guid>
      <dc:creator>NZ_Hockey_Mum</dc:creator>
      <dc:date>2018-07-24T05:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with SAS and Cosmos DB</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/533863#M2580</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="reply-author"&gt;&lt;SPAN&gt;bl_jyskebank_dk&lt;/SPAN&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for sharing your experience!&lt;/P&gt;&lt;P&gt;I tried recreating your example but my log keeps telling me that the table in which I want to isnert values is not found in the DB.&lt;/P&gt;&lt;P&gt;The libname works fine.&lt;/P&gt;&lt;P&gt;Which API did you choose when creating the CosmosDB? I used Core (SQL) and did not have any luck with that but it seemed the most fittign one for working with tabular data from SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2019 08:27:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/533863#M2580</guid>
      <dc:creator>PascalG</dc:creator>
      <dc:date>2019-02-08T08:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with SAS and Cosmos DB</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/533886#M2581</link>
      <description>&lt;P&gt;Hi PascalG.&lt;/P&gt;
&lt;P&gt;I created the CosmosDB itself and the empty Collection via the Azure Portal (Azure Website), not using SAS and proc sql or anything else in SAS. Plain Azure stuff.&lt;/P&gt;
&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2019 12:09:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/533886#M2581</guid>
      <dc:creator>bl_jyskebank_dk</dc:creator>
      <dc:date>2019-02-08T12:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with SAS and Cosmos DB</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/533959#M2582</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created an empty Collection name "Test" in the Azure Portal and tried inserting values into it. I get told that a "Schema map entry" could not be found (see screenshots). Have you changed anything in the ODBC Schema Editor?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Pascal&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2019 15:19:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/533959#M2582</guid>
      <dc:creator>PascalG</dc:creator>
      <dc:date>2019-02-08T15:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with SAS and Cosmos DB</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/535499#M2583</link>
      <description>&lt;P&gt;Hi Pascal.&lt;/P&gt;
&lt;P&gt;I did not get that error or anything like it.&lt;/P&gt;
&lt;P&gt;It's some time since I played around with it.&lt;/P&gt;
&lt;P&gt;Until we get higher Network speed we will not pursue this solution.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 06:52:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Experience-with-SAS-and-Cosmos-DB/m-p/535499#M2583</guid>
      <dc:creator>bl_jyskebank_dk</dc:creator>
      <dc:date>2019-02-14T06:52:23Z</dc:date>
    </item>
  </channel>
</rss>

