Skip to content
GitHubXDiscordRSS

Schedule

Learn how to create, update, and manage AWS DataBrew Schedules using Alchemy Cloud Control.

The Schedule resource allows you to manage AWS DataBrew Schedules for automating jobs on a specified cadence.

Create a basic DataBrew Schedule with required properties and one optional tag:

import AWS from "alchemy/aws/control";
const dataBrewSchedule = await AWS.DataBrew.Schedule("daily-data-processing", {
Name: "DailyDataProcessing",
CronExpression: "cron(0 12 * * ? *)",
JobNames: ["DataCleaningJob"],
Tags: [
{ Key: "Environment", Value: "Production" }
]
});

Configure a DataBrew Schedule with additional options, such as multiple jobs and additional tags:

const advancedSchedule = await AWS.DataBrew.Schedule("weekly-data-reports", {
Name: "WeeklyDataReports",
CronExpression: "cron(0 10 ? * MON *)",
JobNames: ["WeeklySalesReportJob", "WeeklyInventoryJob"],
Tags: [
{ Key: "Department", Value: "Sales" },
{ Key: "Status", Value: "Active" }
]
});

Create a DataBrew Schedule while adopting an existing resource if it already exists:

const adoptSchedule = await AWS.DataBrew.Schedule("adopted-schedule", {
Name: "AdoptedExistingSchedule",
CronExpression: "cron(0 15 * * ? *)",
JobNames: ["AdoptedJob"],
adopt: true // This will attempt to adopt the existing schedule if present
});

Update the tags of an existing DataBrew Schedule to reflect changes in project classification:

const updatedTagsSchedule = await AWS.DataBrew.Schedule("updated-tags-schedule", {
Name: "UpdatedTagsSchedule",
CronExpression: "cron(0 9 * * ? *)",
JobNames: ["DataQualityCheckJob"],
Tags: [
{ Key: "Project", Value: "DataQuality" },
{ Key: "LastUpdated", Value: "2023-10-01" }
]
});