This snippet of code is part of the HANA mini-checks and we want to use it in a bods df, however we are against copying sql into a bods sql window and launching it, so we would like to use the bods sources, transforms, etc. so we get good advantage of the push-down functionality.
Additionally we have told our developers not to use the sql window either so I'd like not to break any rules we created.
Here is the sql snip:
SELECT 'COLUMN' AREA,
GREATEST(0, MERGE_COUNT - LEAD(MERGE_COUNT, 1) OVER (PARTITION BY SCHEMA_NAME, TABLE_NAME, PART_ID, HOST ORDER BY SERVER_TIMESTAMP DESC)) MERGES
FROM _SYS_STATISTICS.HOST_COLUMN_TABLES_PART_SIZE CT
So that lead function I need to remediate it in BODS.
Anyone familiar with how it should be remediated?
Thanks for your review.