<?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: Deploying existing queries and alerts to other workspaces in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/deploying-existing-queries-and-alerts-to-other-workspaces/m-p/38242#M26587</link>
    <description>&lt;P&gt;The API allows me to create queries, but apparently not to recreate existing queries it seems ? For example the API does not allow me to recreate the schedule of a query right ?&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jul 2023 06:16:49 GMT</pubDate>
    <dc:creator>erigaud</dc:creator>
    <dc:date>2023-07-24T06:16:49Z</dc:date>
    <item>
      <title>Deploying existing queries and alerts to other workspaces</title>
      <link>https://community.databricks.com/t5/data-engineering/deploying-existing-queries-and-alerts-to-other-workspaces/m-p/38083#M26557</link>
      <description>&lt;P&gt;I have several queries and associated alerts in a workspace, and I would like to be able to deploy them to an other workspace, for example an higher environment.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since both queries and objects are not supported in repos, what is the way to go to easily recreate queries/alerts somewhere else ?&lt;/P&gt;&lt;P&gt;I saw a very similar post on the community that recommended using the API, so my question is : is there a way to export an existing query/alert to json to easily recreate it through the API (in a similar fashion as to a job) ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, could Unity Catalog be of any help for this task ?&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2023 06:45:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deploying-existing-queries-and-alerts-to-other-workspaces/m-p/38083#M26557</guid>
      <dc:creator>erigaud</dc:creator>
      <dc:date>2023-07-21T06:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying existing queries and alerts to other workspaces</title>
      <link>https://community.databricks.com/t5/data-engineering/deploying-existing-queries-and-alerts-to-other-workspaces/m-p/38182#M26570</link>
      <description>&lt;P&gt;It is possible to do this via API. With the API you can:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;List the queries from a workspace:&amp;nbsp;&lt;A href="https://docs.databricks.com/api/azure/workspace/queries/list" target="_blank"&gt;https://docs.databricks.com/api/azure/workspace/queries/list&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Get a specific query from a workspace:&amp;nbsp;&lt;A href="https://docs.databricks.com/api/azure/workspace/queries/get" target="_blank"&gt;https://docs.databricks.com/api/azure/workspace/queries/get&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Create a new query definition in the target workspace:&amp;nbsp;&lt;A href="https://docs.databricks.com/api/azure/workspace/queries/create" target="_blank"&gt;https://docs.databricks.com/api/azure/workspace/queries/create&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;With alerts you can do something similar:&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;List:&amp;nbsp;&lt;A href="https://docs.databricks.com/api/azure/workspace/alerts/list" target="_blank"&gt;https://docs.databricks.com/api/azure/workspace/alerts/list&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Get:&amp;nbsp;&lt;A href="https://docs.databricks.com/api/azure/workspace/alerts/get" target="_blank"&gt;https://docs.databricks.com/api/azure/workspace/alerts/get&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Create:&amp;nbsp;&lt;A href="https://docs.databricks.com/api/azure/workspace/alerts/create" target="_blank"&gt;https://docs.databricks.com/api/azure/workspace/alerts/create&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2023 19:26:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deploying-existing-queries-and-alerts-to-other-workspaces/m-p/38182#M26570</guid>
      <dc:creator>btafur</dc:creator>
      <dc:date>2023-07-21T19:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying existing queries and alerts to other workspaces</title>
      <link>https://community.databricks.com/t5/data-engineering/deploying-existing-queries-and-alerts-to-other-workspaces/m-p/38211#M26577</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/84270"&gt;@erigaud&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We haven't heard from you since the last response from &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/53402"&gt;@btafur&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;, and I was checking back to see if her suggestions helped you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Or else, If you have any solution, please share it with the community, as it can be helpful to others.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, Please don't forget to click on the "Select As Best" button whenever the information provided helps resolve your question.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jul 2023 04:22:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deploying-existing-queries-and-alerts-to-other-workspaces/m-p/38211#M26577</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-23T04:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying existing queries and alerts to other workspaces</title>
      <link>https://community.databricks.com/t5/data-engineering/deploying-existing-queries-and-alerts-to-other-workspaces/m-p/38242#M26587</link>
      <description>&lt;P&gt;The API allows me to create queries, but apparently not to recreate existing queries it seems ? For example the API does not allow me to recreate the schedule of a query right ?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 06:16:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deploying-existing-queries-and-alerts-to-other-workspaces/m-p/38242#M26587</guid>
      <dc:creator>erigaud</dc:creator>
      <dc:date>2023-07-24T06:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying existing queries and alerts to other workspaces</title>
      <link>https://community.databricks.com/t5/data-engineering/deploying-existing-queries-and-alerts-to-other-workspaces/m-p/38268#M26591</link>
      <description>&lt;P&gt;It is not explicitly stated in the Docs but there is a "schedule" option in the payload for a query definition with the following structure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;schedule {&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;cron : 2 55 9 ? * 2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;time : null&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;until : null&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;version : 2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;interval : null&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;day_of_week : null&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The best way of knowing the full structure of the query definition is to use the API to GET the query definition of an existing query that has the "schedule" enabled.&amp;nbsp;&lt;A href="https://docs.databricks.com/api/azure/workspace/queries/get" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.databricks.com/api/azure/workspace/queries/get&lt;/A&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;You should be able to recreate all the options via the API.&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Jul 2023 10:06:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deploying-existing-queries-and-alerts-to-other-workspaces/m-p/38268#M26591</guid>
      <dc:creator>btafur</dc:creator>
      <dc:date>2023-07-24T10:06:45Z</dc:date>
    </item>
  </channel>
</rss>

