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
| # %% | |
| !pip install mltable | |
| # %% | |
| # AML to query delta table in lakehouse to pandas dataframe | |
| from mltable import from_delta_lake | |
| #url = "https://onelake.dfs.fabric.microsoft.com/ws_ramboll_data/bronze.Lakehouse/Tables/taxidatacsv" | |
| abfs = "abfss://[email protected]/bronze.Lakehouse/Tables/taxidatacsv" | |
| df2 = from_delta_lake(abfs).to_pandas_dataframe() |
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
| trigger: | |
| branches: | |
| include: | |
| - main | |
| variables: | |
| pWorkspaceId: '<GUID OF FABRIC WORKSPACE>' #My Fabric Workspace ID | |
| pPipelineId: '<GUID OF FABRIC PIPELINE IN WORKSPACE>' #My Fabric Pipeline ID | |
| stages: |
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
| trigger: | |
| branches: | |
| include: | |
| - main | |
| variables: | |
| resourceGroupName: '<Name of Resource Group>' # My Resource Group Name | |
| dataFactoryName: '<Name of ADF instance>' # My Data Factory Name | |
| pipelineName: '<Name of Pipeline>' # My Data Factory Pipeline Name |
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
| from azure.storage.filedatalake import DataLakeServiceClient | |
| from azure.identity import ClientSecretCredential | |
| # Service principal credentials | |
| app = "<app Registration Name>" # App Registration Name | |
| tenant_id = '<tenant_id>' # Directory (tenant) ID | |
| client_id = '<client_id>' # Application (client) ID | |
| client_secret = '<client_secret>' # Client secret | |
| # Storage account name |
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
| # Script to create searchable PDF from scan PDF or images using Azure Form Recognizer / Document Intelligence | |
| # | |
| # USAGE: | |
| # python Untitled-1.py <input_file> [-o <output_file>] | |
| # | |
| # ARGUMENTS: | |
| # <input_file> Path to your PDF or image file (jpg, jpeg, tif, tiff, bmp, png). | |
| # -o <output_file> (optional) Name for the output searchable PDF. | |
| # If omitted, output will be <input_file>.ocr.pdf | |
| # |
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
| using Azure; | |
| using Azure.AI.Translation.Document; | |
| /// <summary> | |
| /// This program demonstrates how to use Azure's Document Translation service to translate documents | |
| /// stored in an Azure Blob Storage container from one language to another. | |
| /// It authenticates using a custom endpoint and resource key, then submits a translation job, | |
| /// waits for completion, and prints the status and results for each document. | |
| /// https://learn.microsoft.com/en-us/azure/ai-services/translator/document-translation/how-to-guides/use-rest-api-programmatically?tabs=csharp | |
| /// https://learn.microsoft.com/en-us/dotnet/api/overview/azure/ai.translation.document-readme?view=azure-dotnet |
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.