<?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: Get data from a API with a copy data in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Get-data-from-a-API-with-a-copy-data/m-p/4338015#M5709</link>
    <description>&lt;P&gt;Try using copy data activity under Data Pipeline. Select Data store type as external, connection as Rest API, connection type=Rest. In destination select lakehouse and then table or file and provide name of table/file.&lt;/P&gt;</description>
    <pubDate>Fri, 20 Dec 2024 05:35:52 GMT</pubDate>
    <dc:creator>nitinmehta2879</dc:creator>
    <dc:date>2024-12-20T05:35:52Z</dc:date>
    <item>
      <title>Get data from a API with a copy data</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Get-data-from-a-API-with-a-copy-data/m-p/4337527#M5701</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to get data from this api :&lt;BR /&gt;&lt;SPAN&gt;&lt;A title="https://ads.atmosphere.copernicus.eu/api" href="https://ads.atmosphere.copernicus.eu/api" target="_blank" rel="noreferrer noopener"&gt;&lt;SPAN class=""&gt;https://ads.atmosphere.copernicus.eu&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;to my lakehouse. I need either a file or a table.&lt;BR /&gt;I tried so many things !&lt;BR /&gt;&lt;BR /&gt;If someone has an idea ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 18:47:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Get-data-from-a-API-with-a-copy-data/m-p/4337527#M5701</guid>
      <dc:creator>BenLyon</dc:creator>
      <dc:date>2024-12-19T18:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from a API with a copy data</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Get-data-from-a-API-with-a-copy-data/m-p/4337729#M5703</link>
      <description>&lt;P&gt;Having looked at the API spec and the &lt;EM&gt;cdsapi&lt;/EM&gt; python library source code...&lt;BR /&gt;... using a python notebook in the first instance.&lt;BR /&gt;&lt;A href="https://ads.atmosphere.copernicus.eu/how-to-api" target="_blank" rel="noopener"&gt;https://ads.atmosphere.copernicus.eu/how-to-api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/ecmwf/cdsapi/blob/master/cdsapi/api.py" target="_blank" rel="noopener"&gt;https://github.com/ecmwf/cdsapi/blob/master/cdsapi/api.py&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Replace the line in the example code that looks like;&lt;/P&gt;&lt;PRE&gt;client = cdsapi.Client()&lt;/PRE&gt;&lt;P&gt;with the following so it doesn't need to read from the config file;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;client = cdsapi.Client(url='https://ads.atmosphere.copernicus.eu/api', key='&amp;lt;API key&amp;gt;')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2024 00:58:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Get-data-from-a-API-with-a-copy-data/m-p/4337729#M5703</guid>
      <dc:creator>spencer_sa</dc:creator>
      <dc:date>2024-12-20T00:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from a API with a copy data</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Get-data-from-a-API-with-a-copy-data/m-p/4337807#M5705</link>
      <description>&lt;P&gt;Update:&lt;BR /&gt;&lt;BR /&gt;This code works and successfully downloads a zip file into a lakehouse.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;url='https://ads.atmosphere.copernicus.eu/api'
key = 'Your API key'
import cdsapi
dataset = "cams-gridded-solar-radiation"
request = {
    "variable": ["direct_normal_irradiation"],
    "sky_type": ["clear"],
    "version": ["4.6"],
    "year": ["2023"],
    "month": ["01"]
}
client = cdsapi.Client(url = url, key = key)
a = client.retrieve(dataset, request,'/lakehouse/default/Files/Data/file.zip')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this helps, please consider &lt;EM&gt;Accepting as a Solution&lt;/EM&gt; to help other people to find it.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2024 02:01:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Get-data-from-a-API-with-a-copy-data/m-p/4337807#M5705</guid>
      <dc:creator>spencer_sa</dc:creator>
      <dc:date>2024-12-20T02:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from a API with a copy data</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Get-data-from-a-API-with-a-copy-data/m-p/4338015#M5709</link>
      <description>&lt;P&gt;Try using copy data activity under Data Pipeline. Select Data store type as external, connection as Rest API, connection type=Rest. In destination select lakehouse and then table or file and provide name of table/file.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2024 05:35:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Get-data-from-a-API-with-a-copy-data/m-p/4338015#M5709</guid>
      <dc:creator>nitinmehta2879</dc:creator>
      <dc:date>2024-12-20T05:35:52Z</dc:date>
    </item>
  </channel>
</rss>

