2.90:Database Export: Difference between revisions
| Line 98: | Line 98: | ||
{| class="wikitable" | {| class="wikitable" | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center" | | ||
# Click the '''Create Table''' button. | |||
# 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'''. | |||
|| [[File:database_export_007a.png|1000px]] | || [[File:database_export_007a.png|1000px]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center" | | ||
4 | # <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. | |||
* 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|1000px]] | || [[File:database_export_007b.png|1000px]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center" | | ||
6 | # <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... | |||
|| [[File:database_export_007c.png|1000px]] | || [[File:database_export_007c.png|1000px]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center" | | ||
8 | # <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. | |||
|| [[File:database_export_007d.png|1000px]] | || [[File:database_export_007d.png|1000px]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center" | | ||
10 | # <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. | ||
# The '''Table Columns''' '''List View''' will display the data structure of the table, while the '''Data Preview''' '''List View''' will display data within the table. | |||
* Because this table was just created, it will not have any data to display. | #* Because this table was just created, it will not have any data to display. | ||
# Clicking the '''Import Table Reference''' button will ... | |||
* Be warned, the '''Drop Table''' button is a powerful one in that ''it will delete the entire table from SQL''. Use this button with EXTREME caution. | #* Be warned, the '''Drop Table''' button is a powerful one in that ''it will delete the entire table from SQL''. Use this button with EXTREME caution. | ||
# ...create a '''Database Table''' object in the node tree. | |||
|| [[File:database_export_007e.png|1000px]] | || [[File:database_export_007e.png|1000px]] | ||
|} | |} | ||
</tab> | </tab> | ||
</tabs> | </tabs> | ||
Revision as of 10:54, 15 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 by following this link and downloading the provided file. 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.)

