{"id":7362,"date":"2020-06-01T11:21:26","date_gmt":"2020-06-01T11:21:26","guid":{"rendered":"https:\/\/www.version1.com\/en-us\/?p=7362"},"modified":"2020-06-01T11:21:26","modified_gmt":"2020-06-01T11:21:26","slug":"kdb-amend-apply-and-error-trapping-for-beginners","status":"publish","type":"post","link":"https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/","title":{"rendered":"kdb+: Amend\/Apply and Error Trapping for Beginners&#8217;"},"content":{"rendered":"\n\nIn the latest of our \u2018kdb+ guides for Beginners\u2019 series, we\u2019ve decided to tackle <a href=\"https:\/\/www.version1.com\/sectors\/our-financial-services-expertise\/kdb-services-and-support-teams\/\">kdb+<\/a> Amend\/Apply and Error Trapping. Whether we\u2019re working with tables, lists or dictionaries, sometimes we want to only perform operations on a subset of our rows\/elements. This is where we can utilize the power of both . and @.\n<h2>Indexing<\/h2>\n<h2><strong>Indexing using @<\/strong><\/h2>\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend01-2.png\" alt=\"\" loading=\"lazy\">\n\nNOTE: container can be a table\/list\/dictionary\n<ul>\n \t<li>Selects elements from your container at indices provided.<\/li>\n<\/ul>\n<code>q)list: 10 20 30 40 50\nq)@[list;0 2]\n10 30<\/code>\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend02.png\" alt=\"\" loading=\"lazy\">\n<h2><strong>Indexing using .<\/strong><\/h2>\nAlthough most structures in q can be modified adequately using the various forms of \u2018@ Index\u2019 \u2013 it does have some limitations. \u2018@ Index\u2019 can only index at one level of depth, i.e, if we have a list; it can index to an element in the list.\n\nBut what if we had a list of lists, and wanted to index into an element of one of the sub lists? This is where we can harness the power of \u2018Dot Index\u2019. Dot Index allows us to provide a list of indices and with each of these indices, it will traverse down the nested data structure \u2013 so we can access nested elements. <a href=\"https:\/\/chartio.com\/learn\/databases\/how-does-indexing-work\/\">Here<\/a> is a further in dept blog on how indexing works.\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend03-2.png\" alt=\"\" loading=\"lazy\">\n<ul>\n \t<li>Selects elements of your nested container at indices provided.\n<ul>\n \t<li>If your indices are a single list, each subsequent index will index at an additional layer of depth.<\/li>\n \t<li>If your indices are a list of lists, each subsequent list of indices will index at increasing levels of depth.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<code>q)list: (1 2 3; 4 5 6;7 8 9)\n\/\/Indices are a single list\nq)@[list;0 1]\n2<\/code>\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend06.png\" alt=\"\" loading=\"lazy\">\n\n<code>q)list: (1 2 3; 4 5 6;7 8 9)\n\/\/Indices are a list of lists\nq)@[list;(2;1 2)]\n8 9<\/code>\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend08.png\" alt=\"\" loading=\"lazy\">\n<h2>Applying<\/h2>\n<h2><strong>Using @ Apply (3 Arguments)<\/strong><\/h2>\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend09-2.png\" alt=\"\" loading=\"lazy\">\n<ul>\n \t<li>Applies your function to each of the specified indices in your container.<\/li>\n \t<li>Used when your function only requires one input parameter (which will be the container values at the specified indices).<\/li>\n<\/ul>\n<strong>Working with lists<\/strong>\nIn the example below we want to multiply supplied indices on our list by 10.\n\n<code>q)list:10 20 30 40 50\nq)@[list; 0 2 4 ; {x*10} ]\n100 20 300 40 500<\/code>\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend11.png\" alt=\"\" loading=\"lazy\">\n\nOne caveat is that type of the resultant list must match the type of your input list. In the example below, the result of attempting to cast these indices to strings will result in a mixed list of longs and strings \u2013 and therefore throws a \u2018type error. This also applies to dictionaries and tables.\n\n<code>q)type 10 20 30 40 50\n7h\nq)@[10 20 30 40 50 ; 0 2 4 ; string ]\n\u2018type<\/code>\n\n<strong>Working with dictionaries<\/strong>\nIn the example below we want to update certain dictionary values to lowercase. When working with dictionaries, as opposed to indexing with numeric indices, we index using the dictionary keys \u2013 as these uniquely identify one value\/set of values. Note that <em>lower<\/em> is a predefined function in q, which takes a string and returns the string in lowercase.\n\n<code>q)users:`0001`0002`0003`0005!(\"JOHN\";\"TOM\";\"BRIAN\";\"KATIE\")\nq)users\n0001| \"JOHN\"\n0002| \"TOM\"\n0003| \"BRIAN\"\n0004| \"KATIE\"\nq)@[users;`0001`0004;lower]\n0001| \"john\"\n0002| \"TOM\"\n0003| \"BRIAN\"\n0004| \"katie\"<\/code>\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend14.png\" alt=\"\" loading=\"lazy\">\n\n<strong>Working with tables<\/strong>\nWhen using \u2018@ Apply\u2019 with tables, we can update a table column\u2019s values seamlessly, as we can index into tables using their column names. In the example below, we have a table of users with plaintext passwords. We can hide each user\u2019s password by running their passwords through an \u2018md5\u2019 hashing function \u2013 which essentially turns each password string into a 128 bit hash.\n\n<code>q)usertable:([]id:`0001`0002`0003`0004;name:(\"JOHN\";\"TOM\";\"BRIAN\";\"KATIE\");\npassword:(\"john1952\";\"bluedoor9\";\"rolex@23!\";\"qwerty\"))&gt;\nq)usertable\nid \u00a0 name \u00a0\u00a0\u00a0password\n------------------------\n0001 \"JOHN\"\u00a0\u00a0\"john1952\"\n0002 \"TOM\"\u00a0\u00a0\u00a0\"bluedoor9\"\n0003 \"BRIAN\"\u00a0\"rolex@23!\"\n0004 \"KATIE\"\u00a0\"qwerty\"\n\/\/We can index to view values stored in that column (list of strings)\nq)@[usertable;`password]\n\"john1952\"\n\"bluedoor9\"\n\"rolex@23!\"\n\"qwerty\"\nq)@[usertable;`password;md5 each]\nid \u00a0 name \u00a0\u00a0\u00a0password\n-----------------------------------------------\n0001 \"JOHN\" \u00a00x4b5472fe32502c3197ac8df8c7589158\n0002 \"TOM\" \u00a0 0x5b27b67a66d3aa275bf03b988d439f6d\n0003 \"BRIAN\" 0xf5abb5ecd27ef30d575966896ff138a9\n0004 \"KATIE\" 0xd8578edf8458ce06fbc5bb76a58c5ca4<\/code>\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend16.png\" alt=\"\" loading=\"lazy\">\n<h2>Using @ Apply (4 Arguments)<\/h2>\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend17-1.png\" alt=\"\" loading=\"lazy\">\n<ul>\n \t<li>Applies your\u00a0<b>function<\/b>\u00a0to each of the specified\u00a0<b>indices<\/b>\u00a0in your\u00a0<b>container<\/b>, using your <em>second_args<\/em> as the second parameter to your function (your first parameter being your container value at the specified indices).<\/li>\n \t<li>Used when your function requires two input parameters.<\/li>\n \t<li>The length of <em>second_args<\/em> must be equal to the length of indices supplied. However if an atom is supplied, it will be extended to a vector to match the indices length.<\/li>\n<\/ul>\n<strong>Working with lists<\/strong>\nSimilar to our list example with the 3 argument apply, we want to multiply our list at supplied indices by a number. The advantage in using the 4 argument apply is that it allows us to specify a different <em>y <\/em>argument (multiplier in this case) for each index.\n\n<code>q)list: 10 20 30 40 50\nq)@[list; 0 2 4 ; * ; 10 100 1000]\n100 20 3000 40 50000<\/code>\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend19.png\" alt=\"\" loading=\"lazy\">\n\nAs mentioned, if the length of <em>second_args<\/em> does not match the length of supplied indices and is not an atom \u2013 we will get a length error.\n\n<code>q)@[list; 0 2 4; * ; 10 20] \/\/3 indices, 2 supplied values\n'length<\/code>\n\n<strong>Working with dictionaries<\/strong>\nIn this scenario, we want to append surnames onto a specified list of users in our <em>users <\/em>dictionary. We can achieve this by utilizing the inbuilt join (,) function, which can be used to join strings.\n\n<code>q)users:`0001`0002`0003`0005!(\u201cJOHN\u201d;\u201dTOM\u201d;\u201dBRIAN\u201d;\u201dKATIE\u201d)\nq)@[users;`0002`0005;,;(\" GREEN\";\" JONES\")]\n0001| \"JOHN\"\n0002| \"TOM GREEN\"\n0003| \"BRIAN\"\n0005| \"KATIE JONES\"<\/code>\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend22.png\" alt=\"\" loading=\"lazy\">\n\n<strong>Working with tables<\/strong>\nWe can use the 4 argument apply to increase\/decrease the value of a column\u2019s values by supplying a list of numbers to add. In the example below we want to update the quantity of each of our stocks to match trades that were executed throughout the day.\n\n<code>q)stocks:([] sym:`VOD`AAPL`GOOG; price:152.8 205.5 104.8; quantity: 40 500 80)\nq)stocks\nsym \u00a0price quantity\n-------------------\nVOD \u00a0152.8 40\nAAPL 205.5 500\nGOOG 104.8 80\nq)@[stocks;`quantity;+;30 -10 19]\nsym \u00a0price quantity\n-------------------\nVOD \u00a0152.8 70\nAAPL 205.5 490\nGOOG 104.8 99<\/code>\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend24.png\" alt=\"\" loading=\"lazy\">\n\nNOTE: The number of second arguments supplied must equal the length of your table when indexing using column names.\n<h2>Using . Apply (4 Arguments)<\/h2>\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend32-1.png\" alt=\"\" loading=\"lazy\">\n\n<strong>Working with nested lists<\/strong>\nIn the example below we want to update multiple elements inside multiple lists. Each of our <em>second_args<\/em> is extended to match the length of indices in their sublists.\n\n<code>q)numSquare:(1 2 3 4;5 6 7 8;9 10 11 12)\nq)numSquare\n1 2 \u00a03 \u00a04\n5 7 \u00a08 \u00a09\n9 10 11 12\n\/\/2 argument dot apply to view selected elements\nq).[numSquare;(1 2;0 3)]\n5 8\n9 12\n\/\/We first index the 2nd and 3rd Lists, then elements 0th and 3rd element in each of these lists.\nq).[numSquare;(1 2;0 3);*;10 100]\n1 \u00a0 2 \u00a03 \u00a04\n50 \u00a06 \u00a07 \u00a080\n900 10 11 1200<\/code>\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend34.png\" alt=\"\" loading=\"lazy\">\n\n<strong>Working with tables<\/strong>\nIn this example we demonstrate how we can update multiple elements from different columns\/rows in a table from one functional dot apply. Below we update the latest price\/quantity changes on two symbols in our portfolio.\n\n<code>q)stocks:([] sym:`VOD`AAPL`GOOG; price:152.8 205.5 104.8; quantity: 40 500 80)\nq)stocks\nsym \u00a0price quantity\n-------------------\nVOD \u00a0152.8 40\nAAPL 205.5 500\nGOOG 104.8 80\n\/\/Index into 1st and 2nd rows. Then index `price`column on these two rows.\nq).[stocks;(1 2;`price`quantity);+;(0.5 -20;-6.3 150)]\nsym \u00a0price quantity\n-------------------\nVOD \u00a0152.8 40\nAAPL 206 \u00a0 480\nGOOG 98.5 \u00a0230<\/code>\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend36.png\" alt=\"\" loading=\"lazy\">\n\n<strong>Working with keyed tables<\/strong>\nKeyed tables work a little differently to regular tables due to their structure \u2018under the hood\u2019. To index into a keyed table, instead of using row number to select an individual row, we use the keyed column\u2019s values. In the example below we have a keyed table with holds information on our users and want to increase the age and weight of one of our users (\u2018matt\u2019).\n\n<code>q) userstats:([name:`lisa`chris`matt] age:21 35 26; weight: 125 190 145; height: 168 221 91)\nq)userstats\nname | age weight height\n-----| -----------------\nlisa | 21 \u00a0125 \u00a0\u00a0 168\nchris| 35 \u00a0190 \u00a0\u00a0 221\nmatt | 26 \u00a0145 \u00a0\u00a0 91\n\/\/Index by key column value `matt. Then index into our rows using `age`weight.\nq).[userstats;(`matt;`age`weight);+;1 25]\nname | age weight height\n---- | -----------------\nlisa | 21 \u00a0125 \u00a0\u00a0 168\nchris| 35 \u00a0190 \u00a0\u00a0 221\nmatt | 27 \u00a0170 \u00a0\u00a0 91<\/code>\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend38.png\" alt=\"\" loading=\"lazy\">\n<h2>Trapping<\/h2>\n<h2><strong>Trapping using @<\/strong><\/h2>\n<p>Similar to a \u2018try catch\u2019 statement in more conventional programming languages, we can also trap errors in q. Note that our <em>error_statement<\/em> can have two different forms:<\/p>\n\n<ul>\n \t<li>\n<ul>\n \t<li>A generic output of any type e.g,\u00a0\u00a0error string\/ integer error code.<\/li>\n \t<li>A function where the <em>x <\/em>argument is set by default to the console thrown error (as a string).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend39-1.png\" alt=\"\" loading=\"lazy\">\n<ul>\n \t<li>\n<ul>\n \t<li>Function below accepts 1 argument:<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<code>\/\/We error trap our function \u2013 but it completes successfully, so trap isn't hit.\nq)func: {1 + x}\nq)@[ func ; 2 ; \"Function has returned an error\"]\n3<\/code>\n\n<code>\/\/ GENERIC TRAP\nq)@[ func; `hello ; \"Function has returned an error\"]\n\"Function has returned an error\"<\/code>\n\n<code>\/\/ FUNCTION TRAP\nq)@[ func; `hello ; {\"Failed to complete addition function \u2013 error is: \", x}]\n\"Failed to complete addition function - error is: type\"<\/code>\n<h2><strong>Trapping using .<\/strong><\/h2>\n<p>We can use dot notation to trap errors when we have a function that requires multiple arguments.<\/p>\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/amend41-1.png\" alt=\"\" loading=\"lazy\">\n<ul>\n \t<li><em>args<\/em> is a list of input parameters.<\/li>\n \t<li>Each <em>args<\/em> will be passed sequentially to the function as individual input parameters.<\/li>\n<\/ul>\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/Picture19.png\" alt=\"\" loading=\"lazy\">\n\n<code>\/\/Successful execution \u2013 error trap not 'hit'\nq) .[ {x + y + z} ; (20;50;30)  ; \"Function has returned an error\"]\n100<\/code>\n\n<code>\/\/  GENERIC TRAP\nq).[ {x + y + z} ; (20;50;\"c\") ; \"ERROR\"]\n\"ERROR\" <\/code>\n\n<code>\/\/ FUNCTION TRAP\nq).[ {x + y + z} ; (20;50;\"c\") ; {\"Function has returned an error: \", x}]\n\"Function has returned an error: type\"<\/code>\n\nNote that if we supply more parameters than our function can handle, we will get a <em> rank <\/em> error:\n\n<code>\/\/Expects 2 input parameters, 3 are supplied.\nq).[ {x + y} ; (20;50;30)  ; {\"Function has returned an error \", x}]\n\"Function has returned an error: rank\"<\/code>","protected":false},"excerpt":{"rendered":"<p>In the latest of our \u2018kdb+ guides for Beginners\u2019 series, we\u2019ve decided to tackle kdb+ Amend\/Apply and Error Trapping. Whether we\u2019re working with tables, lists or dictionaries, sometimes we want to only perform operations on a subset of our rows\/elements. This is where we can utilize the power of both . and @. Indexing Indexing [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":7363,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"categories":[101],"tags":[],"industry":[],"class_list":["post-7362","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"acf":[],"translations":[{"blog_id":1,"post_id":7362,"name":"Europe","code":"EN-GB","hreflang":"en-gb","url":"https:\/\/www.version1.com\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/","is_current":false},{"blog_id":13,"post_id":7362,"name":"Americas","code":"EN-US","hreflang":"en-us","url":"https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/","is_current":true}],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>kdb+: Amend\/Apply and Error Trapping for Beginners&#039; | Version 1 (US)<\/title>\n<meta name=\"description\" content=\"In the latest of our \u2018kdb+ guides for Beginners\u2019 series, we\u2019ve decided to tackle kdb+ Amend\/Apply and Error Trapping.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"kdb+: Amend\/Apply and Error Trapping for Beginners&#039; | Version 1 (US)\" \/>\n<meta property=\"og:description\" content=\"In the latest of our \u2018kdb+ guides for Beginners\u2019 series, we\u2019ve decided to tackle kdb+ Amend\/Apply and Error Trapping.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/\" \/>\n<meta property=\"og:site_name\" content=\"Version 1 (US)\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-01T11:21:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.version1.com\/en-us\/wp-content\/uploads\/2020\/06\/work-731198_1920.png.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"680\" \/>\n\t<meta property=\"og:image:height\" content=\"440\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-amend-apply-and-error-trapping-for-beginners\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-amend-apply-and-error-trapping-for-beginners\\\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"kdb+: Amend\\\/Apply and Error Trapping for Beginners&#8217;\",\"datePublished\":\"2020-06-01T11:21:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-amend-apply-and-error-trapping-for-beginners\\\/\"},\"wordCount\":1015,\"publisher\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-amend-apply-and-error-trapping-for-beginners\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/work-731198_1920.png.webp\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-amend-apply-and-error-trapping-for-beginners\\\/\",\"url\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-amend-apply-and-error-trapping-for-beginners\\\/\",\"name\":\"kdb+: Amend\\\/Apply and Error Trapping for Beginners' | Version 1 (US)\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-amend-apply-and-error-trapping-for-beginners\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-amend-apply-and-error-trapping-for-beginners\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/work-731198_1920.png.webp\",\"datePublished\":\"2020-06-01T11:21:26+00:00\",\"description\":\"In the latest of our \u2018kdb+ guides for Beginners\u2019 series, we\u2019ve decided to tackle kdb+ Amend\\\/Apply and Error Trapping.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-amend-apply-and-error-trapping-for-beginners\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-amend-apply-and-error-trapping-for-beginners\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-amend-apply-and-error-trapping-for-beginners\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/work-731198_1920.png.webp\",\"contentUrl\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/work-731198_1920.png.webp\",\"width\":680,\"height\":440,\"caption\":\"person hands typing on laptop\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-amend-apply-and-error-trapping-for-beginners\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"kdb+: Amend\\\/Apply and Error Trapping for Beginners&#8217;\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/#website\",\"url\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/\",\"name\":\"Version 1\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/#organization\",\"name\":\"Version 1\",\"url\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.version1.com\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/cropped-cropped-Favicon-2.png\",\"contentUrl\":\"https:\\\/\\\/www.version1.com\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/cropped-cropped-Favicon-2.png\",\"width\":512,\"height\":512,\"caption\":\"Version 1\"},\"image\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"kdb+: Amend\/Apply and Error Trapping for Beginners' | Version 1 (US)","description":"In the latest of our \u2018kdb+ guides for Beginners\u2019 series, we\u2019ve decided to tackle kdb+ Amend\/Apply and Error Trapping.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/","og_locale":"en_US","og_type":"article","og_title":"kdb+: Amend\/Apply and Error Trapping for Beginners' | Version 1 (US)","og_description":"In the latest of our \u2018kdb+ guides for Beginners\u2019 series, we\u2019ve decided to tackle kdb+ Amend\/Apply and Error Trapping.","og_url":"https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/","og_site_name":"Version 1 (US)","article_published_time":"2020-06-01T11:21:26+00:00","og_image":[{"width":680,"height":440,"url":"https:\/\/www.version1.com\/en-us\/wp-content\/uploads\/2020\/06\/work-731198_1920.png.webp","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/#article","isPartOf":{"@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/"},"author":{"name":"","@id":""},"headline":"kdb+: Amend\/Apply and Error Trapping for Beginners&#8217;","datePublished":"2020-06-01T11:21:26+00:00","mainEntityOfPage":{"@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/"},"wordCount":1015,"publisher":{"@id":"https:\/\/www.version1.com\/en-us\/#organization"},"image":{"@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/#primaryimage"},"thumbnailUrl":"https:\/\/www.version1.com\/en-us\/wp-content\/uploads\/2020\/06\/work-731198_1920.png.webp","articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/","url":"https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/","name":"kdb+: Amend\/Apply and Error Trapping for Beginners' | Version 1 (US)","isPartOf":{"@id":"https:\/\/www.version1.com\/en-us\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/#primaryimage"},"image":{"@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/#primaryimage"},"thumbnailUrl":"https:\/\/www.version1.com\/en-us\/wp-content\/uploads\/2020\/06\/work-731198_1920.png.webp","datePublished":"2020-06-01T11:21:26+00:00","description":"In the latest of our \u2018kdb+ guides for Beginners\u2019 series, we\u2019ve decided to tackle kdb+ Amend\/Apply and Error Trapping.","breadcrumb":{"@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/#primaryimage","url":"https:\/\/www.version1.com\/en-us\/wp-content\/uploads\/2020\/06\/work-731198_1920.png.webp","contentUrl":"https:\/\/www.version1.com\/en-us\/wp-content\/uploads\/2020\/06\/work-731198_1920.png.webp","width":680,"height":440,"caption":"person hands typing on laptop"},{"@type":"BreadcrumbList","@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-amend-apply-and-error-trapping-for-beginners\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.version1.com\/en-us\/"},{"@type":"ListItem","position":2,"name":"kdb+: Amend\/Apply and Error Trapping for Beginners&#8217;"}]},{"@type":"WebSite","@id":"https:\/\/www.version1.com\/en-us\/#website","url":"https:\/\/www.version1.com\/en-us\/","name":"Version 1","description":"","publisher":{"@id":"https:\/\/www.version1.com\/en-us\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.version1.com\/en-us\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.version1.com\/en-us\/#organization","name":"Version 1","url":"https:\/\/www.version1.com\/en-us\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.version1.com\/en-us\/#\/schema\/logo\/image\/","url":"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/05\/cropped-cropped-Favicon-2.png","contentUrl":"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/05\/cropped-cropped-Favicon-2.png","width":512,"height":512,"caption":"Version 1"},"image":{"@id":"https:\/\/www.version1.com\/en-us\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/posts\/7362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/comments?post=7362"}],"version-history":[{"count":0,"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/posts\/7362\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/media\/7363"}],"wp:attachment":[{"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/media?parent=7362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/categories?post=7362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/tags?post=7362"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/industry?post=7362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}