-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PD-5158: Databricks syncIdentityColumn
- Loading branch information
1 parent
beda2f5
commit 399aa15
Showing
3 changed files
with
132 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127 changes: 127 additions & 0 deletions
127
Content/change-types/databricks/sync-identity-column.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:searchable="False" MadCap:conditions="exclude.future-databricks"> | ||
<head><title><MadCap:variable name="Heading.Level1" /></title> | ||
<link rel="canonical" href="https://docs.liquibase.com/change-types/databricks/sync-identity-column.html" /> | ||
<meta name="description" content="Reference information for the syncIdentityColumn changetype. syncIdentityColumn is a changetype in the Liquibase Databricks Pro Source extension that synchronizes identity column metadata with actual data." /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
</head> | ||
<body> | ||
<h1 id="analyze-table"><code>syncIdentityColumn</code> | ||
</h1> | ||
<p><code class="language-text">syncIdentityColumn</code> is a <MadCap:variable name="General.changetypes" /> in the <a href="../../start/tutorials/databricks/home.htm"><MadCap:variable name="General.LBPro" /> Databricks extension</a> that synchronizes identity column metadata with actual data. It is available in the <MadCap:variable name="General.LBPro" /> Databricks extension 1.0.0 and later.</p> | ||
<h2>Uses</h2> | ||
<p>An identity column in Databricks defines the mechanism to create a unique identifier for each row in the table. It contains metadata like a <code class="language-text">start</code> and <code class="language-text">step</code> (increment) value.</p> | ||
<p>If you write your own values to an identity column, it might not comply with the metadata. You can use <code class="language-text">syncIdentityColumn</code> to evaluate the state and update the metadata to be consistent with the actual data you specified.</p> | ||
<p>For more information, see <a href="https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-ddl-alter-table-manage-column.html">ALTER TABLE … COLUMN clause</a>.</p> | ||
<h2>Run <code>syncIdentityColumn</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">tableName</code> | ||
</td> | ||
<td>String</td> | ||
<td> | ||
<MadCap:snippetText src="../../Z_Resources/Snippets/def/attributes/change-types/change-type-table-name.flsnp" /> containing the column to sync.</td> | ||
<td><b>Required</b> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><code class="language-text">columnName</code> | ||
</td> | ||
<td>String</td> | ||
<td> | ||
<MadCap:snippetText src="../../Z_Resources/Snippets/def/attributes/change-types/change-type-column-name.flsnp" /> to sync.</td> | ||
<td><b>Required</b> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><code class="language-text">catalogName</code> | ||
</td> | ||
<td>String</td> | ||
<td> | ||
<MadCap:snippetBlock src="../../Z_Resources/Snippets/def/attributes/change-types/change-type-catalog-name.flsnp" /> | ||
</td> | ||
<td>Optional</td> | ||
</tr> | ||
<tr> | ||
<td><code class="language-text">schemaName</code> | ||
</td> | ||
<td>String</td> | ||
<td> | ||
<MadCap:snippetBlock src="../../Z_Resources/Snippets/def/attributes/change-types/change-type-schema-name.flsnp" /> | ||
</td> | ||
<td>Optional</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<h2 id="examples">Examples</h2> | ||
<p class="note" MadCap:autonum="<b>Note: </b>">Rollback is not supported for <code>syncIdentityColumn</code>.</p> | ||
<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: | ||
- syncIdentityColumn: | ||
tableName: test_identity_table | ||
columnName: test_column</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": [ | ||
{ | ||
"syncIdentityColumn": { | ||
"tableName": "test_identity_table", | ||
"columnName": "test_column" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}</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" /> | ||
|
||
<changeSet id="2" author="your.name"> | ||
<databricks-pro:syncIdentityColumn tableName="test_identity_table" columnName="test_column"/> | ||
</changeSet> | ||
|
||
</databaseChangeLog></code></pre> | ||
</div> | ||
</div> | ||
<MadCap:snippetBlock src="../../Z_Resources/Snippets/text/change-type-databricks-database-support.flsnp" /> | ||
<h2>Related links</h2> | ||
<ul> | ||
<li><a href="https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-ddl-alter-table-manage-column.html">Databricks SQL Reference: ALTER TABLE … COLUMN clause</a> | ||
</li> | ||
</ul> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters