Analytics | AWS Glue Flashcards

1
Q

What is AWS Glue?

General

AWS Glue | Analytics

A

AWS Glue is a fully-managed, pay-as-you-go, extract, transform, and load (ETL) service that automates the time-consuming steps of data preparation for analytics. AWS Glue automatically discovers and profiles your data via the Glue Data Catalog, recommends and generates ETL code to transform your source data into target schemas, and runs the ETL jobs on a fully managed, scale-out Apache Spark environment to load your data into its destination. It also allows you to setup, orchestrate, and monitor complex data flows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do I get started with AWS Glue?

General

AWS Glue | Analytics

A

To start using AWS Glue, simply sign into the AWS Management Console and navigate to “Glue” under the “Analytics” category. You can follow one of our guided tutorials that will walk you through an example use case for AWS Glue. You can also find sample ETL code in our GitHub repository under AWS Labs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the main components of AWS Glue?

General

AWS Glue | Analytics

A

AWS Glue consists of a Data Catalog which is a central metadata repository, an ETL engine that can automatically generate Scala or Python code, and a flexible scheduler that handles dependency resolution, job monitoring, and retries. Together, these automate much of the undifferentiated heavy lifting involved with discovering, categorizing, cleaning, enriching, and moving data, so you can spend more time analyzing your data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When should I use AWS Glue?

General

AWS Glue | Analytics

A

You should use AWS Glue to discover properties of the data you own, transform it, and prepare it for analytics. Glue can automatically discover both structured and semi-structured data stored in your data lake on Amazon S3, data warehouse in Amazon Redshift, and various databases running on AWS. It provides a unified view of your data via the Glue Data Catalog that is available for ETL, querying and reporting using services like Amazon Athena, Amazon EMR, and Amazon Redshift Spectrum. Glue automatically generates Scala or Python code for your ETL jobs that you can further customize using tools you are already familiar with. AWS Glue is serverless, so there are no compute resources to configure and manage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What data sources does AWS Glue support?

AWS Glue Data Catalog

AWS Glue | Analytics

A

AWS Glue natively supports data stored in Amazon Aurora, Amazon RDS for MySQL, Amazon RDS for Oracle, Amazon RDS for PostgreSQL, Amazon RDS for SQL Server, Amazon Redshift, and Amazon S3, as well as MySQL, Oracle, Microsoft SQL Server, and PostgreSQL databases in your Virtual Private Cloud (Amazon VPC) running on Amazon EC2. The metadata stored in the AWS Glue Data Catalog can be readily accessed from Amazon Athena, Amazon EMR, and Amazon Redshift Spectrum. You can also write custom Scala or Python code and import custom libraries and Jar files into your Glue ETL jobs to access data sources not natively supported by AWS Glue. For more details on importing custom libraries, refer to our documentation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the AWS Glue Data Catalog?

AWS Glue Data Catalog

AWS Glue | Analytics

A

The AWS Glue Data Catalog is a central repository to store structural and operational metadata for all your data assets. For a given data set, you can store its table definition, physical location, add business relevant attributes, as well as track how this data has changed over time.

The AWS Glue Data Catalog is Apache Hive Metastore compatible and is a drop-in replacement for the Apache Hive Metastore for Big Data applications running on Amazon EMR. For more information on setting up your EMR cluster to use AWS Glue Data Catalog as an Apache Hive Metastore, click here.

The AWS Glue Data Catalog also provides out-of-box integration with Amazon Athena, Amazon EMR, and Amazon Redshift Spectrum. Once you add your table definitions to the Glue Data Catalog, they are available for ETL and also readily available for querying in Amazon Athena, Amazon EMR, and Amazon Redshift Spectrum so that you can have a common view of your data between these services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do I get my metadata into the AWS Glue Data Catalog?

AWS Glue Data Catalog

AWS Glue | Analytics

A

