2.90:CMIS Lookup (Lookup Specification): Difference between revisions
No edit summary |
|||
| Line 91: | Line 91: | ||
# <li value="7"> Select the '''''CMIS Query''''' property then click the ellipsis button.</li> | # <li value="7"> Select the '''''CMIS Query''''' property then click the ellipsis button.</li> | ||
# This will bring up the '''CMIS Query''' window. | # This will bring up the '''CMIS Query''' window. | ||
# Start by beginning to type <code><span style="color:#0001fd">SELECT</span></code> in the editor. The intellisense will pop up a menu that will let you complete the command by pressing tab (or enter, or double clicking the value). You can also just continue writing it out. | # Start by beginning to type... | ||
#: <code><span style="color:#0001fd">SELECT</span></code> | |||
#: ...in the editor. The intellisense will pop up a menu that will let you complete the command by pressing tab (or enter, or double clicking the value). You can also just continue writing it out. | |||
#* A CMIS Query has syntax almost just like a SQL Query, so if you're familiar with that this part will be quite simple. '''Grooper's''' intellisense for these queries is quite good, however, so even someone with little-to-no experience with SQL Queries will be fine. | #* A CMIS Query has syntax almost just like a SQL Query, so if you're familiar with that this part will be quite simple. '''Grooper's''' intellisense for these queries is quite good, however, so even someone with little-to-no experience with SQL Queries will be fine. | ||
#* This is also as good a time as any to remind you to use the '''Grooper Help''': that easily glossed over area with the medium gray background underneath nearly everything you select. CMIS Query is a great example of the '''Grooper Help''' as it goes a long way to help you get a result, including telling you what to type, and examples to try. | #* This is also as good a time as any to remind you to use the '''Grooper Help''': that easily glossed over area with the medium gray background underneath nearly everything you select. CMIS Query is a great example of the '''Grooper Help''' as it goes a long way to help you get a result, including telling you what to type, and examples to try. | ||
| Line 97: | Line 99: | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center" | | ||
# <li value="10"> Having completed the <code><span style="color:#0001fd">SELECT</span></code> command, press the space bar to move the cursor forward one space. In doing so the '''Grooper's''' intellisense will kick in again and push you in the direction of the <code><span style="color:#0001fd">FROM</span></code> statement. Not only that, but having pointed to the '''CMIS Repository''' object, the intellisense has an awareness of '''Content Types''' within the repository. Select the site that contains the writable properties you're looking to leverage for the lookup.</li> | # <li value="10"> Having completed the... | ||
#* All you SQL sleuths out there might argue, "HEY! You haven't told it WHAT to select, so you shouldn't write the FROM yet!". Estute observation, however, '''Grooper's''' smarter than you think. In writing the <code><span style="color:#0001fd">FROM</span></code> statement first you've given '''Grooper''' awareness of what CAN be selected. This is made clear in the next step. | #: <code><span style="color:#0001fd">SELECT</span></code> | ||
#: ...command, press the space bar to move the cursor forward one space. In doing so the '''Grooper's''' intellisense will kick in again and push you in the direction of the... | |||
#: <code><span style="color:#0001fd">FROM</span></code> | |||
#: ...statement. Not only that, but having pointed to the '''CMIS Repository''' object, the intellisense has an awareness of '''Content Types''' within the repository. Select the site that contains the writable properties you're looking to leverage for the lookup.</li> | |||
#* All you SQL sleuths out there might argue, "HEY! You haven't told it WHAT to select, so you shouldn't write the FROM yet!". Estute observation, however, '''Grooper's''' smarter than you think. In writing the... | |||
#: <code><span style="color:#0001fd">FROM</span></code> | |||
#: ...statement first you've given '''Grooper''' awareness of what CAN be selected. This is made clear in the next step. | |||
|| [[File:cmis_lookup_005d.png|1000px]] | || [[File:cmis_lookup_005d.png|1000px]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center" | | ||
# <li value="11"> If you allowed the intellisense to complete the <code><span style="color:#0001fd">FROM</span></code> statement for you, it will move the cursor back in front of the <code><span style="color:#0001fd">SELECT</span></code> command. This is important because you can now properly flesh out WHAT you are selecting. By pressing the spacebar (after it moved back to in front of the <code><span style="color:#0001fd">SELECT</span></code> command) you will now get more intellisense functionality. The intellisense menu will have awareness of the columns of information available in the SharePoint library you selected in the <code><span style="color:#0001fd">FROM</span></code> statement. Here you will be choosing the target fields of the lookup. Select an item from the intellisense list.</li> | # <li value="11"> If you allowed the intellisense to complete the... | ||
#: <code><span style="color:#0001fd">FROM</span></code> | |||
#: ...statement for you, it will move the cursor back in front of the... | |||
#: <code><span style="color:#0001fd">SELECT</span></code> | |||
#: ...command. This is important because you can now properly flesh out WHAT you are selecting. By pressing the spacebar (after it moved back to in front of the... | |||
#: <code><span style="color:#0001fd">SELECT</span></code> | |||
#: ...command) you will now get more intellisense functionality. The intellisense menu will have awareness of the columns of information available in the SharePoint library you selected in the... | |||
#: <code><span style="color:#0001fd">FROM</span></code> | |||
#: ...statement. Here you will be choosing the target fields of the lookup. Select an item from the intellisense list.</li> | |||
|| [[File:cmis_lookup_005e.png|1000px]] | || [[File:cmis_lookup_005e.png|1000px]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center" | | ||
# <li value="12"> Having completed the previous selection, type <code>,</code> followed by a space. In doing so you will activate the intellisense again and be able to make another selection. Notice the previous selection is no loner in the list. Repeat this process as many times as necessary to select all target fields.</li> | # <li value="12"> Having completed the previous selection, type... | ||
#: <code>,</code> | |||
#: ...followed by a space. In doing so you will activate the intellisense again and be able to make another selection. Notice the previous selection is no loner in the list. Repeat this process as many times as necessary to select all target fields.</li> | |||
|| [[File:cmis_lookup_005f.png|1000px]] | || [[File:cmis_lookup_005f.png|1000px]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center" | | ||
# <li value="13"> Here, with <code>EMail_Address</code> we have an example of a column in the SharePoint library being named differently than what is in the '''Data Model'''. In order for this to match up, we have to tell it what the column will be used as. To do this, after making a selection, but before the next <code>, </code>, press spacebar and once again see the intellisense kick in and know you want to make an <code><span style="color:#0001fd">AS</span></code> statement. Complete the <code><span style="color:#0001fd">AS</span></code> statement and press space again, and ... you guessed it ... more intellisense. The values listed here are data elements from the '''Data Model'''. By completing <code>EMail_Address <span style="color:#0001fd">AS</span> <span style="color:#FF0000">'EMail'</span></code> we've allowed for dissimilarly named elements to sync up.</li> | # <li value="13"> Here, with... | ||
#: <code>EMail_Address</code> | |||
#: ...we have an example of a column in the SharePoint library being named differently than what is in the '''Data Model'''. In order for this to match up, we have to tell it what the column will be used as. To do this, after making a selection, but before the next... | |||
#: <code>, </code> | |||
#: ..., press spacebar and once again see the intellisense kick in and know you want to make an... | |||
#: <code><span style="color:#0001fd">AS</span></code> | |||
#: ...statement. Complete the... | |||
#: <code><span style="color:#0001fd">AS</span></code> | |||
#: ...statement and press space again, and ... you guessed it ... more intellisense. The values listed here are data elements from the '''Data Model'''. By completing... | |||
#: <code>EMail_Address <span style="color:#0001fd">AS</span> <span style="color:#FF0000">'EMail'</span></code> | |||
#: ...we've allowed for dissimilarly named elements to sync up.</li> | |||
|| [[File:cmis_lookup_005g.png|1000px]] | || [[File:cmis_lookup_005g.png|1000px]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center" | | ||
# <li value="14"> Having completed the entire <code><span style="color:#0001fd">SELECT</span></code> statement (again, this was for the target fields) we can now write the <code><span style="color:#0001fd">WHERE</span></code> statement (to define the lookup field). To do this move the cursor to after the completed <code><span style="color:#0001fd">FROM</span></code> statement and press the spacebar. Select the WHERE option from the intellisense menu.</li> | # <li value="14"> Having completed the entire... | ||
#: <code><span style="color:#0001fd">SELECT</span></code> | |||
#: ...statement (again, this was for the target fields) we can now write the... | |||
#: <code><span style="color:#0001fd">WHERE</span></code> | |||
#: ...statement (to define the lookup field). To do this move the cursor to after the completed... | |||
#: <code><span style="color:#0001fd">FROM</span></code> | |||
#: ...statement and press the spacebar. Select the WHERE option from the intellisense menu.</li> | |||
|| [[File:cmis_lookup_005h.png|1000px]] | || [[File:cmis_lookup_005h.png|1000px]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center" | | ||
# <li value="15"> Following the <code><span style="color:#0001fd">WHERE</span></code> command press spacebar and select the column that will function as the Lookup Field.</li> | # <li value="15"> Following the... | ||
#: <code><span style="color:#0001fd">WHERE</span></code> | |||
#: ...command press spacebar and select the column that will function as the Lookup Field.</li> | |||
|| [[File:cmis_lookup_005i.png|1000px]] | || [[File:cmis_lookup_005i.png|1000px]] | ||
|- | |- | ||
| style="padding:25px; vertical-align:center" | | | style="padding:25px; vertical-align:center" | | ||
# <li value="16"> Type <code>=</code> immediately after the previous text (no spaces) and select from the intellisense menu the data element from '''Grooper''' to marry this too. In most cases it will be named the same.</li> | # <li value="16"> Type... | ||
#* This variable is dynamically populated when the query is sent across for the lookup. SQL can't look at a '''Grooper''' field, but it can look at variables. Therefore a dynamically generated <code>@Employee_ID=<span style="color:#ff00ff">{value of grooper field}</span></code> is needed to allow the lookup to function properly.</li> | #: <code>=</code> | ||
#: ...immediately after the previous text (no spaces) and select from the intellisense menu the data element from '''Grooper''' to marry this too. In most cases it will be named the same.</li> | |||
#* This variable is dynamically populated when the query is sent across for the lookup. SQL can't look at a '''Grooper''' field, but it can look at variables. Therefore a dynamically generated... | |||
#: <code>@Employee_ID=<span style="color:#ff00ff">{value of grooper field}</span></code> | |||
#: ...is needed to allow the lookup to function properly.</li> | |||
#* The completed query used here looks as follows: | #* The completed query used here looks as follows: | ||
#** <code><span style="color:#0001fd">SELECT</span> First_Name, Last_Name, Phone_Number, EMail_Address <span style="color:#0001fd">AS</span> <span style="color:#FF0000">'EMail'</span>, Gender, SSN, IP_Address, Street_Number, Street_Name, City, State, Postal_Code <span style="color:#0001fd">AS</span> <span style="color:#FF0000">'ZIP'</span> <span style="color:#0001fd">FROM</span> sites/Chili con Toso/Shared_Documents/Document <span style="color:#0001fd">WHERE</span> Employee_ID=<span style="color:#ff00ff">@Employee_ID</span></code> | #** <code><span style="color:#0001fd">SELECT</span> First_Name, Last_Name, Phone_Number, EMail_Address <span style="color:#0001fd">AS</span> <span style="color:#FF0000">'EMail'</span>, Gender, SSN, IP_Address, Street_Number, Street_Name, City, State, Postal_Code <span style="color:#0001fd">AS</span> <span style="color:#FF0000">'ZIP'</span> <span style="color:#0001fd">FROM</span> sites/Chili con Toso/Shared_Documents/Document <span style="color:#0001fd">WHERE</span> Employee_ID=<span style="color:#ff00ff">@Employee_ID</span></code> | ||
Revision as of 14:56, 8 May 2020

Performing data lookups on CMIS sources like SharePoint can be extremely powerful in your data integration endeavors.
A base Content Model for use with this article 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
Grooper uses the CMIS protocol to connect to a variety of Content Management Systems. This connection can be used to integrate data in powerful ways by allowing the collection of one (or sometimes many) fields of information within a model in Grooper (let's call it Field A), then leveraging that extracted data point against the column of like information in the Content Management system (called Column A) to then pass back other desired fields from other columns in the same row of information.
How To
The most basic thing to understand about performing a lookup in Grooper is what the "lookup field" is and what the "target field(s)" is(are). The lookup field is the trigger, and the target fields are the result.
Put another way, the lookup field is what will be populated with information from an Activity like Extract (a user could also manually enter data into the field). This field will then be "bounced" off of the source of data to supply the remaining fileds, or the target fields, with information
| ! | 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 Source
Perhaps the most challenging aspect of explaining how to leverage this functionality is the fact that it requires access to a CMIS repository (in this case a SharePoint document library). One was created for the sake of this article, but unfortunately cannot be shared externally. The scope of this article also does not allow explaining setting up a SharePoint document library, as that's an exhaustive topic on its own. Note that CMIS Lookups are not limited to SharePoint, that just happened to be the content system chosen for this article.
Given that, it will be assumed you have access to a source that Grooper can connect to via a CMIS Connection.
The below image is showing a SharePoint document library with a single document in it and several columns added and populated with information.
Understanding the Content Model
|
The Content Model used here is very simple. It has no Content Types or any extraction setup. None of that is necessary to setup and demonstrate the lookup. It simply has a Data Model with several fields. |
|
Configuring a CMIS Connection
This configuration is specific to this article. While aspects of it can apply to any configuration, it's worth noting that this is not THE way to configure a CMIS Connection. This will be configured for a SharePoint environment. Note that the URLs in the image cannot be connected to externally, so attempting to copy this configuration verbatim will give you errors. This is meant as a guide, and will require an actual SharePoint environment on your end to be established, and real URLs from it supplied.
|
|
|
|
|
|
|
Writer's note - Having created this article and gone back through it, I now realize steps 10-13 here are not absolutely necessary to configure the CMIS Lookup. It will not impede one's ability to do so, and this is valuable information otherwise, as you can use the object created in these steps to map import and export properties for other activites. Feel free to not do steps 10-13 for the CMIS Lookup. |
Configuring the CMIS Lookup
With an established connection to a CMIS repository, the CMIS Lookup can now be configured. This is done on a Data Model.
Version Differences
Prior to Grooper 2.9 the CMIS Lookup functionality did not exist.
