You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close
Home > moovs > moov creation > How to create a new file definition
How to create a new file definition
print icon

Every moov in detamoov starts with a definition of data that detamoov will receive. These are called file definitions where you identify the specific format of data that will be received and then processed through detamoov.

 

Currently detamoov can process any text based file format. This means there's support for CSV and fixed length files which cover about 99% of the use cases encountered thus far. In this article, we'll describe the different ways to create a file definition.

 

 

Creating a File Definition in the Admin Console

 

To create a File Definition, click on your initials in the upper-right and then select the Admin Console.

 

 

Next access the File Definitions tab and click the ADD Button. Select the 'Create New Definition' option.

 

NOTE: If you don't have all the tabs like File Definitions, Validation Definitions, etc. available in your admin console, contact our support team and we can enable them on your detamoov account.

 

 

As an example, assume we have the following .csv file that we want to create as a File Definition.  We have the options of either creating the File Definition manually by adding the fields one by one or creating it by uploading the file and allowing detamoov to detect each column for you.

 

 

Create CSV by manually adding fields

 

First you will need to name the File Definition and choose CSV as the File Type. For each column you will need to create a corresponding field in detamoov. To create a field, click the Add Field button and start manually entering each column from the import file. 

 

When creating each field, you will need to enter the field name. Typically this is the header row value. So in the above file example, the first field we enter will be Emp#.

 

Next choose the type of data that exists in the field. There are 3 types of fields to choose from: String, Numeric and Date. Choose the appropriate data type for your field. If you've chosen a date field, you must identify the date pattern found in your import file. 

 

The last attribute for each field is the mandatory flag. If toggled to true, detamoov will validate that every row of the file contains a value. If any row does not, detamoov will not accept the data and will trigger an email alert to you.

 

When all fields from your import file are created, click Save Changes at the bottom of the list.  

 

 

Create CSV from file upload

 

You also have the ability to import a csv file to create a File Definition. By using this option, detamoov will detect all the fields in your import file and create them for you. 

 

In the File Definitions tab, click on the Add button and choose Upload Sample File (csv). 

 

 

Click on the Upload Sample Input File and choose the file from your computer you are looking to import.  Enter the Name for the File Definition. 

 

 

detamoov will now create field definitions for every column in the sample CSV you've selected. This is 50% of the battle but now you have the rest to complete. For each field created, you need to set the proper data type and mandatory flag settings

 

Once completed click on Save Changes at the bottom of the page.

 

 

Header Row with File Definitions

 

Many CSV File Definitions will include a Header row.  This row tells you the name of each column. If your import file has a header row, you'll want to make sure that Header Row option is turned on for your File Definition.  If your file does not include a Header Row then make sure to turn off the Header Row button.

 

 

Create fixed length by manually adding fields

 

detamoov also has the ability to allow you to create a fixed length file definition. Because of the nature of fixed length files, your only option for this type of file definition is to manually add the fields.  Click on the ADD button and and select Create New Definition.

 

 

Next, enter the File Definition Name and in the File Type dropdown choose Fixed Length. 

 

Now you need to add all the fields in the fixed length file definition. To do this, click the ADD FIELD button to start manually adding your fields.

 

 

For each field, enter the:

 

- Field Name

- Field Type (String, Number, Date)

- Field Length 

- Mandatory Flag

 

Once all fields have been entered click on Save Changes at the bottom.  Remember, any field marked as Mandatory will not process if there is a value missing in that field.

 


Publish the File Definition

 

In order for your File Definition to be available to you, you need to make sure to Publish the File Definition once you have completed it's setup.   You can find the Publish toggle at the top right area of your File Definition.   

 

 

Publishing your file definition now makes it available in all others of detamoov like creating a filter definition or a transformation definition.

scroll to top icon