This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [CmdletBinding()] | |
| # Summary: | |
| # Standalone validation utility that provisions a Fabric OneLake data access role | |
| # (default: GoldReader) on the specified lakehouse and assigns a Microsoft Entra | |
| # user to it using the documented preview endpoints. Useful for testing role | |
| # creation/membership independently of the full workspace automation. | |
| #how to run script: | |
| #Onelake security must be enabled on the target lakehouse for this script to work. | |
| #pwsh -NoLogo -NoProfile -Command "& 'c:/Git/Fabric_powershell/Standalone scripts/Test-OneLakeRoleAssignment.ps1' -WorkspaceName '001onelakesec' -LakehouseName 'Gold' -TenantId 'guid-guid-guid' -UserObjectId 'guid-guid-guid' -RoleName 'GoldReader'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # COMPLETE WORKSPACE USER CATALOG - Azure Default Credentials | |
| # Gets all workspaces and their users, with rate limiting and filtering | |
| # API endpoint supports 200 request per hour.. | |
| import time | |
| import json | |
| import requests | |
| from azure.identity import DefaultAzureCredential | |
| # ========= CONFIGURATION ========= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #https://learn.microsoft.com/en-us/rest/api/power-bi/admin/workspace-info-get-scan-result | |
| #returns assets in a Fabric Workspace | |
| import time | |
| import json | |
| import os | |
| import requests | |
| from azure.identity import DefaultAzureCredential | |
| # ========= CONFIG ========= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CountryRegion,Degree,Condition | |
| United States,15,Sunny | |
| Canada,-2,Snow | |
| United Kingdom,8,Rainy | |
| Denmark,4,Cloud |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| KEYVAULT_NAME = "https://atpkvdemo.vault.azure.net" | |
| SECRET_NAME = "adslgen2key" | |
| # get access token for keyvault resource | |
| # you can also use full audience here like https://vault.azure.net | |
| accountKey = notebookutils.credentials.getSecret(KEYVAULT_NAME, SECRET_NAME) | |
| #use secret with the storage account primary access key | |
| notebookutils.fs.mount( | |
| "abfss://mycontainer@amlwsatp0010067670284.blob.core.windows.net", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Documentation: https://learn.microsoft.com/en-us/fabric/data-engineering/get-started-api-livy | |
| Fabric Livy API Sample Script | |
| ============================== | |
| This script demonstrates how to use the Livy API to submit and execute | |
| Spark session jobs in Microsoft Fabric. | |
| Prerequisites: | |
| - Fabric Premium or Trial capacity with a Lakehouse |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import re | |
| files_folder = "/lakehouse/default/Files/input" | |
| csv_files = [] | |
| for root, dirs, files in os.walk(files_folder): | |
| for file in files: | |
| if file.endswith('.csv'): | |
| csv_files.append(os.path.join(root, file)) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder