Skip to content

Commit

Permalink
PD-5302: Databricks alterViewProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-velonis1 committed Nov 13, 2024
1 parent 43ba795 commit 06fd179
Show file tree
Hide file tree
Showing 5 changed files with 160 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd">
<body>
<h3><code>setExtendedTableProperties</code>
</h3>
<p><b>Optional.</b>
</p>
<p>Specifies additional properties about the table.</p>
<p><code class="language-text">setExtendedTableProperties</code> has the following nested attributes:</p>
<ul>
<li><code class="language-text">tblProperties</code> (string) <b>(required)</b>: <MadCap:snippetText src="change-type-tbl-properties.flsnp"></MadCap:snippetText></li>
</ul>
<h3><code>unsetExtendedTableProperties</code>
</h3>
<p><b>Optional.</b>
</p>
<p>Removes additional properties that have previously been specified.</p>
<p><code class="language-text">unsetExtendedTableProperties</code> has the following nested attributes:</p>
<ul>
<li><code class="language-text">tblProperties</code> (string) <b>(required)</b>: <MadCap:snippetText src="change-type-tbl-properties.flsnp" /></li>
</ul>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,23 @@
<h3><MadCap:variable name="General.LBPro" /> and <MadCap:variable name="General.LBCommunity" /></h3>
<p>Databricks-specific <MadCap:variable name="General.changetypes" />s:</p>
<ul>
<li><code><MadCap:xref href="../../../change-types/databricks/analyze-table.html">analyzeTable</MadCap:xref></code>
</li>
<li><code><MadCap:xref href="../../../change-types/databricks/alter-cluster.html">alterCluster</MadCap:xref></code>
</li>
<li><code><MadCap:xref href="../../../change-types/databricks/alter-table-properties.html">alterTableProperties</MadCap:xref></code>
</li>
<li><code><MadCap:xref href="../../../change-types/databricks/optimize-table.html">optimizeTable</MadCap:xref></code>
</li>
<li><code><MadCap:xref href="../../../change-types/databricks/vacuum-table.html">vacuumTable</MadCap:xref></code>
<li><code><MadCap:xref href="../../../change-types/databricks/analyze-table.html">analyzeTable</MadCap:xref></code>:&#160;analyze a table to improve query performance</li>
<li><code><MadCap:xref href="../../../change-types/databricks/alter-cluster.html">alterCluster</MadCap:xref></code>: alter a clustered table</li>
<li><code><MadCap:xref href="../../../change-types/databricks/alter-table-properties.html">alterTableProperties</MadCap:xref></code>:&#160;alter existing properties on a table</li>
<li><code><MadCap:xref href="../../../change-types/databricks/alter-view-properties.html">alterViewProperties</MadCap:xref></code>: alter existing properties on a view</li>
<li><code><MadCap:xref href="../../../change-types/databricks/optimize-table.html">optimizeTable</MadCap:xref></code>:&#160;optimize table layout to improve performance</li>
<li><code><MadCap:xref href="../../../change-types/databricks/vacuum-table.html">vacuumTable</MadCap:xref></code>:&#160;remove unused files in a table directory</li>
</ul>
<p><MadCap:variable name="General.Liquibase" />&#160;<MadCap:variable name="General.changetypes" />s that accept Databricks sub-tags:</p>
<ul>
<li><code><MadCap:xref href="../../../change-types/create-table.html">createTable</MadCap:xref></code>
</li>
<li>createView?</li>
</ul>
<p>Databricks sub-tags for the <MadCap:variable name="General.Liquibase"></MadCap:variable>&#160;<code><MadCap:xref href="../../../change-types/create-table.html">createTable</MadCap:xref></code>&#160;<MadCap:variable name="General.changetypes"></MadCap:variable>:</p>
<p>Databricks sub-tags:</p>
<ul>
<li><code><MadCap:xref href="../../../change-types/databricks/nested-tags/cluster-columns.html">clusterColumns</MadCap:xref></code>: create a clustered table</li>
<li><code><MadCap:xref href="../../../change-types/databricks/nested-tags/extended-table-properties.html">extendedTableProperties</MadCap:xref></code>:&#160;specify additional properties on a table</li>
<li><code><MadCap:xref href="../../../change-types/databricks/nested-tags/extended-table-properties.html">extendedTableProperties</MadCap:xref></code>: specify additional properties on a table</li>
<li><code>partitionColumns</code>: create a partitioned table</li>
</ul>
<h3 MadCap:conditions="exclude.future-databricks"><MadCap:variable name="General.LBPro" />
Expand Down
19 changes: 1 addition & 18 deletions Content/change-types/databricks/alter-table-properties.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,7 @@ <h2 id="available-attributes">Available <MadCap:variable name="General.Param/Att
</tr>
</tbody>
</table>
<h3><code>setExtendedTableProperties</code>
</h3>
<p><b>Optional.</b>
</p>
<p>Specifies additional properties about the table.</p>
<p><code class="language-text">setExtendedTableProperties</code> has the following nested attributes:</p>
<ul>
<li><code class="language-text">tblProperties</code> (string) <b>(required)</b>: <MadCap:snippetText src="../../Z_Resources/Snippets/def/attributes/change-types/databricks/change-type-tbl-properties.flsnp" /></li>
</ul>
<h3><code>unsetExtendedTableProperties</code>
</h3>
<p><b>Optional.</b>
</p>
<p>Removes additional properties that have previously been specified.</p>
<p><code class="language-text">unsetExtendedTableProperties</code> has the following nested attributes:</p>
<ul>
<li><code class="language-text">tblProperties</code> (string) <b>(required)</b>: <MadCap:snippetText src="../../Z_Resources/Snippets/def/attributes/change-types/databricks/change-type-tbl-properties.flsnp" /></li>
</ul>
<MadCap:snippetBlock src="../../Z_Resources/Snippets/def/attributes/change-types/databricks/change-type-set-unset-extended-table-properties.flsnp" />
<h2 id="examples">Examples</h2>
<div class="js-tabs">
<ul class="js-tablist" data-hx="h3">
Expand Down
120 changes: 120 additions & 0 deletions Content/change-types/databricks/alter-view-properties.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:searchable="False">
<head><title><MadCap:variable name="Heading.Level1" /></title>
<link rel="canonical" href="https://docs.liquibase.com/change-types/databricks/alter-view-properties.html" />
<meta name="description" content="Reference information for the alterViewProperties changetype. alterViewProperties is a changetype in the Liquibase Open Source Databricks extension that alters the properties of a view." />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<MadCap:snippetBlock src="../../Z_Resources/Snippets/images/icon-pro-top.flsnp" />
<h1 id="alter-table-properties"><code>alterViewProperties</code>
</h1>
<p><code class="language-text">alterViewProperties</code> is a <MadCap:variable name="General.changetypes" /> in the <a href="../../start/tutorials/databricks/home.htm"><MadCap:variable name="General.LBCommunity" /> Databricks extension</a> that alters the properties of a view.</p>
<h2>Uses</h2>
<p>&#160;</p>
<h2>Run <code>alterViewProperties</code></h2>
<MadCap:snippetBlock src="../../Z_Resources/Snippets/text/change-type-run-syntax.flsnp" />
<h2 id="available-attributes">Available <MadCap:variable name="General.Param/Attribute" />s</h2>
<MadCap:snippetBlock src="../../Z_Resources/Snippets/note/database-required-attributes.flsnp" />
<table>
<col />
<col />
<col />
<col />
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Requirement</th>
</tr>
</thead>
<tbody>
<tr>
<td><code class="language-text">viewName</code>
</td>
<td>String</td>
<td>
<MadCap:snippetText src="../../Z_Resources/Snippets/def/attributes/change-types/change-type-view-name.flsnp" /> to alter view properties on.</td>
<td><b>Required</b>
</td>
</tr>
</tbody>
</table>
<MadCap:snippetBlock src="../../Z_Resources/Snippets/def/attributes/change-types/databricks/change-type-set-unset-extended-table-properties.flsnp" />
<h2 id="examples">Examples</h2>
<div class="js-tabs">
<ul class="js-tablist" data-hx="h3">
<li class="js-tablist__item"><a href="#yaml_example" id="label_yaml_example" class="js-tablist__link">YAML example</a>
</li>
<li class="js-tablist__item"><a href="#json_example" id="label_json_example" class="js-tablist__link">JSON example</a>
</li>
<li class="js-tablist__item"><a href="#xml_example" id="label_xml_example" class="js-tablist__link">XML example</a>
</li>
</ul>
<div id="yaml_example" class="js-tabcontent"><pre xml:space="preserve"><code class="language-yaml">databaseChangeLog:
- changeSet:
id: 2
author: your.name
changes:
- alterViewProperties:
viewName: test_alter_view_properties
setExtendedTableProperties:
tblProperties: "'external.location'='s3://mybucket/mytable','this.is.my.key'=12,'this.is.my.key2'=true"
rollback:
- alterViewProperties:
viewName: test_alter_view_properties
unsetExtendedTablePropeties:
tblProperties: "'external.location', 'this.is.my.key','this.is.my.key2'"</code></pre>
</div>
<div id="json_example" class="js-tabcontent"><pre xml:space="preserve"><code class="language-json">{
"databaseChangeLog": [
{
"changeSet": {
"id": "2",
"author": "your.name",
"changes": [
{
"alterViewProperties": {
"viewName": "test_alter_view_properties",
"setExtendedTableProperties": {
"tblProperties": "'external.location'='s3://mybucket/mytable','this.is.my.key'=12,'this.is.my.key2'=true"
}
}
}
],
"rollback": [
{
"alterViewProperties": {
"viewName": "test_alter_view_properties",
"unsetExtendedTableProperties": {
"tblProperties": "'external.location', 'this.is.my.key','this.is.my.key2'"
}
}
}
]
}
}
]
}</code></pre>
</div>
<div id="xml_example" class="js-tabcontent"><pre xml:space="preserve"><code class="language-xml"><MadCap:snippetText src="../../Z_Resources/Snippets/code/liquibase-xsd-xml-changelog-databricks.flsnp" />

