AWS Data Pipeline | Functionality Flashcards
What is a schedule?
Functionality
AWS Data Pipeline | Analytics
Schedules define when your pipeline activities run and the frequency with which the service expects your data to be available. All schedules must have a start date and a frequency; for example, every day starting Jan 1, 2013, at 3pm. Schedules can optionally have an end date, after which time the AWS Data Pipeline service does not execute any activities. When you associate a schedule with an activity, the activity runs on it. When you associate a schedule with a data source, you are telling the AWS Data Pipeline service that you expect the data to be updated on that schedule. For example, if you define an Amazon S3 data source with an hourly schedule, the service expects that the data source contains new files every hour.
Does Data Pipeline supply any standard Activities?
Functionality
AWS Data Pipeline | Analytics
Yes, AWS Data Pipeline provides built-in support for the following activities:
CopyActivity: This activity can copy data between Amazon S3 and JDBC data sources, or run a SQL query and copy its output into Amazon S3.
HiveActivity: This activity allows you to execute Hive queries easily.
EMRActivity: This activity allows you to run arbitrary Amazon EMR jobs.
ShellCommandActivity: This activity allows you to run arbitrary Linux shell commands or programs.
Does AWS Data Pipeline supply any standard preconditions?
Functionality
AWS Data Pipeline | Analytics
Yes, AWS Data Pipeline provides built-in support for the following preconditions:
DynamoDBDataExists: This precondition checks for the existence of data inside a DynamoDB table.
DynamoDBTableExists: This precondition checks for the existence of a DynamoDB table.
S3KeyExists: This precondition checks for the existence of a specific AmazonS3 path.
S3PrefixExists: This precondition checks for at least one file existing within a specific path.
ShellCommandPrecondition: This precondition runs an arbitrary script on your resources and checks that the script succeeds.
Can I supply my own custom activities?
Functionality
AWS Data Pipeline | Analytics
Yes, you can use the ShellCommandActivity to run arbitrary Activity logic.
Can I supply my own custom preconditions?
Functionality
AWS Data Pipeline | Analytics
Yes, you can use the ShellCommandPrecondition to run arbitrary precondition logic.
Can you define multiple schedules for different activities in the same pipeline?
Functionality
AWS Data Pipeline | Analytics
Yes, simply define multiple schedule objects in your pipeline definition file and associate the desired schedule to the correct activity via its schedule field. This allows you to define a pipeline in which, for example, log files are stored in Amazon S3 each hour to drive generation of an aggregate report one time per day.
What happens if an activity fails?
Functionality
AWS Data Pipeline | Analytics
An activity fails if all of its activity attempts return with a failed state. By default, an activity retries three times before entering a hard failure state. You can increase the number of automatic retries to 10; however, the system does not allow indefinite retries. After an activity exhausts its attempts, it triggers any configured onFailure alarm and will not try to run again unless you manually issue a rerun command via the CLI, API, or console button.
How do I add alarms to an activity?
Functionality
AWS Data Pipeline | Analytics
You can define Amazon SNS alarms to trigger on activity success, failure, or delay. Create an alarm object and reference it in the onFail,onSuccess, or onLate slots of the activity object.
Can I manually rerun activities that have failed?
Functionality
AWS Data Pipeline | Analytics
Yes. You can rerun a set of completed or failed activities by resetting their state to SCHEDULED. This can be done by using the Rerun button in the UI or modifying their state in the command line or API. This will immediately schedule a of re-check all activity dependencies, followed by the execution of additional activity attempts. Upon subsequent failures, the Activity will perform the original number of retry attempts.
On what resources are activities run?
Functionality
AWS Data Pipeline | Analytics
AWS Data Pipeline activities are run on compute resources that you own. There are two types of compute resources: AWS Data Pipeline–managed and self-managed. AWS Data Pipeline–managed resources are Amazon EMR clusters or Amazon EC2 instances that the AWS Data Pipeline service launches only when they’re needed. Resources that you manage are longer running and can be any resource capable of running the AWS Data Pipeline Java-based Task Runner (on-premise hardware, a customer-managed Amazon EC2 instance, etc.).
Will AWS Data Pipeline provision and terminate AWS Data Pipeline-managed compute resources for me?
Functionality
AWS Data Pipeline | Analytics
Yes, compute resources will be provisioned when the first activity for a scheduled time that uses those resources is ready to run and those instances will be terminated when the final activity that uses the resources has completed successfully or failed.
Can multiple compute resources be used on the same pipeline?
Functionality
AWS Data Pipeline | Analytics
Yes, simply define multiple cluster objects in your definition file and associate the cluster to use for each activity via its runsOn field. This allows pipelines to combine AWS and on-premise resources, or to use a mix of instance types for their activities – for example, you may want to use a t1.micro to execute a quick script cheaply, but later on the pipeline may have an Amazon EMR job that requires the power of a cluster of larger instances.
Can I execute activities on on-premise resources, or AWS resources that I manage?
Functionality
AWS Data Pipeline | Analytics
Yes. To enable running activities using on-premise resources, AWS Data Pipeline supplies a Task Runner package that can be installed on your on-premise hosts. This package continuously polls the AWS Data Pipeline service for work to perform. When it’s time to run a particular activity on your on-premise resources, for example, executing a DB stored procedure or a database dump, AWS Data Pipeline will issue the appropriate command to the Task Runner. In order to ensure that your pipeline activities are highly available, you can optionally assign multiple Task Runners to poll for a given job. This way, if one Task Runner becomes unavailable, the others will simply pick up its work.