13. Use Python to Manage OneLake in Fabric |

  Рет қаралды 3,774

WafaStudies

WafaStudies

Күн бұрын

Пікірлер: 10
@deepjyotimitra1340
@deepjyotimitra1340 8 ай бұрын
what an explanation 👏 👌 Loved it. For live project, can we use SPN for auth?
@BharathKumar-ch4tp
@BharathKumar-ch4tp 7 ай бұрын
Yes you can
@NarayanJangid-q6i
@NarayanJangid-q6i Ай бұрын
Hi @WafaStudies, I am getting sampleLakehouse.Lakehouse is not found in the Workspace . Why? I have rechecked workspace and lakehouse name, all of them are correct
@zubair489
@zubair489 8 ай бұрын
How to use a service principal instead of logging interactively?
@BharathKumar-ch4tp
@BharathKumar-ch4tp 7 ай бұрын
import os from azure.identity import ClientSecretCredential from azure.storage.filedatalake import ( DataLakeServiceClient, DataLakeDirectoryClient, ) # Set your account, workspace, and item path here ACCOUNT_NAME = "onelake" WORKSPACE_NAME = "" DATA_PATH = "" LOCAL_FILE_PATH = r"" def upload_file_to_directory(directory_client: DataLakeDirectoryClient, local_file_path: str): file_name = os.path.basename(local_file_path) file_client = directory_client.get_file_client(file_name) with open(local_file_path, mode="rb") as data: file_client.upload_data(data, overwrite=True) def main(): # Create a service client using service principal credentials client_id = "" tenant_id = "" client_secret = "" account_url = f"{ACCOUNT_NAME}.dfs.fabric.microsoft.com" credential = ClientSecretCredential(tenant_id, client_id, client_secret) service_client = DataLakeServiceClient(account_url, credential=credential) # Create a file system client for the workspace file_system_client = service_client.get_file_system_client(WORKSPACE_NAME) # Get the directory client for the specified data path directory_client = file_system_client.get_directory_client(DATA_PATH) # Upload the local file to the specified directory in the Data Lake storage upload_file_to_directory(directory_client, LOCAL_FILE_PATH) if __name__ == "__main__": main() If you already know how to create service principal , Use this code
@BharathKumar-ch4tp
@BharathKumar-ch4tp 7 ай бұрын
This is for loading a data from local computer to Lakehouse using Python
@syednayyar
@syednayyar 3 ай бұрын
Great vidoe , can you also please make a video to send the Json file from android app ( fetching the file from local download folder of android ) to the One lake root folder or any other folder ? i have tried but its not working
@cheeliAmarnath
@cheeliAmarnath 5 ай бұрын
Am not able to install packages
@kartiktak6270
@kartiktak6270 7 ай бұрын
when will you add more videos ??
@rogerbheeshmaa3606
@rogerbheeshmaa3606 8 ай бұрын
how can we fetch the data from onelake, pls post a video on that
Unlock AI with Fabric Patterns
9:28
Matt Williams
Рет қаралды 17 М.
小蚂蚁会选到什么呢!#火影忍者 #佐助 #家庭
00:47
火影忍者一家
Рет қаралды 125 МЛН
SISTER EXPOSED MY MAGIC @Whoispelagheya
00:45
MasomkaMagic
Рет қаралды 18 МЛН
Will A Basketball Boat Hold My Weight?
00:30
MrBeast
Рет қаралды 122 МЛН
龟兔赛跑:好可爱的小乌龟#short #angel #clown
01:00
Super Beauty team
Рет қаралды 82 МЛН
Delta Lake Table Structure Demystified in Microsoft Fabric
15:34
The most important Python script I ever wrote
19:58
John Watson Rooney
Рет қаралды 204 М.
Simple File API Using Azure Blob Storage (running locally)
15:12
Milan Jovanović
Рет қаралды 11 М.
Understanding OneLake within Microsoft Fabric
10:29
Guy in a Cube
Рет қаралды 75 М.
小蚂蚁会选到什么呢!#火影忍者 #佐助 #家庭
00:47
火影忍者一家
Рет қаралды 125 МЛН