Feed File

A feed file describes the structure of source data files and data types in their columns. Once you created and uploaded the feed file, keep it in the folder and do not change it until the structure of the source files changes (for example, a column is added to a source file).

You can have only one feed file.

Contents:

File Structure

The feed file is a text file delimited with vertical bars ( | ). The whole content of the feed file is case-sensitive.

The feed file has the following columns:

NameMandatory?Description
fileyesThe name of the entity which the row describes
versionyes

The version of the entity
Use 'version' to version entities in the source files if you want to process the files in different structures. You can put multiple versions of the same entity, and you can keep the older version of the entity in the feed file to allow smooth transition between versions.

The version can have one decimal place.

Example:
1.0
3.23

fieldyesThe name of the column
It can differ from the column name in the header of the CSV file because the header of the CSV file is ignored.
typeyes

The data type of the field

For the supported types, see Data Types.

orderyesThe order in which the fields are sorted in the source files (from the lowest to the highest number; the first column has 0)
date_formatno

The format of dates in data
Example: 'DD.MM.YYYY'

For more information, see Template Patterns for Date/Time Formatting in Vertica.

encodingno

The encoding type of fields

For information about available options, see Encoding Types in Vertica.

  • Do not change field names after the first run. If you change a field name, CSV Downloader treats this as if the field has been removed, and adds a new field. This may result into data inconsistency in the database (data being not in the same columns).
  • Do not change the order of the fields. Changing the order of the fields in metadata may result in CSV Downloader not working correctly.

Data Types

The following field data types are supported:

SQL type representationFeed file type name
varchar(X)varchar(X)
varchar(255)varchar
decimal(16,10)decimal
decimal(X,Y)decimal(X,Y)
booleanboolean
integerinteger
date (with time)datetime
date (without time)date
time (without date)time
timestamp (without timezone)timestamp without timezone
array[int]array[int]*
array[varchar]array[varchar]*
array[varchar(X)]array[varchar(X)]*

* The database parser must be the Vertica fcsvparser parser with type set to either traditional or rfc4180 (see 'Describe the structure of the source CSV files' in CSV Downloader):

"db_parser": "fcsvparser-traditional"

or

"db_parser": "fcsvparser"

File Name

The recommended name of the feed file is feed.txt.

File Examples

file|version|field|type|order
Account|1.0|ID|integer|0
Account|1.0|Name|string-255|1
Account|1.0|Attribute1|string-255|2
Account|1.0|Attrubute2|string-255|3
Account|1.1|Name|string-255|1
Account|1.1|Attribute1|string-255|2
Account|1.1|Attrubute2|string-255|3
Account|1.1|Attribute3|string-255|4
Account|1.1|date1|datetime|5
Account|1.1|date2|timestamp without time zone|6
User|1.0|ID|integer|1
User|1.0|Name|string-255|2
User|1.0|Attribute1|string-255|3
Facts|1.0|ID|integer|1
Facts|1.0|account_id|integer|2
Facts|1.0|user_id|integer|3
Facts|1.0|fact1|decimal-20-5|4
Facts|1.2|ID|integer|1
Facts|1.2|account_id|integer|2
Facts|1.2|user_id|integer|3
Facts|1.2|fact1|decimal-20-5|4
Facts|1.2|fact2|decimal-20-5|5
Department|1.0|Name|string-255|1
Department|1.0|Number|array[int]|2
Department|1.0|Address|array[varchar]|3
file|version|field|type|order|encoding|date_format
Account|1.0|ID|integer|0||
Account|1.0|Name|string-255|1||
Account|1.0|Attribute1|string-255|2|RLE|
Account|1.0|date1|datetime|5||DD/MM/YYYY
Account|1.0|date2|timestamp without time zone|6||DD/MM/YYYY
file|version|field|type|order|date_format
Account|1.0|ID|integer|0|
Account|1.0|Name|varchar(255)|1|
Account|1.0|City|varchar(255)|2|
Account|1.0|Note|varchar(255)|3|
Account|1.0|timeCreated|timestamp|4|YYYY-MM-DD HH24:MI:SS.MS
Account|1.0|dateOpened|date|5|YYYY-MM-DD
Account|1.0|dateClosed|timestamp|6|YYYY-MM-DD HH24:MI:SS.MS
User|1.0|ID|integer|0|
User|1.0|Name|varchar(255)|1|
User|1.0|Attribute1|varchar(255)|2|
Product|1.0|ID|integer|0|
Product|1.0|product_name|varchar(255)|1|
Product|1.0|type|varchar(255)|2|
Facts|1.0|ID|integer|0|
Facts|1.0|fact1|decimal(20,5)|1|
Facts|1.2|ID|integer|0|
Facts|1.2|fact1|decimal(20,5)|1|
Facts|1.2|product_id|integer|2|
Facts|1.2|fact2|decimal(20,5)|3|
Powered by Atlassian Confluence and Scroll Viewport.