cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

databricks

KSB
New Contributor

Hi Team,

Having excel file in sharepoint folder, and has to insert excel data into SQL table from databricks notebook . can i have clear steps on it. Dont have access to Azure Active Directory.  can anyone gives solution without using AZURE Active Directory.

inserting excel data from sharepoint to SQL table through power automate, working fine , but when having 10000 records, for inserting data taking 4-5 hrs of time.

 

 

1 REPLY 1

Stefan-Koch
Valued Contributor II

Hi KSB

You could read direkt with Databricks from Excel Sharepoint with Graph API. Here is one possible way: https://community.databricks.com/t5/data-engineering/load-data-from-sharepoint-site-to-delta-table-i...

However, you need the proper rights/grants to use the Graph API. 

Another approach: Copy the Excel from Sharepoint to your Datalake with Power Automate. Then, read the data with Databricks into a Delta Table. If you have your Excel file in the data lake, the code could look like this: 

pip install openpyxl

import pandas as pd

schema_name = f"my_catalog.my_schema"
file_location_xls   = "/Volumes/demo_shared/samples/files/FinancialsSampleData.xlsx"

# create pandas dataframe
pdf = pd.read_excel(file_location_xls, sheet_name="Financials1")

# convert pandas dataframe to pyspark dataframe
df = spark.createDataFrame(pdf)

df.write.saveAsTable(f"{schema_name}.financials_sheet1")

 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group