2.90:Database Export: Difference between revisions
Dgreenwood (talk | contribs) No edit summary |
|||
| (12 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
__NOINDEX__ | |||
{|class="attn-box" | |||
| | |||
⚠ | |||
| | |||
'''''Database Export is now [[Data Export]]''''' | |||
Database Export is an older Grooper activity. In newer versions, data is exported to databases using by adding a "Data Export" definition to an Export Behavior. | |||
|} | |||
<onlyinclude> | |||
<blockquote style="font-size:14pt"> | <blockquote style="font-size:14pt"> | ||
Database Export is one of the main ways to '''[[Five Phases of Grooper|Deliver]]''' data '''[[Five Phases of Grooper|Collected]]''' in Grooper.</ | '''Database Export''' is an '''[[Activity]]''' used to export extracted data to a SQL or ODBC compliant database. | ||
</blockquote> | |||
'''Database Export''' is one of the main ways to '''[[Five Phases of Grooper|Deliver]]''' data '''[[Five Phases of Grooper|Collected]]''' in Grooper. | |||
</onlyinclude> | |||
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== | ||
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. [https://en.wikipedia.org/wiki/Table_(information) Tables] in [https://en.wikipedia.org/wiki/Database 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 ('''[https://en.wikipedia.org/wiki/Microsoft_SQL_Server Microsoft SQL Server]''' or '''[https://en.wikipedia.org/wiki/Open_Database_Connectivity ODBC-compliant]''') tables in a database and intelligently populate said tables.</ | 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. [https://en.wikipedia.org/wiki/Table_(information) Tables] in [https://en.wikipedia.org/wiki/Database 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 ('''[https://en.wikipedia.org/wiki/Microsoft_SQL_Server Microsoft SQL Server]''' or '''[https://en.wikipedia.org/wiki/Open_Database_Connectivity ODBC-compliant]''') tables in a database and intelligently populate said tables.<br/> | ||
Database export is the chief delivery device for "collection" elements. These are '''[[Data Element|Data Elements]]''' for which there will be a collection, or "set", of values. Examples of these are '''Data Columns''' found within '''[[Data Table|Data Tables]]''', or '''[[Data Field|Data Fields]]''' located in '''[[Data Section|Data Sections]]''' with the '''''Scope''''' property set to ''MultiInstance''. | |||
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. | 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. | ||
| Line 11: | Line 27: | ||
==How To== | ==How To== | ||
{| | {| | ||
| style="padding:25px; vertical-align:top" | | | style="padding:25px; vertical-align:top; width:65%" | | ||
Following is an example of how to setup the '''Database Export''' activity. In this example are a couple of different document formats whose data will be collected by a single '''Content Model''' and used to help illustrate the two key ''distinctions'' mentioned above. The first document shows the ''flattening'' of inherited data, while the second is used to give an avenue to export to multiple tables at once. | Following is an example of how to setup the '''Database Export''' activity. In this example are a couple of different document formats whose data will be collected by a single '''Content Model''' and used to help illustrate the two key ''distinctions'' mentioned above. The first document shows the ''flattening'' of inherited data, while the second is used to give an avenue to export to multiple tables at once. | ||
|| [[File:database_export_001.gif]] | || [[File:database_export_001.gif]] | ||
| Line 25: | Line 41: | ||
====Understanding the Forms==== | ====Understanding the Forms==== | ||
{| | {| | ||
| style="padding:25px; vertical-align:top" | | | style="padding:25px; vertical-align:top; width:35%" | | ||
The thing to understand about the document displayed on the right is that there is a combination of single instance data (single fields of information) married with multi-instance data (table displaying a dynamic amount of rows), i.e. - a one-to-many relationship. The single instance data ('''Last Name''', '''First Name''', '''Employee ID'''), as a result of only being listed once on the document, will only be collected once, but needs to be married to each row of information from the table. While the single instance data is only collected once, it will be reported many times. This document is meant to show flattening inherited data structures. | The thing to understand about the document displayed on the right is that there is a combination of single instance data (single fields of information) married with multi-instance data (table displaying a dynamic amount of rows), i.e. - a one-to-many relationship. The single instance data ('''Last Name''', '''First Name''', '''Employee ID'''), as a result of only being listed once on the document, will only be collected once, but needs to be married to each row of information from the table. While the single instance data is only collected once, it will be reported many times. This document is meant to show flattening inherited data structures. | ||
|| [[File:database_export_002.png | || [[File:database_export_002.png]] | ||
|} | |} | ||
<br/><br/> | <br/><br/> | ||
{| | {| | ||
| style="padding:25px; vertical-align:top" | | | style="padding:25px; vertical-align:top; width:35%" | | ||
The second document is collecting only information from the main table, but there is Personally Identifiable Information (PII) in the table that should be protected. As a result, it will export its information to two tables (with the assumption that the second table is "protected.) This document is meant to demonstrate how to export to multiple tables via one step in a '''Batch Process'''. | The second document is collecting only information from the main table, but there is Personally Identifiable Information (PII) in the table that should be protected. As a result, it will export its information to two tables (with the assumption that the second table is "protected".) This document is meant to demonstrate how to export to multiple tables via one step in a '''Batch Process'''. | ||
|| [[File:database_export_003.png | || [[File:database_export_003.png ]] | ||
|} | |} | ||
<span style="font-size:14pt">'''[[Database Export#How To|Back to top to continue to next tab]]'''</span> | |||
</tab> | </tab> | ||
<tab name="Understanding the Content Model" style="margin:25px"> | <tab name="Understanding the Content Model" style="margin:25px"> | ||
====Understanding the Content Model==== | ====Understanding the Content Model==== | ||
{| | {| | ||
| style="padding:25px; vertical-align:top" | | | style="padding:25px; vertical-align:top; width:35%" | | ||
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/><br/> | <br/><br/> | ||
| Line 54: | Line 72: | ||
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 properly classified document (you can at the very least manually assign a '''Document Type''') 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/> | 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 properly classified document (you can at the very least manually assign a '''Document Type''') 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; width:35%" | | ||
#First, navigate to the '''Document''' (or '''Folder''') object in the node tree; not the '''Batch''', not the '''Batch Folder''', not the '''Page''', but specifically the '''Document''' object. This is where the information lives. | #First, navigate to the '''Document''' (or '''Folder''') object in the node tree; not the '''Batch''', not the '''Batch Folder''', not the '''Page''', but specifically the '''Document''' object. This is where the information lives. | ||
#From there, click on the '''Index Data''' tab. | #From there, click on the '''Index Data''' tab. | ||
#After doing so you can see data displayed. Were the document classified, but not successfully extracted, the data structure would be present, but the fields empty. | #After doing so you can see data displayed. Were the document classified, but not successfully extracted, the data structure would be present, but the fields empty. | ||
|| [[File:database_export_005a.png | || [[File:database_export_005a.png]] | ||
|} | |} | ||
<br/><br/> | <br/><br/> | ||
{| | {| | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center; width:35%" | | ||
#Another means of verifying is to again, click on the '''Document''' object in the node tree. | #Another means of verifying is to again, click on the '''Document''' object in the node tree. | ||
#Click the '''Advanced''' tab. | #Click the '''Advanced''' tab. | ||
| Line 68: | Line 86: | ||
#In the '''List View''' you should see the ''Grooper.DocumentData.json'' file. | #In the '''List View''' you should see the ''Grooper.DocumentData.json'' file. | ||
#When you click on that file, you should see the stored JSON information of the indexed data displayed in the viewer below. | #When you click on that file, you should see the stored JSON information of the indexed data displayed in the viewer below. | ||
|| [[File:database_export_005b.png | || [[File:database_export_005b.png]] | ||
|} | |} | ||
<span style="font-size:14pt">'''[[Database Export#How To|Back to top to continue to next tab]]'''</span> | |||
</tab> | </tab> | ||
<tab name="Configuring a Data Connection" style="margin:25px"> | <tab name="Configuring a Data Connection" style="margin:25px"> | ||
| Line 77: | Line 97: | ||
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. | ||
{| | {| | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center; width:35%" | | ||
#Expand the node tree to the ''' | #Expand the node tree to the '''Infrastructure''' folder and in the '''Data Connections''' folder '''Add > Data Connection...''' | ||
#In the '''Add New Data Connection''' window give the object a name and click '''OK''' | #In the '''Add New Data Connection''' window give the object a name and click '''OK''' | ||
#As mentioned above, the configuration settings listed here will be specific to this environment: | #As mentioned above, the configuration settings listed here will be specific to this environment: | ||
| Line 85: | Line 105: | ||
#*Because '''Grooper''' will create the database, the '''''Database Name''''' property will be left blank for now. | #*Because '''Grooper''' will create the database, the '''''Database Name''''' property will be left blank for now. | ||
#*The '''''User Name''''' and '''''Password''''' properties are left blank here, which passes the current logged in AD user's credentials to SQL. | #*The '''''User Name''''' and '''''Password''''' properties are left blank here, which passes the current logged in AD user's credentials to SQL. | ||
|| [[File:database_export_006a.png | || [[File:database_export_006a.png]] | ||
|} | |} | ||
<br/><br/> | <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. | ||
{| | {| | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center; width:35%" | | ||
#Click the '''Create Database''' button | #Click the '''Create Database''' button | ||
#In the '''Create Database''' window, give the database a name, and click the '''OK''' button. | #In the '''Create Database''' window, give the database a name, and click the '''OK''' button. | ||
#The '''Connection Settings''' and '''Database Name''' properties will be updated to reflect the new database information entered. | #The '''Connection Settings''' and '''Database Name''' properties will be updated to reflect the new database information entered. | ||
|| [[File:database_export_006b.png | || [[File:database_export_006b.png]] | ||
|} | |} | ||
<br/><br/> | <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" | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center; width:35%" | | ||
# Click the '''Create Table''' button. | # Click the '''Create Table''' button. | ||
# Click the '''''Content Type''''' property and click the drop-down arrow to get a mini node tree view. | # Click the '''''Content Type''''' property and click the drop-down arrow to get a mini node tree view. | ||
# Select the first '''Content Type'''. In the case of this exmaple, it will be the '''Document Type''' named '''Database Export 01'''. | # Select the first '''Content Type'''. In the case of this exmaple, it will be the '''Document Type''' named '''Database Export 01'''. | ||
|| [[File:database_export_007a.png | || [[File:database_export_007a.png]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center; width:35%" | | ||
# <li value="4">Becaues the '''Database Export 01''' '''Content Type''' was selected, the following '''''Data Element Scope''''' property will have a drop down of which will contain '''Data Elements''' relative to this particular '''Content Type'''.</li> | # <li value="4">Becaues the '''Database Export 01''' '''Content Type''' was selected, the following '''''Data Element Scope''''' property will have a drop down of which will contain '''Data Elements''' relative to this particular '''Content Type'''.</li> | ||
# Selecting the '''Earnings''' '''Data Table''' will set the baseline structure of the table to be created, and it will inherit upward. | # Selecting the '''Earnings''' '''Data Table''' will set the baseline structure of the table to be created, and it will inherit upward. | ||
#* Think back to the notion of the one-to-many relationship. This table can have a dynamic number of rows and the '''Data Columns''' are capable of capturing and reporting back unlimited instances of data, hence multiple rows. The '''Data Fields''' within this scope, however, are only capable of capturing and returning a single piece of data. But, given the nature of inheretence, the table that will be created will make columns not just for the '''Data Columns''' of the '''Data Table''', but for each of the '''Data Fields''' contained within this scope. | #* Think back to the notion of the one-to-many relationship. This table can have a dynamic number of rows and the '''Data Columns''' are capable of capturing and reporting back unlimited instances of data, hence multiple rows. The '''Data Fields''' within this scope, however, are only capable of capturing and returning a single piece of data. But, given the nature of inheretence, the table that will be created will make columns not just for the '''Data Columns''' of the '''Data Table''', but for each of the '''Data Fields''' contained within this scope. | ||
#* Were there '''Data Fields''' further up the inheretence tree, say at the base '''Data Model''' of the main '''Content Model''' the table would also attempt to inheret those as well. | #* Were there '''Data Fields''' further up the inheretence tree, say at the base '''Data Model''' of the main '''Content Model''' the table would also attempt to inheret those as well. | ||
|| [[File:database_export_007b.png | || [[File:database_export_007b.png]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center; width:35%" | | ||
# <li value="6"> The '''''Table Name''''' property is arbitrary, but by default is a concatenation of the strings passed by the '''''Content Type''''' and '''''Data Element Scope''''' properties.M</li> | # <li value="6"> The '''''Table Name''''' property is arbitrary, but by default is a concatenation of the strings passed by the '''''Content Type''''' and '''''Data Element Scope''''' properties.M</li> | ||
# Click the '''Execute''' button to close this window and continue the process forward... | # Click the '''Execute''' button to close this window and continue the process forward... | ||
|| [[File:database_export_007c.png | || [[File:database_export_007c.png]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center; width:35%" | | ||
# <li value="8"> Here's where '''Grooper''' is doing the hard work for us. Notice in the '''Review/Edit SQL Statement''' window the SQL Statement required to create our table is already written for us.</li> | # <li value="8"> Here's where '''Grooper''' is doing the hard work for us. Notice in the '''Review/Edit SQL Statement''' window the SQL Statement required to create our table is already written for us.</li> | ||
# Click the '''Run SQL Statement''' button to create the table. | # Click the '''Run SQL Statement''' button to create the table. | ||
|| [[File:database_export_007d.png | || [[File:database_export_007d.png]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center; width:35%" | | ||
# <li value="10"> With the table made, the '''Database Tables''' '''List View''' will have an entry in it.</li> | # <li value="10"> With the table made, the '''Database Tables''' '''List View''' will have an entry in it.</li> | ||
#* It will initially display with a red dot (as seen in the image), but will change to a green dot when you successfully complete the reference import. | #* It will initially display with a red dot (as seen in the image), but will change to a green dot when you successfully complete the reference import. | ||
| Line 131: | Line 151: | ||
# ...create a '''Database Table''' object in the node tree. | # ...create a '''Database Table''' object in the node tree. | ||
#* You cannot use the '''Drop Table''' button unless you delete the '''Database Table''' object from the node tree. | #* You cannot use the '''Drop Table''' button unless you delete the '''Database Table''' object from the node tree. | ||
|| [[File:database_export_007e.png | || [[File:database_export_007e.png]] | ||
|} | |} | ||
<span style="font-size:14pt">'''[[Database Export#How To|Back to top to continue to next tab]]'''</span> | |||
</tab> | </tab> | ||
<tab name="Configuring Database Export Activity" style="margin:25px"> | <tab name="Configuring Database Export Activity" style="margin:25px"> | ||
| Line 138: | Line 160: | ||
Data collected. Connection to database established. Now it's time to configure the activity that will send the data to its final destination.<br/> | 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; width:35%" | | ||
# Select a '''Batch Process''' | # Select a '''Batch Process''' | ||
# Click the '''Add Step...''' button. | # Click the '''Add Step...''' button. | ||
# Set the '''''Activity Type''''' property to ''Database Export'' | # Set the '''''Activity Type''''' property to ''Database Export'' | ||
# Click the drop-down menu of the '''''Database Connection''''' property and select the '''Data Connection''' object to be used. | # Click the drop-down menu of the '''''Database Connection''''' property and select the '''Data Connection''' object to be used. | ||
|| [[File:database_export_008a.png | || [[File:database_export_008a.png]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center; width:35%" | | ||
# <li value="5"> Click the drop-down menu of the '''''Content Type''''' property and select the '''Content Type''' that contains the scope of the information you want to deliver. In this configuration it is the '''Database Export 01''' '''Document Type'''.</li> | # <li value="5"> Click the drop-down menu of the '''''Content Type''''' property and select the '''Content Type''' that contains the scope of the information you want to deliver. In this configuration it is the '''Database Export 01''' '''Document Type'''.</li> | ||
|| [[File:database_export_008b.png | || [[File:database_export_008b.png]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center; width:35%" | | ||
# <li value="6"> Click the '''''Export Mappings''''' property then its ellipsis button to open the '''Export Mapping Collection Editor''' window.</li> | # <li value="6"> Click the '''''Export Mappings''''' property then its ellipsis button to open the '''Export Mapping Collection Editor''' window.</li> | ||
# Click the '''Add''' button to add an entry to the '''List View''' below. | # Click the '''Add''' button to add an entry to the '''List View''' below. | ||
| Line 156: | Line 178: | ||
# Select the '''''Data Element Scope''''' property and in its drop-down menu select the object that represents the scope to which you wish the map to the previously selected table. In this case it is the '''Earnings''' '''Data Table'''. | # Select the '''''Data Element Scope''''' property and in its drop-down menu select the object that represents the scope to which you wish the map to the previously selected table. In this case it is the '''Earnings''' '''Data Table'''. | ||
#* Selecting this '''Data Table''' as the scope will not only allow mapping to its '''Data Columns''', but all '''Data Fields''' up its logical heirarchical tree path. | #* Selecting this '''Data Table''' as the scope will not only allow mapping to its '''Data Columns''', but all '''Data Fields''' up its logical heirarchical tree path. | ||
|| [[File:database_export_008c.png | || [[File:database_export_008c.png]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center; width:35%" | | ||
# <li value="11"> Select the '''''Columns Mappings''''' property then its ellipsis button to open the '''Column Mappings''' window.</li> | # <li value="11"> Select the '''''Columns Mappings''''' property then its ellipsis button to open the '''Column Mappings''' window.</li> | ||
# 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 | || [[File:database_export_008d.png]] | ||
|}<br/><br/> | |}<br/><br/> | ||
{| | {| | ||
| style="padding:25px; vertical-align:top" | | | style="padding:25px; vertical-align:top; width:35%" | | ||
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 '''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.<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.<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 | || [[File:database_export_009.png]] | ||
|} | |} | ||
<span style="font-size:14pt">'''[[Database Export#How To|Back to top to continue to next tab]]'''</span> | |||
</tab> | </tab> | ||
<tab name="Processing and Viewing Output Data" style="margin:25px"> | <tab name="Processing and Viewing Output Data" style="margin:25px"> | ||
| Line 175: | Line 199: | ||
With everything configured, you can now execute the activities and view the results. | With everything configured, you can now execute the activities and view the results. | ||
{| class="wikitable" | {| class="wikitable" | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center; width:35%" | | ||
# Make sure the '''Batch Process''' is expanded in the node tree, and select the '''Batch Process Step''' object. | # Make sure the '''Batch Process''' is expanded in the node tree, and select the '''Batch Process Step''' object. | ||
# Selecting the '''Batch Process Step''' object will give access to the '''Unattended Activity Tester''' tab. | # Selecting the '''Batch Process Step''' object will give access to the '''Unattended Activity Tester''' tab. | ||
# Select a '''Batch'''. | # Select a '''Batch'''. | ||
|| [[File:database_export_010a.png | || [[File:database_export_010a.png]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center; width:35%" | | ||
# <li value="4">Click the '''Process All''' button to bring up the '''Process All''' window.</li> | # <li value="4">Click the '''Process All''' button to bring up the '''Process All''' window.</li> | ||
# In the '''Process All''' window you can set the amount of threads you want to apply to the processing of this activity now. | # In the '''Process All''' window you can set the amount of threads you want to apply to the processing of this activity now. | ||
| Line 187: | Line 211: | ||
# Click the '''Start''' button to run the activity. | # Click the '''Start''' button to run the activity. | ||
#* Because two '''Batch Process Steps''' were made to accommodate the two '''Content Types''', this process should be repeated for the other '''Database Export''' activity on the other '''Batch'''. | #* Because two '''Batch Process Steps''' were made to accommodate the two '''Content Types''', this process should be repeated for the other '''Database Export''' activity on the other '''Batch'''. | ||
|| [[File:database_export_010b.png | || [[File:database_export_010b.png]] | ||
|} | |} | ||
<br/><br/> | <br/><br/> | ||
| Line 200: | Line 224: | ||
==Version History== | ==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'''. | 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'''. | ||
[[Category:Artices]] | |||
[[Category:Version 2.90]] | |||
Latest revision as of 11:03, 5 August 2025
|
⚠ |
Database Export is now Data Export Database Export is an older Grooper activity. In newer versions, data is exported to databases using by adding a "Data Export" definition to an Export Behavior. |
Database Export is an Activity used to export extracted data to a SQL or ODBC compliant database.
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.
Database export is the chief delivery device for "collection" elements. These are Data Elements for which there will be a collection, or "set", of values. Examples of these are Data Columns found within Data Tables, or Data Fields located in Data Sections with the Scope property set to MultiInstance.
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 properly classified document (you can at the very least manually assign a Document Type) 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.




















