-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Task/RDMP-248 data load allow specials (#1992)
* add sql changes * add toggle * add missing files * add changelog * fix typo * update imports
- Loading branch information
Showing
15 changed files
with
88 additions
and
14 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,25 @@ | ||
# Reserved Column Prefixes | ||
By default RDMP uses the prefix "hic_" for internally important columns. | ||
We advise that you typically don't use the prefix in your table schemas. | ||
|
||
## Data Loads | ||
By default, RDMP will not import a column stating with "hic" in the RAW stage of a data load. | ||
If you want to bypass this for whatever reason, you can allow this type of column on a Dataload by Dataload basis. | ||
|
||
Via the CLI: | ||
``` | ||
./rdmp.exe ToggleAllowReservedPrefixForLoadMetadata LoadMedata:<id> | ||
``` | ||
|
||
|
||
Via the UI: | ||
Right Click on a Data Load. | ||
|
||
There will be a menu option that says "Allow Reserved Prefix Columns" or "Drop Reserved Prefix Columns" depending on the current configuration. | ||
|
||
![Attachers Location](./Images/AllowReservedPrefixColumns.PNG) | ||
|
||
|
||
Selecting "Allow..." will enable "hic_" prefixed columns to be imported during a data load. | ||
|
||
Selecting "Drop..." will prevent "hic_" prefixed columns from being imported during a data load |
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
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
21 changes: 21 additions & 0 deletions
21
...CommandExecution/AtomicCommands/ExecuteCommandToggleAllowReservedPrefixForLoadMetadata.cs
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,21 @@ | ||
using Rdmp.Core.Curation.Data; | ||
using Rdmp.Core.Curation.Data.DataLoad; | ||
|
||
namespace Rdmp.Core.CommandExecution.AtomicCommands; | ||
|
||
public class ExecuteCommandToggleAllowReservedPrefixForLoadMetadata : BasicCommandExecution | ||
{ | ||
private LoadMetadata _loadMetadata; | ||
public ExecuteCommandToggleAllowReservedPrefixForLoadMetadata([DemandsInitialization("The LoadMetadata to update")] LoadMetadata loadMetadata) | ||
{ | ||
|
||
_loadMetadata = loadMetadata; | ||
} | ||
|
||
public override void Execute() | ||
{ | ||
base.Execute(); | ||
_loadMetadata.AllowReservedPrefix = !_loadMetadata.AllowReservedPrefix; | ||
_loadMetadata.SaveToDatabase(); | ||
} | ||
} |
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
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
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
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
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
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
8 changes: 8 additions & 0 deletions
8
Rdmp.Core/Databases/CatalogueDatabase/up/086_AddDataLoadPrefixOverride.sql
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,8 @@ | ||
--Version: 8.2.4 | ||
--Description: Add ability to allow data loads to import columns with the reserved column _hic | ||
|
||
if not exists (select 1 from sys.columns where name = 'AllowReservedPrefix' and OBJECT_NAME(object_id) = 'LoadMetadata') | ||
BEGIN | ||
ALTER TABLE [dbo].[LoadMetadata] | ||
ADD AllowReservedPrefix [bit] NOT NULL DEFAULT 0 WITH VALUES | ||
END |
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
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