AWS Glue provides a number of ways to populate metadata into the AWS Glue Data Catalog. Glue crawlers scan various data stores you own to automatically infer schemas and partition structure and populate the Glue Data Catalog with corresponding table definitions and statistics. You can also schedule crawlers to run periodically so that your metadata is always up-to-date and in-sync with the underlying data. Alternately, you can add and update table details manually by using the AWS Glue Console or by calling the API. You can also run Hive DDL statements via the Amazon Athena Console or a Hive client on an Amazon EMR cluster. Finally, if you already have a persistent Apache Hive Metastore, you can perform a bulk import of that metadata into the AWS Glue Data Catalog by using our import script.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are AWS Glue crawlers?

AWS Glue Data Catalog

AWS Glue | Analytics

A

An AWS Glue crawler connects to a data store, progresses through a prioritized list of classifiers to extract the schema of your data and other statistics, and then populates the Glue Data Catalog with this metadata. Crawlers can run periodically to detect the availability of new data as well as changes to existing data, including table definition changes. Crawlers automatically add new tables, new partitions to existing table, and new versions of table definitions. You can customize Glue crawlers to classify your own file types.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do I import data from my existing Apache Hive Metastore to the AWS Glue Data Catalog?

AWS Glue Data Catalog

AWS Glue | Analytics

A

You simply run an ETL job that reads from your Apache Hive Metastore, exports the data to an intermediate format in Amazon S3, and then imports that data into the AWS Glue Data Catalog.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Do I need to maintain my Apache Hive Metastore if I am storing my metadata in the AWS Glue Data Catalog?

AWS Glue Data Catalog

AWS Glue | Analytics

A

No. AWS Glue Data Catalog is Apache Hive Metastore compatible. You can point to the Glue Data Catalog endpoint and use it as an Apache Hive Metastore replacement. For more information on how to configure your cluster to use AWS Glue Data Catalog as an Apache Hive Metastore, please read our documentation here.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

If I am already using Amazon Athena or Amazon Redshift Spectrum and have tables in Amazon Athena’s internal data catalog, how can I start using the AWS Glue Data Catalog as my common metadata repository?

Extract, transform, and load (ETL)

AWS Glue | Analytics

A

Before you can start using AWS Glue Data Catalog as a common metadata repository between Amazon Athena, Amazon Redshift Spectrum, and AWS Glue, you must upgrade your Amazon Athena data catalog to AWS Glue Data Catalog. The steps required for the upgrade are detailed here.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What programming language can I use to write my ETL code for AWS Glue?

Extract, transform, and load (ETL)

AWS Glue | Analytics

A

You can use either Scala or Python.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How can I customize the ETL code generated by AWS Glue?

Extract, transform, and load (ETL)

AWS Glue | Analytics

A

AWS Glue’s ETL script recommendation system generates Scala or Python code. It leverages Glue’s custom ETL library to simplify access to data sources as well as manage job execution. You can find more details about the library in our documentation. You can write ETL code using AWS Glue’s custom library or write arbitrary code in Scala or Python by using inline editing via the AWS Glue Console script editor, downloading the auto-generated code, and editing it in your own IDE. You can also start with one of the many samples hosted in our Github repository and customize that code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Can I import custom libraries as part of my ETL script?

Extract, transform, and load (ETL)

AWS Glue | Analytics

A

Yes. You can import custom Python libraries and Jar files into your AWS Glue ETL job. For more details, please check our documentation here.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Can I bring my own code?

Extract, transform, and load (ETL)

AWS Glue | Analytics

A

Yes. You can write your own code using AWS Glue’s ETL library, or write your own Scala or Python code and upload it to a Glue ETL job. For more details, please check our documentation here.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How can I develop my ETL code using my own IDE?

Extract, transform, and load (ETL)

AWS Glue | Analytics

A

You can create and connect to development endpoints that offer ways to connect your notebooks and IDEs.

17
Q

