0

I am working with SAP HANA I would like to know if it is possible to get disk size of CSV data with SQL.

The CSV data that I mean is the file \index\SCHEMA NAME\CL\TABLE_NAME\data.csv after export.

Best Regards Houssem

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Houssem Hariz
  • 55
  • 3
  • 12

1 Answers1

1

Nope, there is no way to generate this directly.\

You could, however, do some rough estimation, by looking at M_CS_COLUMNS to see the estimated uncompressed size for each column.

Then you could add six bytes (double byte encoding) for every column * no. of records to account for the enclosing quotation marks and separators between columns.

Lars Br.
  • 9,949
  • 2
  • 15
  • 29
  • Thanks Lars, it didn't work, unfortunatly. When I do a Sum of umcompressed data for a table it gives for example 386332 and my csv file size is 344KB so I need maybe to reduce something to get the result. – Houssem Hariz Dec 02 '16 at 11:53
  • Well, the uncompressed size is always only an estimation. Also, it's in Bytes, so to me this converts to 377KB which is not too bad for an estimation. – Lars Br. Dec 02 '16 at 12:22