<?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 Re: Identify a shortcut in pyspark notebook in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Identify-a-shortcut-in-pyspark-notebook/m-p/3476810#M96</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/599172"&gt;@DennesTorres&lt;/a&gt;&amp;nbsp; - Thanks for using Fabric Community,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I have reached the internal team for help on this. I will update you once I hear from them.&lt;/P&gt;
&lt;P&gt;Appreciate your patience.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 14 Oct 2023 13:41:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-10-14T13:41:49Z</dc:date>
    <item>
      <title>Identify a shortcut in pyspark notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Identify-a-shortcut-in-pyspark-notebook/m-p/3476689#M94</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shortcuts are very powerful and they are a great feature to enable a data mesh architecture.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, thinking on corporation level it may be hard to manage who links with who. How could we identify a shortcut in a notebook?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already tried:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;metadata&lt;/P&gt;&lt;P&gt;os.listdir&lt;/P&gt;&lt;P&gt;mssparkutils.fs.ls&lt;/P&gt;&lt;P&gt;show tblproperties&lt;/P&gt;&lt;P&gt;spark.catalog.listtables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nothing worked, they follow the shortcut and give no cluet that's not a local table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fabric has the information, of course, it changes the icon for shortcuts and shows in the lineage. But how could we access this information in a notebook to improve our shortcut management?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Denne&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2023 09:50:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Identify-a-shortcut-in-pyspark-notebook/m-p/3476689#M94</guid>
      <dc:creator>DennesTorres</dc:creator>
      <dc:date>2023-10-14T09:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Identify a shortcut in pyspark notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Identify-a-shortcut-in-pyspark-notebook/m-p/3476810#M96</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/599172"&gt;@DennesTorres&lt;/a&gt;&amp;nbsp; - Thanks for using Fabric Community,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I have reached the internal team for help on this. I will update you once I hear from them.&lt;/P&gt;
&lt;P&gt;Appreciate your patience.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2023 13:41:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Identify-a-shortcut-in-pyspark-notebook/m-p/3476810#M96</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-14T13:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Identify a shortcut in pyspark notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Identify-a-shortcut-in-pyspark-notebook/m-p/3491174#M97</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/599172"&gt;@DennesTorres&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Apologies for the delay in reply from our side.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;The fabric release plan states that this feature will be available during Q4 2023 (create and manage shortcuts via REST API):&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/fabric/release-plan/onelake#shortcut-api" target="_self"&gt;Link&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vgchennamsft_0-1698060534528.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/984990i3C668FF8C880AF85/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vgchennamsft_0-1698060534528.png" alt="vgchennamsft_0-1698060534528.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Appreciate your patience&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 11:32:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Identify-a-shortcut-in-pyspark-notebook/m-p/3491174#M97</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-23T11:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Identify a shortcut in pyspark notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Identify-a-shortcut-in-pyspark-notebook/m-p/3497030#M98</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/599172"&gt;@DennesTorres&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We haven’t heard from you on the last response and was just checking back to see if your query got answered? Otherwise, will respond back with the more details and we will try to help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 17:07:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Identify-a-shortcut-in-pyspark-notebook/m-p/3497030#M98</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-25T17:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Identify a shortcut in pyspark notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Identify-a-shortcut-in-pyspark-notebook/m-p/3503806#M99</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/599172"&gt;@DennesTorres&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We haven’t heard from you on the last response and was just checking back to see if your query got answered? Otherwise, will respond back with the more details and we will try to help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 06:12:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Identify-a-shortcut-in-pyspark-notebook/m-p/3503806#M99</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-30T06:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Identify a shortcut in pyspark notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Identify-a-shortcut-in-pyspark-notebook/m-p/4379564#M6485</link>
      <description>&lt;P&gt;I resolve this by using sempy :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;import sempy.fabric as fabric
import json
import requests
import fnmatch
import base64

-- Get metadata
from pyspark.sql import SparkSession
from pyspark.sql.types import StructType, StructField, StringType


# Récupérer les données depuis Fabric
ws = fabric.get_workspace_id()
items = fabric.list_items(workspace=ws)

# Construire une liste de dictionnaires à partir des données
items_data = [dict(row) for row in items.to_dict("records")]

# print(items_data)

# Définir le schéma (adapté selon vos colonnes)
schema = StructType([
    StructField("Id", StringType(), True),
    StructField("Display Name", StringType(), True),
    StructField("Description", StringType(), True),
    StructField("Type", StringType(), True),
    StructField("Workspace Id", StringType(), True),
])

# Créer le DataFrame Spark
items_df = spark.createDataFrame(items_data, schema)

# Créer une vue SparkSQL
items_df.createOrReplaceTempView("items_view")

-- get current lakehouse 

ws = fabric.get_workspace_id()
items = fabric.list_items(workspace= ws)
item = items[(items['Display Name'] == "Bronze")&amp;amp; (items['Type']=="Lakehouse")].iloc[0]["Id"]

-- call api

client = fabric.FabricRestClient()
r  = client.request(method="get", path_or_url=f"/v1/workspaces/{ws}/items/{item}/shortcuts")

-- update or créate shortcup to an other workspace&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code di you help you ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2025 10:23:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Identify-a-shortcut-in-pyspark-notebook/m-p/4379564#M6485</guid>
      <dc:creator>Syliano</dc:creator>
      <dc:date>2025-01-24T10:23:18Z</dc:date>
    </item>
  </channel>
</rss>

