Blade ZipKit Package Info
Name: Custom CSV and TAB delimited grammar files
Type: NSH Script, Grammar Files
BSA Compatible Version: 8.3.x +
More Info: N/A
Created by: Yanick Girouard
Tested version on: AppServer version 8.5.01.304
Tested against host running: N/A
This package imports 4 different custom grammar files using csv and tab as delimiter. Their purpose is to change the way the key of each record is generated to allow for better reporting of snapshot data. The out of the box csv grammar uses a concatenation of all fields, making it difficult to filter on the record names, or use this data for change tracking because the key (name column) are always different.
Included in the zip:
custom_csv.gm: grammar for comma delimited output using first field as the record’s primary key
custom_csv_dual.gm: grammar for comma delimited output using first two fields as the record’s primary key (i.e. field1-field2)
custom_tab.gm: grammar for tab delimited output using first field as the record’s primary key
custom_tab_dual.gm: grammar for tab delimited output using first two fields as the record’s primary key (i.e. field1-field2)
import_grammar.nsh: simple script to load the grammar files into the database and file server
Examples of transformations:
Use case examples for first field as key (same for both csv and tab, just change the delimiter accordingly):
# csv output
# Becomes this :
Use case examples for first two fields as key (same for both csv and tab, just change the delimiter accordingly):
# csv output
# Becomes this:
- Download the attached zip file to any computer with NSH shell access.
- Extract the zip file to a directory of your choice (i.e. C:\temp)
- From a local NSH shell prompt, call the import_grammar.nsh script and specify the local directory where you extracted the zip as the only argument. Example:
- Create a new extended object in the BSA console and confirm that you see the new grammar files.
*Note: This is a community-supported package.