<?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: Creating a python package that uses dbutils.secrets in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/creating-a-python-package-that-uses-dbutils-secrets/m-p/101626#M8899</link>
    <description>&lt;LI-CODE lang="python"&gt;from pyspark.dbutils import DBUtils
from pyspark.sql import SparkSession
 
spark = SparkSession.builder.getOrCreate()
dbutils = DBUtils(spark)&lt;/LI-CODE&gt;&lt;P&gt;Adding this to the module file solves the problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Dec 2024 15:13:41 GMT</pubDate>
    <dc:creator>krishnab</dc:creator>
    <dc:date>2024-12-10T15:13:41Z</dc:date>
    <item>
      <title>Creating a python package that uses dbutils.secrets</title>
      <link>https://community.databricks.com/t5/get-started-discussions/creating-a-python-package-that-uses-dbutils-secrets/m-p/60189#M8895</link>
      <description>&lt;P&gt;Hello Databricks,&lt;BR /&gt;I wanted to create python package which has a python script which has a class , this class is where we give scope and key and we het the secret. This package will be used inside a databricks notebook&amp;nbsp;&lt;BR /&gt;I want to use dbutils.secret for this&lt;BR /&gt;Q1. I have used dbutils in my code , but when i import this package in notebook and run it it shows dbutils not defined, is it not possible it takes dbutils on itself when running this package in notebook.&lt;BR /&gt;Q2. Then I also added "from databricks.sdk.runtime import dbutils" but this throws error saying "cannot configure default auth"&lt;BR /&gt;I want to create this python package locally and run it in databricks notebook where it can use dbutils , what can i do?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 10:45:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/creating-a-python-package-that-uses-dbutils-secrets/m-p/60189#M8895</guid>
      <dc:creator>samarth_solanki</dc:creator>
      <dc:date>2024-02-14T10:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a python package that uses dbutils.secrets</title>
      <link>https://community.databricks.com/t5/get-started-discussions/creating-a-python-package-that-uses-dbutils-secrets/m-p/60192#M8896</link>
      <description>&lt;P&gt;Hello samarth_solanki,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any specific reason for using the scope &amp;amp; key in class, however in data bricks and as a best practice we can create the&amp;nbsp;&lt;SPAN&gt;two types of&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Databricks Secret&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;Scopes:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A class="" href="https://hevodata.com/learn/databricks-secret/#51" target="_blank" rel="noopener"&gt;Azure Key Vault-Backed Scope&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A class="" href="https://hevodata.com/learn/databricks-secret/#52" target="_blank" rel="noopener"&gt;Databricks-Backed Scope&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://hevodata.com/learn/databricks-secret/#51" target="_blank" rel="noopener"&gt;Azure Key Vault-Backed Scope :&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Users can create a Secret Scope backed by the&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://azure.microsoft.com/en-in/services/key-vault/" target="_blank" rel="dofollow noopener nofollow external noreferrer"&gt;Azure Key Vault&lt;/A&gt;&lt;SPAN&gt;. It allows users to leverage all the Secrets in the corresponding Key Vault instance from a particular Secret Scope.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="" href="https://hevodata.com/learn/databricks-secret/#52" target="_blank" rel="noopener"&gt;Databricks-Backed Scope&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In this method, the Secret Scopes are managed with an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;internally encrypted&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;database&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;owned by the Databricks platform.&amp;nbsp;Users can create a Databricks-backed Secret Scope using the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.microsoft.com/en-us/azure/databricks/dev-tools/cli/" target="_blank" rel="noopener nofollow external noreferrer"&gt;Databricks CLI&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;This option would be viable for you in case if don't want to leverage the azure key vault option.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 12:10:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/creating-a-python-package-that-uses-dbutils-secrets/m-p/60192#M8896</guid>
      <dc:creator>BR_DatabricksAI</dc:creator>
      <dc:date>2024-02-14T12:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a python package that uses dbutils.secrets</title>
      <link>https://community.databricks.com/t5/get-started-discussions/creating-a-python-package-that-uses-dbutils-secrets/m-p/65018#M8897</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/99680"&gt;@samarth_solanki&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hello Databricks,&lt;BR /&gt;I wanted to create python package which has a python script which has a class , this class is where we give scope and key and we het the secret. This package will be used inside a databricks notebook&amp;nbsp;&lt;BR /&gt;I want to use dbutils.secret for this&lt;BR /&gt;Q1. I have used dbutils in my code , but when i import this package in notebook and run it it shows dbutils not defined, is it not possible it takes dbutils on itself when running this package in notebook.&lt;BR /&gt;Q2. Then I also added "from databricks.sdk.runtime import dbutils" but this throws error saying "cannot configure default auth"&lt;BR /&gt;I want to create this python package locally and run it in databricks notebook where it can use dbutils , what can i do?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hello, I have exactly the same issue (in my case I want to use dbutils.fs.ls). Did you find a solution?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 16:25:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/creating-a-python-package-that-uses-dbutils-secrets/m-p/65018#M8897</guid>
      <dc:creator>mfall-shift</dc:creator>
      <dc:date>2024-03-29T16:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a python package that uses dbutils.secrets</title>
      <link>https://community.databricks.com/t5/get-started-discussions/creating-a-python-package-that-uses-dbutils-secrets/m-p/83139#M8898</link>
      <description>&lt;P&gt;Same question. Did you ever get an answer for this?&lt;/P&gt;&lt;P&gt;I want to use databricks secrets inside my custom Python code. This is only necessary since based on this post (&lt;A href="https://community.databricks.com/t5/administration-architecture/aws-secrets-manager-access/td-p/50197" target="_blank" rel="noopener"&gt;https://community.databricks.com/t5/administration-architecture/aws-secrets-manager-access/td-p/50197&lt;/A&gt;), DBR &amp;gt; 12.2 LTS no longer allows the use of AWS Secret Manager&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 21:12:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/creating-a-python-package-that-uses-dbutils-secrets/m-p/83139#M8898</guid>
      <dc:creator>heiko_u</dc:creator>
      <dc:date>2024-08-15T21:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a python package that uses dbutils.secrets</title>
      <link>https://community.databricks.com/t5/get-started-discussions/creating-a-python-package-that-uses-dbutils-secrets/m-p/101626#M8899</link>
      <description>&lt;LI-CODE lang="python"&gt;from pyspark.dbutils import DBUtils
from pyspark.sql import SparkSession
 
spark = SparkSession.builder.getOrCreate()
dbutils = DBUtils(spark)&lt;/LI-CODE&gt;&lt;P&gt;Adding this to the module file solves the problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 15:13:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/creating-a-python-package-that-uses-dbutils-secrets/m-p/101626#M8899</guid>
      <dc:creator>krishnab</dc:creator>
      <dc:date>2024-12-10T15:13:41Z</dc:date>
    </item>
  </channel>
</rss>

