<?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 Help with cookiecutter Prompts in Databricks Notebooks in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/help-with-cookiecutter-prompts-in-databricks-notebooks/m-p/99047#M2323</link>
    <description>&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Hi everyone! I’m working on using cookiecutter to help us set up consistent project templates on Databricks. So far, it’s mostly working, but I’m struggling with the prompts – they’re not displaying well in the Databricks environment.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;I’ve tried some workarounds, but I’m hoping someone has a simpler solution or knows of any future updates to improve compatibility in notebook environment.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Here’s what I’ve done so far:&lt;/P&gt;&lt;DIV class=""&gt;&lt;PRE&gt;def get_user_input():
   project_date = input("What is your project date? YYYYMMDD: ")
   client = input("What is your client name?: ")
   id_project = input("What is your project ID? XXX: ")
   return {
       "project_date ": project_date ,
       "client": client ,
       "id_project ": id_project 
   }

cookiecutter(
    repo_url,
    directory='databricks',
    no_input=True,
    extra_context=get_user_input()
)&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;I’m looking for tips on making these prompts more user-friendly and avoiding repeated input requests. If anyone has done something similar or has tips for handling cookiecutter in Databricks, I’d really appreciate your advice!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 17 Nov 2024 16:25:28 GMT</pubDate>
    <dc:creator>vieiralaura</dc:creator>
    <dc:date>2024-11-17T16:25:28Z</dc:date>
    <item>
      <title>Help with cookiecutter Prompts in Databricks Notebooks</title>
      <link>https://community.databricks.com/t5/administration-architecture/help-with-cookiecutter-prompts-in-databricks-notebooks/m-p/99047#M2323</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Hi everyone! I’m working on using cookiecutter to help us set up consistent project templates on Databricks. So far, it’s mostly working, but I’m struggling with the prompts – they’re not displaying well in the Databricks environment.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;I’ve tried some workarounds, but I’m hoping someone has a simpler solution or knows of any future updates to improve compatibility in notebook environment.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Here’s what I’ve done so far:&lt;/P&gt;&lt;DIV class=""&gt;&lt;PRE&gt;def get_user_input():
   project_date = input("What is your project date? YYYYMMDD: ")
   client = input("What is your client name?: ")
   id_project = input("What is your project ID? XXX: ")
   return {
       "project_date ": project_date ,
       "client": client ,
       "id_project ": id_project 
   }

cookiecutter(
    repo_url,
    directory='databricks',
    no_input=True,
    extra_context=get_user_input()
)&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;I’m looking for tips on making these prompts more user-friendly and avoiding repeated input requests. If anyone has done something similar or has tips for handling cookiecutter in Databricks, I’d really appreciate your advice!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Nov 2024 16:25:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/help-with-cookiecutter-prompts-in-databricks-notebooks/m-p/99047#M2323</guid>
      <dc:creator>vieiralaura</dc:creator>
      <dc:date>2024-11-17T16:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help with cookiecutter Prompts in Databricks Notebooks</title>
      <link>https://community.databricks.com/t5/administration-architecture/help-with-cookiecutter-prompts-in-databricks-notebooks/m-p/129008#M3913</link>
      <description>&lt;P&gt;Hi! Great initiative using cookiecutter to standardize project templates on Databricks — I’ve been exploring similar workflows.&lt;/P&gt;&lt;P&gt;I ran into the same issue with prompts not displaying well in the notebook environment. One workaround I found effective was running cookiecutter directly in a notebook cell without custom input() functions. Databricks does support interactive prompts to some extent, especially when using %pip install followed by a Python restart (dbutils.library.restartPython()), and then calling cookiecutter() with the template URL.&lt;/P&gt;&lt;P&gt;Here’s a snippet that worked for me:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;from cookiecutter.main import cookiecutter

cookiecutter(
    'https://github.com/drivendata/cookiecutter-data-science',
    checkout='v1'
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This approach triggers the built-in prompts from the template, and they seem to work more reliably than custom input() calls. It also avoids repeated input requests since cookiecutter handles the flow internally.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Aug 2025 15:57:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/help-with-cookiecutter-prompts-in-databricks-notebooks/m-p/129008#M3913</guid>
      <dc:creator>guigasque</dc:creator>
      <dc:date>2025-08-20T15:57:15Z</dc:date>
    </item>
  </channel>
</rss>

