In This Video we are going to learn,
1) Convert SQL Server Result to Semi structured data file (csv, json, xml, parquet)
2) Read it using pyspark on databricks platform.
parquet file
Reference:
https://github.com/microsoft/AzureSyn...
To Run Powershell script
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser
Command to Run in power shell
.\Export-ToParquet.ps1 -ConfigFile .\ConfigFile.csv -ServerName "MYCOMP" -UserName sa -MaxJobsCount 5
command in pyspark
df1=spark.read.format("csv")\
.option("header","false")\
.option("inferschema","false")\
.option("mode","FAILFAST")\
.load("/FileStore/tables/Patient_csv_5L.csv")
df2=spark.read.format("json")\
.option("inferschema","false")\
.option("mode","PERMISSIVE")\
.option("multiline","true")\
.load("/FileStore/tables/Results_490k.json")
df3=spark.read.format("parquet").load("/FileStore/tables/PatientData.parquet")
xmlFile = "/FileStore/tables/Results_xml.xml"
df4 =spark.read.format("com.databricks.spark.xml")\
.option("rowTag","row")\
.option("spark.jars.packages", "com.databricks:spark-xml_2.12:0.17.0")\
.load(xmlFile)
Notes / SQL Query link:
https://learnsqlwithsagar.blogspot.com
your queries:
parquet
pyspark
spark
databricks
read xml file pyspark
read csv file pyspark
read parquet file pyspark
read json file pyspark
read csv file spark
read parquet file spark
read json file spark
read xml file spark
My key Links-
🚀 YouTube Videos- / @mssqlexpert
🌍 My website / blog - https://learnsqlwithsagar.blogspot.com/
📸 Instagram - / learnsqlwithsagar
🚀 YouTube Shorts - https://www.youtube.com/@mssqlexperts...
Who am I :
Hey guys, I am Sagar, welcome to this channel - #mssqlexpert. this channel is all about learning SQL Server. my goal is to help you in SQL server learning.
and Learn complete SQL from basics to Expert Level with an Industrial Knowledge.
This SQL course is for beginners who having zero knowledge in SQL. Even those having SQL knowledge they will also get deep information about SQL Language & Microsoft SQL Server (RDBMS). This course will cover how to write SQL Query in MS SQL Server. We will go through a Database, Database Objects (Table, View, Stored Procedure, Function, Trigger, Cursor), Different SQL Queries, Joining, Temp Table, Table Variable, CTE, Indexing, Stats, Query Execution plan, Query Optimization and much more.
Please Like, Share, Subscribe, & Comment.
Featured playlist
• SQL Course | SQL Full Course 2024 | sql fu...
• Database Knowledge
• SQL project
• MySQL
#mssqlexpert #sql #sql course #data #database #sql server #sqlserver #mssqlserver #RDBMS #sql tutorial #sql full course #sql tutorial for beginners
#sql for data analysis #sql for beginners
Информация по комментариям в разработке