<?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 Fabric's Notebook connect to SAP Hana in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Fabric-s-Notebook-connect-to-SAP-Hana/m-p/4162166#M4174</link>
    <description>&lt;P&gt;In Microsoft Fabric's module 'Synapse Data Engineering' we are able to create a Notebook that uses Python (more specifically the PySpark library) which we can use to process large volumes of Data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I, programmatically in Notebook, connect to a SAP Hana database and fetch for example one table to insert to OneLake?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are some resources that I found but I still feel like it's not what I really want.&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&lt;A href="https://medium.com/@satyanerurkar/efficient-data-ingestion-with-spark-and-microsoft-fabric-notebook-efd85b207d5b" target="_blank" rel="noopener"&gt;Efficient Data Ingestion with Spark and Microsoft Fabric Notebook | by Satya Nerurkar | Medium&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(This one for example connects to some Azure Blob Storage? and not directly the SAP database.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-gb/training/modules/use-apache-spark-work-files-lakehouse/" target="_blank" rel="noopener"&gt;Use Apache Spark in Microsoft Fabric - Training | Microsoft Learn&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(There's also this but this is a generic use of Apache Spark and not exactly the connection to SAP Hana.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp;&lt;A href="https://developers.sap.com/tutorials/hana-cloud-relational-engine-spark-connection.html" target="_blank" rel="noopener"&gt;Accessing SAP HANA Data lake Relational Engine using Apache Spark | SAP Tutorials&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(This one seems to be closer to what I was expecting to do, however the Step 1 seems unecessary for me, while Step 2 seems to be the actual CODE to make the connection to the database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you could provide any more resources or code that simply connect to the SAP Hana database to fetch a table and then upload it to OneLake I would appreciate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
    <pubDate>Fri, 20 Sep 2024 11:14:42 GMT</pubDate>
    <dc:creator>SergioSurfer</dc:creator>
    <dc:date>2024-09-20T11:14:42Z</dc:date>
    <item>
      <title>Fabric's Notebook connect to SAP Hana</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Fabric-s-Notebook-connect-to-SAP-Hana/m-p/4162166#M4174</link>
      <description>&lt;P&gt;In Microsoft Fabric's module 'Synapse Data Engineering' we are able to create a Notebook that uses Python (more specifically the PySpark library) which we can use to process large volumes of Data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I, programmatically in Notebook, connect to a SAP Hana database and fetch for example one table to insert to OneLake?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are some resources that I found but I still feel like it's not what I really want.&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&lt;A href="https://medium.com/@satyanerurkar/efficient-data-ingestion-with-spark-and-microsoft-fabric-notebook-efd85b207d5b" target="_blank" rel="noopener"&gt;Efficient Data Ingestion with Spark and Microsoft Fabric Notebook | by Satya Nerurkar | Medium&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(This one for example connects to some Azure Blob Storage? and not directly the SAP database.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-gb/training/modules/use-apache-spark-work-files-lakehouse/" target="_blank" rel="noopener"&gt;Use Apache Spark in Microsoft Fabric - Training | Microsoft Learn&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(There's also this but this is a generic use of Apache Spark and not exactly the connection to SAP Hana.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp;&lt;A href="https://developers.sap.com/tutorials/hana-cloud-relational-engine-spark-connection.html" target="_blank" rel="noopener"&gt;Accessing SAP HANA Data lake Relational Engine using Apache Spark | SAP Tutorials&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(This one seems to be closer to what I was expecting to do, however the Step 1 seems unecessary for me, while Step 2 seems to be the actual CODE to make the connection to the database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you could provide any more resources or code that simply connect to the SAP Hana database to fetch a table and then upload it to OneLake I would appreciate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2024 11:14:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Fabric-s-Notebook-connect-to-SAP-Hana/m-p/4162166#M4174</guid>
      <dc:creator>SergioSurfer</dc:creator>
      <dc:date>2024-09-20T11:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: Fabric's Notebook connect to SAP Hana</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Fabric-s-Notebook-connect-to-SAP-Hana/m-p/4164604#M4197</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/807995"&gt;@SergioSurfer&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is this something that could work for you:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/t5/enterprise-resource-planning-blogs-by-sap/using-python-to-get-data-from-s4-hana-cloud-by-odata-and-use-python-pandas/ba-p/13512789" target="_blank"&gt;https://community.sap.com/t5/enterprise-resource-planning-blogs-by-sap/using-python-to-get-data-from-s4-hana-cloud-by-odata-and-use-python-pandas/ba-p/13512789&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Do note that this is the cloud version of SAP HANA. If you are using the on-premise version you should first install the Fabric gateway. Using the gateway in a notebook is not supported yet, so you will have to use a copy activity in a data pipeline.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Sep 2024 09:05:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Fabric-s-Notebook-connect-to-SAP-Hana/m-p/4164604#M4197</guid>
      <dc:creator>FabianSchut</dc:creator>
      <dc:date>2024-09-22T09:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Fabric's Notebook connect to SAP Hana</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Fabric-s-Notebook-connect-to-SAP-Hana/m-p/4165716#M4204</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/807995"&gt;@SergioSurfer&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Perhaps you can try to use jdbc with sap driver to connect to the SAP HANA data source:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;from pyspark.sql import SparkSession

# Initialize Spark session
spark = SparkSession.builder \
    .appName("SAP HANA") \
    .getOrCreate()

# SAP HANA connection properties
hana_url = "jdbc:sap://&amp;lt;SAP_HANA_HOST&amp;gt;:&amp;lt;PORT&amp;gt;"
hana_properties = {
    "user": "&amp;lt;USERNAME&amp;gt;",
    "password": "&amp;lt;PASSWORD&amp;gt;",
    "driver": "com.sap.db.jdbc.Driver"
}

# Load data from SAP HANA
df = spark.read.jdbc(url=hana_url, table="&amp;lt;TABLE_NAME&amp;gt;", properties=hana_properties)

# Show the data
df.show()&lt;/LI-CODE&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 02:42:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Fabric-s-Notebook-connect-to-SAP-Hana/m-p/4165716#M4204</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-23T02:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Fabric's Notebook connect to SAP Hana</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Fabric-s-Notebook-connect-to-SAP-Hana/m-p/4604006#M7816</link>
      <description>&lt;P&gt;Thanks for raising this question. I had similar one. Glad found this post. Bookmarking links, now&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 21:21:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Fabric-s-Notebook-connect-to-SAP-Hana/m-p/4604006#M7816</guid>
      <dc:creator>CeeVee33</dc:creator>
      <dc:date>2025-03-10T21:21:14Z</dc:date>
    </item>
  </channel>
</rss>

