Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Absent Member.. DPolen Absent Member..
Absent Member..
271 views

Getting Connect-IT to export to a text files upon data match

Jump to solution
I am trying to take a source CSV file and determine if any of the items match on Serial Number with the Asset Center database.

If it matches, I want to put it into a match.csv and if not, go to a unmatched csv.

I'm able to set up the scenario to take the source, and map it to the AC data, but nothing else.

Is that the extent of what Connect-IT is capable in this situation?.

I am using AC 5.01, CIT 3.81 on a Windows 2003 Server...

-------------------------------------------
My father always said to find something you love to do and make that your job. My grandfather always added... "why in the heck would you want to take something you love and RUIN it by making it something you HAVE to do every day.
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.. MTWalsh Absent Member..
Absent Member..

Re: Getting Connect-IT to export to a text files upon data match

Jump to solution
You could do this by mapping from your .csv file to another .csv file called match.csv. In the mapping for serial number, do a pre-query of Asset Manager (you can just drop an Asset Manager connector in the scenario unmapped to anything) you will us pifNewQueryfromFmtName or pifNewQueryfromXML to query the AM database (check the documentation in CIT for these functions for how to use them). When there is a match (from your prequery) allow the record through to the match.csv file. If there is no match, fail the document using pifIgnoreDocumentMapping() with an error message of "nomatch" or something like that.

Add a 3rd text connector to produce your unmatched.csv. Map from the ProcessDoc created by the matched.csv connector to the unmatched.csv connector. Read the msg node to look for records that have your "nomatch" message in them. PifIgnoreDocument on all the ones that don't have "nomatch" and process all the ones that do.

If the idea though is to just somehow see what got matched, you could also just prequery AM like mentioned above and do a single document where you flag each serial number as matching or not matching (and avoid processing the processdoc stuff).

View solution in original post

0 Likes
4 Replies
Highlighted
Absent Member.. MTWalsh Absent Member..
Absent Member..

Re: Getting Connect-IT to export to a text files upon data match

Jump to solution
You could do this by mapping from your .csv file to another .csv file called match.csv. In the mapping for serial number, do a pre-query of Asset Manager (you can just drop an Asset Manager connector in the scenario unmapped to anything) you will us pifNewQueryfromFmtName or pifNewQueryfromXML to query the AM database (check the documentation in CIT for these functions for how to use them). When there is a match (from your prequery) allow the record through to the match.csv file. If there is no match, fail the document using pifIgnoreDocumentMapping() with an error message of "nomatch" or something like that.

Add a 3rd text connector to produce your unmatched.csv. Map from the ProcessDoc created by the matched.csv connector to the unmatched.csv connector. Read the msg node to look for records that have your "nomatch" message in them. PifIgnoreDocument on all the ones that don't have "nomatch" and process all the ones that do.

If the idea though is to just somehow see what got matched, you could also just prequery AM like mentioned above and do a single document where you flag each serial number as matching or not matching (and avoid processing the processdoc stuff).

View solution in original post

0 Likes
Absent Member.. DPolen Absent Member..
Absent Member..

Re: Getting Connect-IT to export to a text files upon data match

Jump to solution
I set a SOURCE(CSV), MATCHED(CSV) and drag between and a MAP Connector is created.

When I try to configure it, I get:

Connector 'MATCHED (File - Text)' is not able to consume document type

-------------------------------------------
My father always said to find something you love to do and make that your job. My grandfather always added... "why in the heck would you want to take something you love and RUIN it by making it something you HAVE to do every day.
0 Likes
Absent Member.. Bryce Hull Absent Member..
Absent Member..

Re: Getting Connect-IT to export to a text files upon data match

Jump to solution
Make sure you have the matched connector configured to write not read.


0 Likes
Absent Member.. DPolen Absent Member..
Absent Member..

Re: Getting Connect-IT to export to a text files upon data match

Jump to solution
Thanks for the help everyone.

I'm running through the data and producing some good results without running it into a database, which is what the boss wants.

-------------------------------------------
My father always said to find something you love to do and make that your job. My grandfather always added... "why in the heck would you want to take something you love and RUIN it by making it something you HAVE to do every day.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.