2.90:Database Export: Difference between revisions
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
Database Export is one of the main ways to '''[[Five Phases of Grooper|Deliver]]''' data '''[[Five Phases of Grooper|Collected]]''' in Grooper.</blockquote> | Database Export is one of the main ways to '''[[Five Phases of Grooper|Deliver]]''' data '''[[Five Phases of Grooper|Collected]]''' in Grooper.</blockquote> | ||
A completed '''Content Model''' and accompanying '''Batch''' for what will be built can be found '''[[Media:Database Export.zip|here]]'''. It is not required to download to understand this article, but can be helpful because it can be used to follow along with the content of this article. ''This file was exported from and meant for use in Grooper 2.9'' | A completed '''[[Content Model]]''' and accompanying '''[[Batch]]''' for what will be built can be found '''[[Media:Database Export.zip|here]]'''. It is not required to download to understand this article, but can be helpful because it can be used to follow along with the content of this article. ''This file was exported from and meant for use in Grooper 2.9'' | ||
==About== | ==About== | ||
| Line 29: | Line 29: | ||
|| [[File:database_export_002.png|1000px]] | || [[File:database_export_002.png|1000px]] | ||
|} | |} | ||
< | <br/><br/> | ||
{| | {| | ||
| style="padding:25px; vertical-align:top" | | | style="padding:25px; vertical-align:top" | | ||
| Line 41: | Line 41: | ||
| style="padding:25px; vertical-align:top" | | | style="padding:25px; vertical-align:top" | | ||
The '''Content Model''' extracting the data for these documents is fairly straight forward. There are two '''Document Types''', each with their own '''Data Model'''. | The '''Content Model''' extracting the data for these documents is fairly straight forward. There are two '''Document Types''', each with their own '''Data Model'''. | ||
< | <br/> | ||
The first '''Data Model''' is the one representing the one-to-many relationship. Notice for the fields represented once in the document there are '''Data Fields'''. For the tabular data, a '''Data Table''' was established. | The first '''Data Model''' is the one representing the one-to-many relationship. Notice for the fields represented once in the document there are '''Data Fields'''. For the tabular data, a '''Data Table''' was established. | ||
< | <br/> | ||
The second '''Data Model''' is using one table extractor to collect all the data, but reporting it to two different tables. | The second '''Data Model''' is using one table extractor to collect all the data, but reporting it to two different tables. | ||
|| [[File:database_export_004.gif]] | || [[File:database_export_004.gif]] | ||
| Line 50: | Line 50: | ||
<tab name="Index Data" style="margin:25px"> | <tab name="Index Data" style="margin:25px"> | ||
====Index Data==== | ====Index Data==== | ||
Before the '''Database Export''' activity can send data, it must have data. It's easy to get in the habit of testing extraction on a '''Data Field''' or a '''Data Model''' and feel good about the results, but it must be understood that the information displayed when doing so is in memory, or temporary. When the '''Extract''' activity is successfully run against a document it creates '''Index Data''' and marries it to the document via a [https://en.wikipedia.org/wiki/JSON JSON] file called ''Grooper.DocumentData.json''. A couple of ways to verify its existence are as follows.< | Before the '''Database Export''' activity can send data, it must have data. It's easy to get in the habit of testing extraction on a '''Data Field''' or a '''Data Model''' and feel good about the results, but it must be understood that the information displayed when doing so is in memory, or temporary. When the '''Extract''' activity is successfully run against a document it creates '''Index Data''' and marries it to the document via a [https://en.wikipedia.org/wiki/JSON JSON] file called ''Grooper.DocumentData.json''. A couple of ways to verify its existence are as follows.<br/> | ||
{| | {| | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center" | | ||
| Line 58: | Line 58: | ||
|| [[File:database_export_005a.png|1000px]] | || [[File:database_export_005a.png|1000px]] | ||
|} | |} | ||
< | <br/><br/> | ||
{| | {| | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center" | | ||
| Line 71: | Line 71: | ||
<tab name="Configuring a Data Connection" style="margin:25px"> | <tab name="Configuring a Data Connection" style="margin:25px"> | ||
====Configuring a Data Connection==== | ====Configuring a Data Connection==== | ||
In order for the '''Database Export''' activity to run, it needs an established connection to a database and subsequent table(s). '''Grooper''' can connect to an existing database and import references to its tables, or easily enough, you can have '''Grooper''' create the database FOR you AND create tables based on data structures present in '''Grooper'''!< | In order for the '''Database Export''' activity to run, it needs an established connection to a database and subsequent table(s). '''Grooper''' can connect to an existing database and import references to its tables, or easily enough, you can have '''Grooper''' create the database FOR you AND create tables based on data structures present in '''Grooper'''!<br/> | ||
The following setup will have '''Grooper''' create the database and its tables.< | The following setup will have '''Grooper''' create the database and its tables.<br/> | ||
It is worth noting that this article cannot tell you specifics about permissions in your environment. The configuration for this article is using Microsoft SQL Server, not ODBC, and has given the active Active Directory user full DB Admin privileges to the SQL environment. | It is worth noting that this article cannot tell you specifics about permissions in your environment. The configuration for this article is using Microsoft SQL Server, not ODBC, and has given the active Active Directory user full DB Admin privileges to the SQL environment. | ||
{| | {| | ||
| Line 85: | Line 85: | ||
|| [[File:database_export_006a.png|1000px]] | || [[File:database_export_006a.png|1000px]] | ||
|} | |} | ||
< | <br/><br/> | ||
With a connection to the SQL environment established, we can make '''Grooper''' create our database for us. | With a connection to the SQL environment established, we can make '''Grooper''' create our database for us. | ||
{| | {| | ||
| Line 94: | Line 94: | ||
|| [[File:database_export_006b.png|1000px]] | || [[File:database_export_006b.png|1000px]] | ||
|} | |} | ||
< | <br/><br/> | ||
This '''Data Connection''' is not complete until a table references has been imported (this particular '''Data Connection''' will end up with three table references). A database has been created and is connected to, and '''Grooper''' did the work for us there, so let's keep that up to get tables made. Three different tables need to be created and references imported, due to the two different '''Document Types''' and the subsequent '''Data Models''' (the second '''Document Type''' containing a '''Data Model''' with two '''Data Tables'''). The following process will describe importing the first table, and will simply need to be repeated for the second and third tables (of which will not consist of the same inheritance notions discussed on step 5 because the scope considered for the '''Database Export 02''' '''Document Type''' has '''Data Tables''' and no '''Data Fields'''.) | This '''Data Connection''' is not complete until a table references has been imported (this particular '''Data Connection''' will end up with three table references). A database has been created and is connected to, and '''Grooper''' did the work for us there, so let's keep that up to get tables made. Three different tables need to be created and references imported, due to the two different '''Document Types''' and the subsequent '''Data Models''' (the second '''Document Type''' containing a '''Data Model''' with two '''Data Tables'''). The following process will describe importing the first table, and will simply need to be repeated for the second and third tables (of which will not consist of the same inheritance notions discussed on step 5 because the scope considered for the '''Database Export 02''' '''Document Type''' has '''Data Tables''' and no '''Data Fields'''.) | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 134: | Line 134: | ||
<tab name="Configuring Database Export Activity" style="margin:25px"> | <tab name="Configuring Database Export Activity" style="margin:25px"> | ||
====Configuring Database Export Activity==== | ====Configuring Database Export Activity==== | ||
Data collected. Connection to database established. Now it's time to configure the activity that will send the data to its final destination.< | Data collected. Connection to database established. Now it's time to configure the activity that will send the data to its final destination.<br/> | ||
{| class="wikitable" | {| class="wikitable" | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center" | | ||
| Line 160: | Line 160: | ||
# The column on the left represents the data elements of the scope selected, in this case the '''Earnings''' '''Data Table''' and its inherited '''Data Fields'''. The column on the right represents the columns of information from the '''Database Table''' object created and imported previously. Because the table in the database was created by '''Grooper''' based on this schema, the column names should match. One by one (or use the '''Auto Map...''' object command) match these columns up. | # The column on the left represents the data elements of the scope selected, in this case the '''Earnings''' '''Data Table''' and its inherited '''Data Fields'''. The column on the right represents the columns of information from the '''Database Table''' object created and imported previously. Because the table in the database was created by '''Grooper''' based on this schema, the column names should match. One by one (or use the '''Auto Map...''' object command) match these columns up. | ||
|| [[File:database_export_008d.png|1000px]] | || [[File:database_export_008d.png|1000px]] | ||
|}< | |}<br/><br/> | ||
{| | {| | ||
| style="padding:25px; vertical-align:top" | | | style="padding:25px; vertical-align:top" | | ||
The '''Database Export''' activity that was just established is specific to the table configured because it is contained within the narrow bounds of that particular '''Content Type'''. Two other tables need to be mapped however. To do this, because they exist within the bounds of a different '''Content Type''', another '''Database Export''' activity needs to be established.< | The '''Database Export''' activity that was just established is specific to the table configured because it is contained within the narrow bounds of that particular '''Content Type'''. Two other tables need to be mapped however. To do this, because they exist within the bounds of a different '''Content Type''', another '''Database Export''' activity needs to be established.<br/> | ||
The good news is that the remaining two tables are both relative to the same '''Content Type'''. Considering this, both tales can be mapped within on '''Database Export''' activity. The process for doing so is exactly like what was just done, with the only difference being you can add another entry to the '''Export Mapping Collection Editor''' window.< | The good news is that the remaining two tables are both relative to the same '''Content Type'''. Considering this, both tales can be mapped within on '''Database Export''' activity. The process for doing so is exactly like what was just done, with the only difference being you can add another entry to the '''Export Mapping Collection Editor''' window.<br/> | ||
This concept is novel and is extrememly useful as you work with more and more complex data structures. | This concept is novel and is extrememly useful as you work with more and more complex data structures. | ||
|| [[File:database_export_009.png|1000px]] | || [[File:database_export_009.png|1000px]] | ||
| Line 187: | Line 187: | ||
|| [[File:database_export_010b.png|1000px]] | || [[File:database_export_010b.png|1000px]] | ||
|} | |} | ||
< | <br/><br/> | ||
{| | {| | ||
| style="padding:25px; vertical-align:top" | | | style="padding:25px; vertical-align:top" | | ||
Revision as of 12:45, 23 April 2020
Database Export is one of the main ways to Deliver data Collected in Grooper.
A completed Content Model and accompanying Batch for what will be built can be found here. It is not required to download to understand this article, but can be helpful because it can be used to follow along with the content of this article. This file was exported from and meant for use in Grooper 2.9
About
The most important goal of Grooper is to deliver accurate data to line of business systems that allow the information to be integrated into impactful business decisioning. Tables in databases remain, to this day, one of the main vessels by which this information is stored. Grooper's Database Export activity is the mechanism by which this delivery is performed. Database Export uses a configured Data Connection to establish a link to (Microsoft SQL Server or ODBC-compliant) tables in a database and intelligently populate said tables.
Two key distinctions about Grooper's Database Export activity are its ability to take full advantage of its sophisticated hierarchical data modeling to flatten complex/inherited data structures, and the ease of delivery to multiple tables at once.
How To
| ! | Some of the tabs in this tutorial are longer than the others. Please scroll to the bottom of each step's tab before going to the step. |
Understanding the Forms
Understanding the Content Model
Index Data
Before the Database Export activity can send data, it must have data. It's easy to get in the habit of testing extraction on a Data Field or a Data Model and feel good about the results, but it must be understood that the information displayed when doing so is in memory, or temporary. When the Extract activity is successfully run against a document it creates Index Data and marries it to the document via a JSON file called Grooper.DocumentData.json. A couple of ways to verify its existence are as follows.
Configuring a Data Connection
In order for the Database Export activity to run, it needs an established connection to a database and subsequent table(s). Grooper can connect to an existing database and import references to its tables, or easily enough, you can have Grooper create the database FOR you AND create tables based on data structures present in Grooper!
The following setup will have Grooper create the database and its tables.
It is worth noting that this article cannot tell you specifics about permissions in your environment. The configuration for this article is using Microsoft SQL Server, not ODBC, and has given the active Active Directory user full DB Admin privileges to the SQL environment.
With a connection to the SQL environment established, we can make Grooper create our database for us.
This Data Connection is not complete until a table references has been imported (this particular Data Connection will end up with three table references). A database has been created and is connected to, and Grooper did the work for us there, so let's keep that up to get tables made. Three different tables need to be created and references imported, due to the two different Document Types and the subsequent Data Models (the second Document Type containing a Data Model with two Data Tables). The following process will describe importing the first table, and will simply need to be repeated for the second and third tables (of which will not consist of the same inheritance notions discussed on step 5 because the scope considered for the Database Export 02 Document Type has Data Tables and no Data Fields.)
Configuring Database Export Activity
Data collected. Connection to database established. Now it's time to configure the activity that will send the data to its final destination.
Processing and Viewing Output Data
With everything configured, you can now execute the activities and view the results.
|
With the activities successfully run, over in SQL Management Studio the output can be seen. |
|
Version History
Prior to Grooper 2.9 a different Batch Process Step was needed for every unique table export. The addition of the Export Mappings Collection Editor allows multiple tables, that belong to the same Content Type to be exported in one Batch Process Step.


