Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
BenLyon
New Contributor II

Get data from a API with a copy data

Hello 

 

I need to get data from this api :
https://ads.atmosphere.copernicus.eu

to my lakehouse. I need either a file or a table.
I tried so many things !

If someone has an idea ?

 

Thank 

1 ACCEPTED SOLUTION
spencer_sa
Contributor III

Update:

This code works and successfully downloads a zip file into a lakehouse.

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')

 

If this helps, please consider Accepting as a Solution to help other people to find it.

View solution in original post

3 REPLIES 3
spencer_sa
Contributor III

Having looked at the API spec and the cdsapi python library source code...
... using a python notebook in the first instance.
https://ads.atmosphere.copernicus.eu/how-to-api

https://github.com/ecmwf/cdsapi/blob/master/cdsapi/api.py

Replace the line in the example code that looks like;

client = cdsapi.Client()

with the following so it doesn't need to read from the config file;

 

 

client = cdsapi.Client(url='https://ads.atmosphere.copernicus.eu/api', key='<API key>')

 

 



spencer_sa
Contributor III

Update:

This code works and successfully downloads a zip file into a lakehouse.

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')

 

If this helps, please consider Accepting as a Solution to help other people to find it.

nitinmehta2879
New Contributor III

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.

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Free Fabric Certifications

Free Fabric Certifications

Get Fabric certified for free! Don't miss your chance.

January Fabric Update Carousel

Fabric Monthly Update - January 2026

Check out the January 2026 Fabric update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (2,729)