{"title":"Tasks","description":"Automate recurring work with Altertable Tasks. Set instructions, add context, and get notified when your data needs attention.","order":250,"askSuggestions":["How do I write instructions that avoid noisy notifications?","How do I load files from a bucket on a schedule?","How do I run a dbt project on a schedule?"],"navigation":true,"body":{"code":"var Component=(()=>{var g=Object.create;var i=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),x=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},o=(t,e,r,a)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let s of m(e))!k.call(t,s)&&s!==r&&i(t,s,{get:()=>e[s],enumerable:!(a=p(e,s))||a.enumerable});return t};var y=(t,e,r)=>(r=t!=null?g(f(t)):{},o(e||!t||!t.__esModule?i(r,\"default\",{value:t,enumerable:!0}):r,t)),v=t=>o(i({},\"__esModule\",{value:!0}),t);var d=w((D,c)=>{c.exports=_jsx_runtime});var I={};x(I,{default:()=>u,frontmatter:()=>b});var n=y(d()),b={title:\"Tasks\",description:\"Automate recurring work with Altertable Tasks. Set instructions, add context, and get notified when your data needs attention.\",order:250,askSuggestions:[\"How do I write instructions that avoid noisy notifications?\",\"How do I load files from a bucket on a schedule?\",\"How do I run a dbt project on a schedule?\"]};function l(t){let e={a:\"a\",h1:\"h1\",h2:\"h2\",li:\"li\",ol:\"ol\",p:\"p\",strong:\"strong\",ul:\"ul\",...t.components},{DocsPreviewDocument:r,DocsPreviewSection:a}=e;return r||h(\"DocsPreviewDocument\",!0),a||h(\"DocsPreviewSection\",!0),(0,n.jsxs)(r,{anchors:\"tasks create-a-task specialized-tasks run-privileges-and-secrets inspect-a-run learn-more\",children:[(0,n.jsxs)(a,{sectionId:\"tasks\",anchors:\"\",ancestors:\"\",index:\"0\",children:[(0,n.jsx)(e.h1,{id:\"tasks\",children:\"Tasks\"}),`\n`,(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.strong,{children:\"Tasks\"}),\" automate work you want to repeat: monitor metrics, check data quality, or investigate changes. Run a task manually or set a schedule.\"]}),`\n`,(0,n.jsxs)(e.p,{children:[\"Give the agent instructions and relevant context, such as a catalog, connection, segment, or metric. When it finds something worth your attention, it sends a \",(0,n.jsx)(e.a,{href:\"/docs/automation/notifications\",children:\"notification\"}),\".\"]}),`\n`,(0,n.jsx)(e.p,{children:\"For a recurring metric check, include the metric definition and the data it should query.\"}),`\n`]}),(0,n.jsxs)(a,{sectionId:\"create-a-task\",anchors:\"\",ancestors:\"\",index:\"1\",children:[(0,n.jsx)(e.h2,{id:\"create-a-task\",children:\"Create a task\"}),`\n`,(0,n.jsxs)(e.ol,{children:[`\n`,(0,n.jsxs)(e.li,{children:[\"Open \",(0,n.jsx)(e.strong,{children:\"Tasks\"}),\" and select \",(0,n.jsx)(e.strong,{children:\"New task\"}),\". You can also start a task from a catalog, connection, or segment.\"]}),`\n`,(0,n.jsx)(e.li,{children:\"Write instructions or start from a suggestion. Include the thresholds to check, what counts as noteworthy, and the context the task needs.\"}),`\n`,(0,n.jsxs)(e.li,{children:[\"Choose \",(0,n.jsx)(e.strong,{children:\"Manually\"}),\" or set a schedule that matches how often your data changes.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[\"Select \",(0,n.jsx)(e.strong,{children:\"Create task\"}),\". For a manual run, open the task menu and select \",(0,n.jsx)(e.strong,{children:\"Run now\"}),\".\"]}),`\n`]}),`\n`]}),(0,n.jsxs)(a,{sectionId:\"specialized-tasks\",anchors:\"\",ancestors:\"\",index:\"2\",children:[(0,n.jsx)(e.h2,{id:\"specialized-tasks\",children:\"Specialized tasks\"}),`\n`,(0,n.jsx)(e.p,{children:\"For workflows such as loading or transforming data, choose a specialized task:\"}),`\n`,(0,n.jsxs)(e.ul,{children:[`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:\"Code task\"}),\": run Python or Bash in an isolated environment.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:\"Synchronizer task\"}),\": copy tables from an external catalog, or \",(0,n.jsx)(e.a,{href:\"/docs/lakehouse/ingest/object-storage\",children:\"files from a bucket\"}),\", into a catalog on a schedule.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:\"dbt task\"}),\": \",(0,n.jsx)(e.a,{href:\"/docs/lakehouse/modeling/dbt#run-dbt-in-a-task\",children:\"run a dbt project\"}),\" from a connected repository to transform data in a catalog.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:\"dlt task\"}),\": \",(0,n.jsx)(e.a,{href:\"/docs/lakehouse/ingest/integrations/dlt\",children:\"load source data into a catalog\"}),\" with a Python pipeline.\"]}),`\n`]}),`\n`]}),(0,n.jsxs)(a,{sectionId:\"run-privileges-and-secrets\",anchors:\"\",ancestors:\"\",index:\"3\",children:[(0,n.jsx)(e.h2,{id:\"run-privileges-and-secrets\",children:\"Run privileges and secrets\"}),`\n`,(0,n.jsxs)(e.p,{children:[\"Review \",(0,n.jsx)(e.strong,{children:\"Run privileges\"}),\" before saving a task. A task can use its creator's current permissions, a specific set of permissions, or a service account. Creator-mode actions are attributed to the creator. Only administrators can operate tasks that run as a service account.\"]}),`\n`,(0,n.jsx)(e.p,{children:\"When an agent needs a task secret, enter it through the secret-entry form it opens. For code tasks, configure the required environment variables in the task settings. Keep credentials out of the instructions and source code.\"}),`\n`]}),(0,n.jsxs)(a,{sectionId:\"inspect-a-run\",anchors:\"\",ancestors:\"\",index:\"4\",children:[(0,n.jsx)(e.h2,{id:\"inspect-a-run\",children:\"Inspect a run\"}),`\n`,(0,n.jsx)(e.p,{children:\"Open a task's run history to inspect its status, output, and logs. Failed runs can produce a finding with a proposed fix; review that finding and the failed step before rerunning. Repeated failures can add comments to the existing finding rather than creating a separate notification each time.\"}),`\n`]}),(0,n.jsxs)(a,{sectionId:\"learn-more\",anchors:\"\",ancestors:\"\",index:\"5\",children:[(0,n.jsx)(e.h2,{id:\"learn-more\",children:\"Learn more\"}),`\n`,(0,n.jsxs)(e.ul,{children:[`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:(0,n.jsx)(e.a,{href:\"/docs/agents/ask\",children:\"Ask Altertable\"})}),\": natural-language analysis and monitoring\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:(0,n.jsx)(e.a,{href:\"/docs/automation/notifications\",children:\"Notifications\"})}),\": the findings that tasks produce\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:(0,n.jsx)(e.a,{href:\"/docs/agents/knowledge/memories\",children:\"Memories\"})}),\": knowledge agents carry across runs\"]}),`\n`]})]})]})}function u(t={}){let{wrapper:e}=t.components||{};return e?(0,n.jsx)(e,{...t,children:(0,n.jsx)(l,{...t})}):l(t)}function h(t,e){throw new Error(\"Expected \"+(e?\"component\":\"object\")+\" `\"+t+\"` to be defined: you likely forgot to import, pass, or provide it.\")}return v(I);})();\n;return Component;"},"_id":"docs/automation/tasks.mdx","_raw":{"sourceFilePath":"docs/automation/tasks.mdx","sourceFileName":"tasks.mdx","sourceFileDir":"docs/automation","contentType":"mdx","flattenedPath":"docs/automation/tasks"},"type":"Docs","path":"/automation/tasks","level":2,"parent":"automation"}