We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


Vertica native format — Vertica Forum

Vertica native format

Hi!

I write a dump application fo Vertica via ODBC and I almost finished with functionality - "dump to Vertica's NATIVE format", but some things are not clear for me(or missing) to finish it.


Lets talk about Vertica's example: http://my.vertica.com/docs/7.1.x/HTML/index.htm#Authoring/AdministratorsGuide/BinaryFilesAppendix/Cr...

1. How to calculate buffer length of NUMERIC field?
Formula with operators that I don't understand - "¸" and "'".
From my understanding a formula is:
CEIL((precision / 19) + 1) * 8)
2. How to convert NUMERIC field to binary format? (no description)


3. Description for BINARY column isn't clear. Why 3 bytes for BINCOL while its defined as BINARY(1)?


4. Formula for NULL values isn't clear. Can someone to elaborate it?
A series of bytes whose bits indicate whether a column contains a NULL. The most significant bit of the first byte indicates whether the first column in this row contains a NULL, the next most significant bit indicates whether the next column contains a NULL, and so on. If a bit is 1 (true) then the column contains a NULL, and there is no value for the column in the data for the row.
For example if I have 5 columns and col 3 and 5 is NULLs so indicator will be:
"00101" = False, False, True, False, True => \x05\x00
Do I understand it right?


Thanks.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file