<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Connect Spark in SQL database</title>
    <link>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4303371#M35</link>
    <description>&lt;P&gt;in the documentation overview&amp;nbsp;&lt;/P&gt;&lt;P&gt;it is mentioned that i can create and manage my data in sql database using spark&lt;/P&gt;&lt;P&gt;can anyone help me how to do this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Nov 2024 05:40:09 GMT</pubDate>
    <dc:creator>muhssamy</dc:creator>
    <dc:date>2024-11-27T05:40:09Z</dc:date>
    <item>
      <title>Connect Spark</title>
      <link>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4303371#M35</link>
      <description>&lt;P&gt;in the documentation overview&amp;nbsp;&lt;/P&gt;&lt;P&gt;it is mentioned that i can create and manage my data in sql database using spark&lt;/P&gt;&lt;P&gt;can anyone help me how to do this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2024 05:40:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4303371#M35</guid>
      <dc:creator>muhssamy</dc:creator>
      <dc:date>2024-11-27T05:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Connect Spark</title>
      <link>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4303582#M37</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="663539" data-lia-user-login="muhssamy" class="lia-mention lia-mention-user"&gt;muhssamy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To create and manage your data in a SQL database using Spark within Microsoft Fabric:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Set up a Spark Cluster&lt;/STRONG&gt;: First, create a Spark cluster in your Fabric workspace.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Use Notebooks for Data Engineering&lt;/STRONG&gt;: Open a notebook in Fabric and use PySpark or Spark SQL to connect to your SQL database.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Data Management&lt;/STRONG&gt;: Use Spark to perform operations like loading data, transforming it, and writing back to your SQL database. Here's a simple example:&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Example PySpark code to read from SQL and write to Spark DataFrame
jdbc_url = "jdbc:sqlserver://&amp;lt;server_name&amp;gt;:&amp;lt;port&amp;gt;;databaseName=&amp;lt;db_name&amp;gt;"
properties = {"user": "&amp;lt;username&amp;gt;", "password": "&amp;lt;password&amp;gt;", "driver": "com.microsoft.sqlserver.jdbc.SQLServerDriver"}

# Load data from SQL Server
sql_df = spark.read.jdbc(url=jdbc_url, table="&amp;lt;your_table&amp;gt;", properties=properties)

# Perform transformation using Spark
transformed_df = sql_df.filter(sql_df["column_name"] &amp;gt; 100)

# Write data back to SQL
transformed_df.write.jdbc(url=jdbc_url, table="&amp;lt;new_table&amp;gt;", mode="overwrite", properties=properties)&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;4. Design Pipelines&lt;/STRONG&gt;: Use Fabric's Data Engineering pipelines to automate data movement from your SQL database to Spark and back.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By following these steps, you can efficiently manage and process your SQL database data using Spark in Fabric.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution, this will help others!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If my response(s) assisted you in any way, don't forget to drop me a "&lt;STRONG&gt;Kudos&lt;/STRONG&gt;" &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;BR /&gt;Poojara&lt;BR /&gt;Data Analyst | MSBI Developer | Power BI Consultant&lt;BR /&gt;&lt;STRONG&gt;Please Subscribe my YouTube for Beginners/Advance Concepts:&lt;/STRONG&gt;&amp;nbsp;&lt;A href="https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS" target="_self"&gt;https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS&lt;/A&gt;&amp;nbsp; &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;(360 remaining for 500 SUBS) Please support!!&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2024 07:07:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4303582#M37</guid>
      <dc:creator>Poojara_D12</dc:creator>
      <dc:date>2024-11-27T07:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Connect Spark</title>
      <link>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4303806#M38</link>
      <description>&lt;P&gt;the problem here what is the user name and passoword&lt;BR /&gt;there is no sql user for this database&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2024 09:01:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4303806#M38</guid>
      <dc:creator>muhssamy</dc:creator>
      <dc:date>2024-11-27T09:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: Connect Spark</title>
      <link>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4305178#M41</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="663539" data-lia-user-login="muhssamy" class="lia-mention lia-mention-user"&gt;muhssamy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The username is your account that sign in the fabric, and the password is the password is the your account password&amp;nbsp;that sign in the fabric, you can see your server name and database name in settings of database. click the settings icon in home tab.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Then click the connection strings, in this tab, it offers different strings of the data connection.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;e.g You can click the php, then it will dislay your server information.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;You can refer to the following link to know more.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/database/sql/connect#find-sql-connection-string" target="_blank" rel="noopener"&gt;Connect to your SQL database - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Yolo Zhu&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2024 03:09:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4305178#M41</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-28T03:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Connect Spark</title>
      <link>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4305898#M42</link>
      <description>&lt;P&gt;will this work with Account with MFA ?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2024 09:25:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4305898#M42</guid>
      <dc:creator>muhssamy</dc:creator>
      <dc:date>2024-11-28T09:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Connect Spark</title>
      <link>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4305927#M43</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="663539" data-lia-user-login="muhssamy" class="lia-mention lia-mention-user"&gt;muhssamy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, after testing it can work for Account with MFA, but you need to configure the access for the account.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;To&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/database/sql/connect" target="_self" data-linktype="relative-path"&gt;connect&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to a database, a user must have at least the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/database/sql/authorization#item-permissions" data-linktype="self-bookmark" target="_blank"&gt;Read permission in Fabric&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for the Fabric database item&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;You can refer to the following link.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/database/sql/authorization" target="_blank"&gt;Authorization in SQL database - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Yolo Zhu&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2024 09:35:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4305927#M43</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-28T09:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Connect Spark</title>
      <link>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4309740#M46</link>
      <description>&lt;P&gt;Thanks All&amp;nbsp;&lt;BR /&gt;i authorized using service principle using the following&lt;/P&gt;&lt;LI-CODE lang="python"&gt;jdbc_url = (
    "jdbc:sqlserver://&amp;lt;your-server-name&amp;gt;.database.windows.net:1433;"
    "database=&amp;lt;your-database-name&amp;gt;;"
    "authentication=ActiveDirectoryServicePrincipal;"
    "encrypt=true;"
    "trustServerCertificate=true;"
)
sql_db_options = {
    "url": jdbc_url,
    "dbtable": "&amp;lt;your-table-name&amp;gt;",
    "user": "&amp;lt;service-principal-client-id&amp;gt;",
    "password": "&amp;lt;service-principal-client-secret&amp;gt;"
}
df = spark.read.format("jdbc").options(**sql_db_options).load()
df.show()&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 02 Dec 2024 11:28:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4309740#M46</guid>
      <dc:creator>muhssamy</dc:creator>
      <dc:date>2024-12-02T11:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Connect Spark</title>
      <link>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4379284#M170</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="837199" data-lia-user-login="Poojara_D12" class="lia-mention lia-mention-user"&gt;Poojara_D12&lt;/a&gt;&amp;nbsp;Getting the error as "&lt;SPAN&gt;Spark_Ambiguous_JDBC_SQLServerException"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;How to resolve this?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2025 07:53:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4379284#M170</guid>
      <dc:creator>karthikvalluri</dc:creator>
      <dc:date>2025-01-24T07:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Connect Spark</title>
      <link>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4413180#M196</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to connect using Workspace Space Identity and was wondering how to achieve it from notebook given I don't get to see the secret for the identity created?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gayatri&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2025 06:50:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/SQL-database/Connect-Spark/m-p/4413180#M196</guid>
      <dc:creator>g3kuser</dc:creator>
      <dc:date>2025-02-17T06:50:36Z</dc:date>
    </item>
  </channel>
</rss>

