When sending data to Gaviti, there are several options available to modify the values before they are finally stored in the application. These options include:
Field Name Mapping
If the data extraction does not follow Gaviti's naming conventions, you can set up a mapping to translate the data provided into the correct format. It is important that the mapping is consistent. This can be useful if the data you are working with does not use the same field names as Gaviti.
Example: Your data file has a field called customer_name
but Gaviti expects the field to be called name
. You can set up a field name mapping to translate customer_name
to name
so that the data can be properly uploaded to Gaviti.
Ignore Duplicate IDs
Gaviti expects data to have unique ID values, so if your report has duplicates, you can use this option to ignore the duplicates while still allowing the rest of the file to be processed. The duplication is controlled using the 'id' field. This can be helpful if you are working with data that has accidentally been entered multiple times.
Example: Your data file contains multiple rows with the same ID values of ABC123
. You can use the Ignore Duplicate IDs option to only include the first row with the ID value of ABC123
and ignore the rest.
Skip Top Rows
This option allows you to skip a certain number of rows from the top of the file. It is only applicable to Excel, CSV, and TXT files. This can be useful if your data file has a header row or other information at the top that you don't want to include in the data you are sending to Gaviti.
Example: Your data file has a header row and a row of summary information at the top that you don't want to include in the data you are sending to Gaviti. You can use the Skip Top Rows option to skip the first two rows so that only the data rows are included in the data you send to Gaviti.
Filtering Out Rows
If you only want to send certain rows of data, you can use this option to filter the data based on certain criteria. The following criteria are supported: is
, is in
, is not
, greater
, startsWith
, startsWithNot
, endsWith
, and endsWithNot
. This can be useful if you have a large data file and only want to include a specific subset of the data.
Example: You have a data file with information about different products, and you only want to include products that are in stock and have a price greater than $50. You can use the is
criteria with a value of in stock
and the greater
criteria with a value of 50
to filter out any rows that do not meet both criteria.
Transformations
Gaviti also supports data cleansing transformations to help you reformat data as needed. The following transformations are available: "trim
, replace
, and parse date
. You can apply multiple transformations to a single field, and they will be executed in the order they are configured. This can be helpful if the data you are working with is not in the format that Gaviti requires.
Example: Your data file has dates in the format MM/DD/YYYY
, but Gaviti expects them to be in the format YYYY-MM-DD
. You can use the parse date
transformation with a format of YYYY-MM-DD
to reformat the dates before uploading them to Gaviti.
Example: Your data file has text values that include extra spaces before or after the actual text. You can use the trim
transformation to remove these extra spaces.
Calculated Field
Gaviti allows you to add calculated values to the data you send. You can use this option to add dynamic fields to your data using JavaScript. For example, you can add a "balance" field to your data by subtracting the "paid" field from the "total" field. This can be useful if you need to perform calculations on your data before sending it to Gaviti.
Example: You have a data file with total
and paid
fields, but you want to include a balance
field that shows the difference between the two. You can use JavaScript to subtract the paid
field from the total
field and add the result to your data as the balance
field.
Example: You have a data file with quantity
and price
fields, and you want to include a total
field that shows the result of multiplying the two fields. You can use JavaScript to multiply the quantity
and price
fields and add the result to your data as the total
field.