&lt;changeSet id="2" author="your.name"&gt;
&lt;databricks:alterViewProperties viewName="test_alter_view_properties"&gt;
&lt;databricks:setExtendedTableProperties tblProperties="'external.location'='s3://mybucket/mytable','this.is.my.key'=12,'this.is.my.key2'=true"/&gt;
&lt;/databricks:alterViewProperties&gt;

&lt;rollback&gt;
&lt;databricks:alterViewProperties viewName="test_alter_view_properties"&gt;
&lt;databricks:unsetExtendedTableProperties tblProperties="'external.location', 'this.is.my.key','this.is.my.key2'"/&gt;
&lt;/databricks:alterViewProperties&gt;
&lt;/rollback&gt;
&lt;/changeSet&gt;

&lt;/databaseChangeLog&gt;</code></pre>
</div>
</div>
<MadCap:snippetBlock src="../../Z_Resources/Snippets/text/change-type-databricks-database-support.flsnp" />
</body>
</html>
3 changes: 3 additions & 0 deletions Project/TOCs/TOC.fltoc
Original file line number Diff line number Diff line change
Expand Up @@ -1253,6 +1253,9 @@
<TocEntry
Title="[%=System.LinkedHeader%]"
Link="/Content/change-types/databricks/alter-table-properties.html" />
<TocEntry
Title="[%=System.LinkedHeader%]"
Link="/Content/change-types/databricks/alter-view-properties.html" />
<TocEntry
Title="[%=System.LinkedHeader%]"
Link="/Content/change-types/databricks/analyze-table.html" />
Expand Down

0 comments on commit 06fd179

Please sign in to comment.