Accessing VM Share Path with service account and password from Synapse Scala Note Book

AJITH KUMAR RAI 0 Reputation points
2024-01-31T15:00:11.3166667+00:00

Hi Team, We need reference document or code sample to access VM Share path from Azure Synapse notebook Scala. For below mentioned scenario.

Share path location: \AZVMSQL01*EarthFilesPPE*

Username: testdomain\testaccount

password: XXXXX

Under this EarthFilesPPE folder we have multiple .dat files

for example:

countryflowers.dat, countryanimals.dat like this.

By using synapse scala notebook want to read countryflowers.dat as mentioned below.

// Read data from the VM Shared File Path into a DataFrame

val df = spark.read

.format("csv")

.option("header", "true") // If your file has a header

.load(filePath)

// Show the DataFrame

df.show()

Please provide sample related to it by using above information.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,263 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.