Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!
The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.
Hi team
I want to access values in a dictionary without using a loop, because in real-time we have 440 rows, and each row has 150 columns. Running a loop over each row to get values is causing performance issues.
I checked the Appian Community and found that we can use the a!keys() function to extract all keys
a!keys()
Id (PK), PartNumber, Status, Country_1, Country_2, Country_3, ..., Country_150We are using CDT to get data from DB so output of CDT in dictionary format.Expected output:
Id (PK), PartNumber, Status, Country_1, Country_2, Country_3, ..., Country_150We are using CDT to get data from DB so output of CDT in dictionary format.
Discussion posts and replies are publicly visible
Goddati Venkatesh said:Running a loop over each row to get values is causing performance issues.
Simply, Use dot-notation/index/property to extract all columns at once without loops.
Goddati Venkatesh said:One way i found is writing index on all 150 columns but it will increase code length is ther other alternative way other than this
Code length does NOT affect performance - only execution complexity does. Writing 150 dot notation or index() statements executes much faster than loops.Alternatively, Create an aggregated view: SELECT request_id, GROUP_CONCAT(country SEPARATOR ',') as countries_list FROM child_table GROUP BY request_id. Returns one row per request with comma-separated countries. In Appian: split(local!data.countries_list, ",").
Thank you all for your time,
Shubham Aware
Create an aggregated view: SELECT request_id, GROUP_CONCAT(country SEPARATOR ',') as countries_list FROM child_table GROUP BY request_id. Returns one row per request with comma-separated countries.In Appian: split(local!data.countries_list, ",").
This is working fine and data loading without delay.
That's good to know.