How can I build end-to-end ETL workflow using multiple jobs in AWS Glue?

Extract, transform, and load (ETL)

AWS Glue | Analytics

A

In addition to the ETL library and code generation, AWS Glue provides a robust set of orchestration features that allow you to manage dependencies between multiple jobs to build end-to-end ETL workflows. AWS Glue ETL jobs can either be triggered on a schedule or on a job completion event. Multiple jobs can be triggered in parallel or sequentially by triggering them on a job completion event. You can also trigger one or more Glue jobs from an external source such as an AWS Lambda function.

18
Q

How does AWS Glue monitor dependencies?

Extract, transform, and load (ETL)

AWS Glue | Analytics

A

AWS Glue manages dependencies between two or more jobs or dependencies on external events using triggers. Triggers can watch one or more jobs as well as invoke one or more jobs. You can either have a scheduled trigger that invokes jobs periodically, an on-demand trigger, or a job completion trigger.

19
Q

How does AWS Glue handle errors?

Extract, transform, and load (ETL)

AWS Glue | Analytics

A

AWS Glue monitors job event metrics and errors, and pushes all notifications to Amazon CloudWatch. With Amazon CloudWatch, you can configure a host of actions that can be triggered based on specific notifications from AWS Glue. For example, if you get an error or a success notification from Glue, you can trigger an AWS Lambda function. Glue also provides default retry behavior that will retry all failures three times before sending out an error notification.

20
Q

Can I run my existing ETL jobs with AWS Glue?

Extract, transform, and load (ETL)

AWS Glue | Analytics

A

Yes. You can run your existing Scala or Python code on AWS Glue. Simply upload the code to Amazon S3 and create one or more jobs that use that code. You can reuse the same code across multiple jobs by pointing them to the same code location on Amazon S3.

21
Q

How can I use AWS Glue to ETL streaming data?

Extract, transform, and load (ETL)

AWS Glue | Analytics

A

AWS Glue ETL is batch oriented, and you can schedule your ETL jobs at a minimum of 5 min intervals. While it can process micro-batches, it does not handle streaming data. If your use case requires you to ETL data while you stream it in, you can perform the first leg of your ETL using Amazon Kinesis, Amazon Kinesis Firehose or Amazon Kinesis Analytics, and then store data to either Amazon S3 or Amazon Redshift and trigger a Glue ETL job to pick up that dataset and continue applying additional transformations to that data.

22
Q

Do I have to use both AWS Glue Data Catalog and Glue ETL to use the service?

Using AWS Glue vs. other AWS services

AWS Glue | Analytics

A

No. While we do believe that using both the AWS Glue Data Catalog and ETL provides an end-to-end ETL experience, you can use either one of them independently without using the other.

23
Q

When should I use AWS Glue vs. AWS Data Pipeline?

Using AWS Glue vs. other AWS services

AWS Glue | Analytics

A

AWS Glue provides a managed ETL service that runs on a serverless Apache Spark environment. This allows you to focus on your ETL job and not worry about configuring and managing the underlying compute resources. AWS Glue takes a data first approach and allows you to focus on the data properties and data manipulation to transform the data to a form where you can derive business insights. It provides an integrated data catalog that makes metadata available for ETL as well as querying via Amazon Athena and Amazon Redshift Spectrum.

AWS Data Pipeline provides a managed orchestration service that gives you greater flexibility in terms of the execution environment, access and control over the compute resources that run your code, as well as the code itself that does data processing. AWS Data Pipeline launches compute resources in your account allowing you direct access to the Amazon EC2 instances or Amazon EMR clusters.

Furthermore, AWS Glue ETL jobs are Scala or Python based. If your use case requires you to use an engine other than Apache Spark or if you want to run a heterogeneous set of jobs that run on a variety of engines like Hive, Pig, etc., then AWS Data Pipeline would be a better choice.

24
Q

When should I use AWS Glue vs. Amazon EMR?

