Fetch Schema Names, Table Names and their Sizes

Certified Associate Developer

Hi Community team,

I have an requirement to fetch all the Schema Names and their associated 'Table Names with their Sizes'  to display them in the appian interface.

In order to achieve this, From the cloud database I have executed the following SQL statement which gives me the output: 

SELECT table_schema as `DB`, table_name AS `Table`, 
ROUND(((data_length + index_length) / 1024 / 1024), 2) AS `Size` 
FROM information_schema.TABLES WHERE TABLE_SCHEMA IN ("Appian", "SchemaA", "SchemaB") ORDER BY `Size` DESC;

On executing the result: EX

DB Table Size
Appian data 30.56
Appian example 28.52
ScheamA customer 3.52
Appian document 3.52
SchemA CaptureDetails 2.64
SchemaB Controls Library 2.52

Similarly, I'm trying to implement the same functionality in Appian using Query Database Smart Service in Process Model, on the set-up tab I'm able see only one schema(Selecting Pre-defined schema ) details:

Instead of that I need to retrieve all the mentioned schema details. Kindly let me know any solution for this.

Thanks in advance,

Chandrasekhar

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data