Showing posts with label Extract. Show all posts
Showing posts with label Extract. Show all posts

Thursday, February 10, 2022

Migration Steps

Hello Friends,

Welcome back with another post. Today, we will discuss about the steps that needs to be followed during any migration. Let's see-

  1. Evaluate
    1. This is the primary step or a Pre Migration Step.Here, we evaluate the intent of migration and define a scope for the data that needs to be migrated. It includes-
      1. Data Source
      2. Data Types
      3. Quantify Packages
  2. Plan
    1. This the stage where we define the strategy for data migration. It includes-
      1. Plan migration strategy
      2. Plan downtime
      3. Master data source identification
      4. Plan the data cleaning
      5. Destination data source identification
      6. Plan the data verification
  3. Extract
    1. This is the stage where we define and perform the data extraction from data source(s). Normally, we use Intermediate database (Staging Database) here. It includes-
      1. Creating packages to extract
      2. Simplify data at source or at intermediate database
  4. Clean
    1. This is the stage where we cleanup the data before loading to the actual data base. Cleaning is a continuous process. We can perform this process in parallel to other steps as well and at stage. It includes-
      1. Identify & Remove duplicate data
      2. Remove Garbage data
  5. Load
    1. This is the stage where actual process of loading the data into production database is performed. This stage is very crucial and needs extensive planning. We need to ensure that the stage should have a minimal impact upon users as well as upon business continuity. It includes-
      1. Loading small set of data
      2. Ensure everything is OK
      3. Push rest of the data
      4. Process can be done in using iterative approach
  6. Verify
    1. This is the final stage of migration or a Post Migration Step. Verification of migrated data is also crucial and a continuous process. It is better to include a Business Application Data Expert to validate the data at different stages. Validation is required-
      1. When data is extracted to ensure all the requisite data is accounted for
      2. When cleanup is done to ensure relevant data is not removed
      3. When data is loaded to ensure all data is loaded in correct and accurate manner



With this, I am concluding this post.
Happy Coding !!!
Will see you again with some new topics.

Stay Safe !
Stay Healthy !

Tuesday, October 5, 2021

PowerApps: CheckBox (Extract Selected Items)

 Hello Friends,

Welcome back with another post on PowerApps. Today, we will discuss about CheckBox control. Sometimes we have a situation where, we have to extract the selected checkbox values to show somewhere else. Means, the moment, we select a check box, it should get reflect in another gallery (where only selected values are getting shown). Upon Check/Uncheck of each item, this gallery should be updated. Let's see, how can we achieve this-

  1. Create a blank PowerApps. I am creating a tablet mode PowerApp.
  2. Now add a button and a vertical blank gallery.
  3. Choose the OnSelect property of button and define a collection which will be used as data source for the gallery. Name this collection as "collCheckBoxData". Now define another collection which will be used to hold the selected checkboxes values. Name it "collCheckBoxDataSelected". Also define two variables
    1. "varResetCheckBox" - This variable will be used to reset the check boxes checked status when we click on Load Data button.
    2. "varCheckedItems" - This variable will be used to hold the concatenated value of selected check boxes. (This is additional feature, we will discuss, where we will concatenate the values of selected check boxes  (delimiter based) so that we can save it in data source.
  4. The complete code is (you can map with color codes 😊)-
  5. ClearCollect(
        collCheckBoxData,
        {Title: "India"},
        {Title: "Russia"},
        {Title: "America"},
        {Title: "Japan"},
        {Title: "Brazil"},
        {Title: "China"},
        {Title: "South Korea"}
    );
    ClearCollect(
        collCheckBoxDataSelected,
        []
    );
    UpdateContext({varResetCheckBox: true});
    UpdateContext({varCheckedItems: ""});
    

  6. Now click on button using ALT key so that the function gets executed and the collection and variables could get initialized.
  7. Now edit the gallery we have added by clicking on edit icon as shown in below screenshot and add a checkbox.
  8. Set the template size to 60.
  9. Now we have to bind the data to this check box. For that, first we will bind collection with gallery.
  10. For this, click on gallery and set the Items property of gallery to "collCheckBoxData".
  11. Now again edit the template and click on Checkbox and set the Text property to ThisItem.Title.

  12. Now we have to apply some functions on OnCheck & OnUncheck property of checkbox.
  13. First, we will write function for OnCheck property. The objective is upon Checkbox checked event, we will check if this checkbox text is available in Selected Checkbox Data collection "collCheckBoxDataSelected". If not, then we will add it.
  14. Additionally, we will concatenate all selected text and will show in a label.
  15. Then we will set ResetCheckBox variable value to false. The complete code is-
  16. ForAll(
        Gallery2.AllItems,
        If(
            Checkbox2.Value = true,
            If(
                CountA(
                    Filter(
                        collCheckBoxDataSelected,
                        Title = Checkbox2.Text
                    )
                ) = 0,
                Collect(
                    collCheckBoxDataSelected,
                    {Title: Checkbox2.Text}
                );
            )
        )
    );
    UpdateContext({varCheckedItems: ""});
    UpdateContext(
        {
            varCheckedItems: Concat(
                collCheckBoxDataSelected.Title,
                Concatenate(
                    Title,
                    ";"
                )
            )
        }
    );
    UpdateContext({varResetCheckBox: false});
    
  17. Similarly, we will write function for OnUncheck property. The objective is upon Checkbox checked event, we will remove unchecked box text from the Selected Checkbox Data collection "collCheckBoxDataSelected". 
  18. Additionally, we will concatenate all selected text and will show in a label.
  19. Then we will set ResetCheckBox variable value to false. The complete code is-
  20. ForAll(
        Gallery2.AllItems,
        If(
            Checkbox2.Value = false,
            RemoveIf(
                collCheckBoxDataSelected,
                Title = Checkbox2.Text
            )
        )
    );
    UpdateContext({varCheckedItems: ""});
    UpdateContext(
        {
            varCheckedItems: Concat(
                collCheckBoxDataSelected.Title,
                Concatenate(
                    Title,
                    ";"
                )
            )
        }
    );
    UpdateContext({varResetCheckBox: false});
    
  21. Next we will update the Reset property of check box. Set this property with variable "varResetCheckBox".
  22. Major part has been done. Now we have to show the data of checkboxes, we have selected. For this we will add another vertical blank gallery.

  23. Set the data source as "collCheckBoxDataSelected"; Layout as "Title"; Fields as "Title". In case, if you don't find the fields to bind, just save and play the app and click on Load Data and then select any checkbox. It will load data in "collCheckBoxDataSelected". Now stop the app and assign the field.
  24. This way we have achieved the functionality.
  25. Now play the app

  26. Lastly, we have to display the concatenated value. For this, we will add a label and set it's Text property to the variable "varCheckedItems".

  27. The final screenshot 😊-
  28. Checkboxes selection-
  29. Checkboxes un-selection-
  30. Load Data (making all gallery and checkboxes in reset mode)-
  31. This way, you can implement such type of Checkbox functionality.
With this, I am concluding this post.
Happy Coding !!!
Will see you again with some new topics.

Stay Safe !
Stay Healthy !