Using AWS Glue vs. other AWS services

AWS Glue | Analytics

A

AWS Glue works on top of the Apache Spark environment to provide a scale-out execution environment for your data transformation jobs. AWS Glue infers, evolves, and monitors your ETL jobs to greatly simplify the process of creating and maintaining jobs. Amazon EMR provides you with direct access to your Hadoop environment, affording you lower-level access and greater flexibility in using tools beyond Spark.

25
Q

When should I use AWS Glue vs AWS Database Migration Service?

Using AWS Glue vs. other AWS services

AWS Glue | Analytics

A

AWS Database Migration Service (DMS) helps you migrate databases to AWS easily and securely. For use cases which require a database migration from on-premises to AWS or database replication between on-premises sources and sources on AWS, we recommend you use AWS DMS. Once your data is in AWS, you can use AWS Glue to move and transform data from your data source into another database or data warehouse, such as Amazon Redshift.

26
Q

When should I use AWS Glue vs AWS Batch?

Using AWS Glue vs. other AWS services

AWS Glue | Analytics

A

AWS Batch enables you to easily and efficiently run any batch computing job on AWS regardless of the nature of the job. AWS Batch creates and manages the compute resources in your AWS account, giving you full control and visibility into the resources being used. AWS Glue is a fully-managed ETL service that provides a serverless Apache Spark environment to run your ETL jobs. For your ETL use cases, we recommend you explore using AWS Glue. For other batch oriented use cases, including some ETL use cases, AWS Batch might be a better fit.

27
Q

When should I use AWS Glue vs Amazon Kinesis Analytics?

Pricing and billing

AWS Glue | Analytics

A

Amazon Kinesis Analytics allows you to run standard SQL queries on your incoming data stream. You can specify a destination like Amazon S3 to write your results. Once your data is available in your target data source, you can kick off an AWS Glue ETL job to do further transform your data and prepare it for additional analytics and reporting.

28
Q

How am I charged for AWS Glue?

Pricing and billing

AWS Glue | Analytics

A

You will pay a simple monthly fee, above the AWS Glue Data Catalog free tier, for storing and accessing the metadata in the AWS Glue Data Catalog. Additionally, you will pay an hourly rate, billed per second, for the ETL job and crawler run, with a 10-minute minimum for each. If you choose to use a development endpoint to interactively develop your ETL code, you will pay an hourly rate, billed per second, for the time your development endpoint is provisioned, with a 10-minute minimum. For more details, please refer our pricing page.

29
Q

When does billing for my AWS Glue jobs begin and end?

Security and availability

AWS Glue | Analytics

A

Billing commences as soon as the job is scheduled for execution and continues until the entire job completes. With AWS Glue, you only pay for the time for which your job runs and not for the environment provisioning or shutdown time.

30
Q

How does AWS Glue keep my data secure?

Security and availability

AWS Glue | Analytics

A

We provide server side encryption for data at rest and SSL for data in motion.

31
Q

What are the service limits associated with AWS Glue?

Security and availability

AWS Glue | Analytics

A

Please refer our documentation to learn more about service limits.

32
Q

What regions is AWS Glue in?

Security and availability

AWS Glue | Analytics

A

Please refer to Regional Products and Services for details of AWS Glue service availability by region.

33
Q

How many DPUs (Data Processing Units) are allocated to the development endpoint?

Security and availability

AWS Glue | Analytics

A

A development endpoint is provisioned with 5 DPUs by default. You can configure a development endpoint with a minimum of 2 DPUs and a maximun of 5 DPUs.

34
Q

How do I scale the size and performance of my AWS Glue ETL jobs?

Security and availability

AWS Glue | Analytics

A

You can simply specify the number of DPUs (Data Processing Units) you want to allocate to your ETL job. A Glue ETL job requires a minimum of 2 DPUs. By default, AWS Glue allocates 10 DPUs to each ETL job.