Server Side Programming Articles

Page 394 of 2109

How to use Boto3 to stop a workflow in AWS Glue Data Catalog

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 589 Views

AWS Glue workflows can be programmatically controlled using the Boto3 library. This article demonstrates how to stop a running workflow in AWS Glue Data Catalog using Python. Prerequisites Before stopping a workflow, ensure you have ? AWS credentials configured (via AWS CLI or environment variables) Boto3 library installed: pip install boto3 Appropriate IAM permissions for AWS Glue operations A running workflow with a valid workflow_name and run_id Method: Using stop_workflow_run() The stop_workflow_run() method requires two mandatory parameters ? Name − The workflow name to stop RunId − The unique identifier of ...

Read More

How to use Boto3 to start a workflow in AWS Glue Data Catalog

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 805 Views

In this article, we will see how to start a workflow in AWS Glue Data Catalog using the boto3 library. AWS Glue workflows help orchestrate ETL jobs and crawlers in a defined sequence. Problem Statement Use the boto3 library in Python to programmatically start an AWS Glue workflow and handle potential errors during execution. Prerequisites Before running this code, ensure you have: AWS credentials configured (via AWS CLI, environment variables, or IAM roles) boto3 library installed: pip install boto3 An existing workflow in AWS Glue Data Catalog Appropriate IAM permissions for Glue operations ...

Read More

How to use Boto3 to stop a trigger in AWS Glue Data Catalog

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 450 Views

In this article, we will see how to stop a trigger in AWS Glue Data Catalog using the boto3 library in Python. AWS Glue triggers are used to start ETL jobs based on schedules or events, and sometimes you need to stop them programmatically. Prerequisites Before running the code, ensure you have: AWS credentials configured (via AWS CLI, environment variables, or IAM roles) boto3 library installed: pip install boto3 Appropriate IAM permissions for Glue operations Approach to Stop a Glue Trigger Step 1: Import boto3 and botocore exceptions to handle errors Step ...

Read More

How to use Boto3 to start a trigger in AWS Glue Data Catalog

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 621 Views

In this article, we will see how to start a trigger in AWS Glue Data Catalog using the boto3 Python library. Triggers in AWS Glue are used to start ETL jobs based on schedules or events. Prerequisites Before starting, ensure you have ? AWS credentials configured (access key, secret key) Appropriate IAM permissions for AWS Glue operations An existing trigger in your AWS Glue Data Catalog The boto3 library installed Approach to Start a Glue Trigger Follow these steps to start a trigger programmatically ? Step 1: Import boto3 and botocore ...

Read More

How to use Boto3 to start a crawler in AWS Glue Data Catalog

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 2K+ Views

In this article, we will see how to start a crawler in AWS Glue Data Catalog using Python's boto3 library. A crawler automatically discovers and catalogs metadata about your data sources. Problem Statement Use boto3 library in Python to programmatically start an AWS Glue crawler. Algorithm to Solve This Problem Step 1: Import boto3 and botocore exceptions to handle errors Step 2: Define a function that accepts crawler_name as parameter Step 3: Create an AWS session using boto3. Ensure region_name is configured in ...

Read More

How to use Boto3 to reset the bookmark of job in AWS account

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 701 Views

In this article, we will see how to reset the bookmark of an AWS Glue job using the boto3 Python library. Job bookmarks help AWS Glue track the data that has already been processed during previous job runs. What are Job Bookmarks? AWS Glue job bookmarks prevent reprocessing of old data by keeping track of data that has already been processed. Resetting a bookmark allows the job to reprocess all data from the beginning. Approach to Reset Job Bookmark Step 1: Import boto3 and botocore exceptions to handle errors. Step 2: Create an AWS session ...

Read More

How to use Boto3 to get the list of workflows present an in AWS account

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 293 Views

In this article, we will see how to use Boto3 to get the list of all workflows present in an AWS account using AWS Glue service. AWS Glue workflows help orchestrate ETL jobs and crawlers. The list_workflows() method retrieves all workflows from the AWS Glue Data Catalog. Prerequisites Before running this code, ensure you have ? AWS credentials configured (via AWS CLI, environment variables, or IAM roles) Boto3 library installed: pip install boto3 Appropriate permissions to access AWS Glue workflows Approach The solution involves the following steps ? Step 1: ...

Read More

Python program to unique keys count for Value in Tuple List

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 208 Views

When working with lists of tuples, you may need to count how many times each unique tuple appears. Python's collections.defaultdict provides an elegant solution for counting occurrences without manually checking if keys exist. Using collections.defaultdict The defaultdict(int) automatically initializes missing keys with a default value of 0, making counting operations simple ? import collections my_result = collections.defaultdict(int) my_list = [[('Hello', 'Hey')], [('Jane', 'Will')], [('William', 'John')], [('Hello', 'Hey')], [('z', 'q')]] print("The list of list is:") print(my_list) for elem in my_list: my_result[elem[0]] += 1 print("The result is:") print(my_result) ...

Read More

Python program to count Bidirectional Tuple Pairs

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 268 Views

When it is required to count the number of bidirectional tuple pairs in a list of tuples, we can iterate over the list using nested loops and check if pairs are reverse of each other. A bidirectional pair means if we have tuple (a, b), there exists another tuple (b, a) in the list. Below is a demonstration of the same − Example my_list = [(45, 67), (11, 23), (67, 45), (23, 11), (0, 9), (67, 45)] print("The list is : ") print(my_list) my_result = 0 for idx in range(0, len(my_list)): ...

Read More

Python Program to Find the Sum of all Nodes in a Tree

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 487 Views

Finding the sum of all nodes in a tree is a fundamental operation in tree data structures. This can be accomplished using a Tree_structure class with methods to add nodes and calculate the total sum recursively. Tree Structure Implementation The following example demonstrates a complete tree implementation with sum calculation ? class Tree_structure: def __init__(self, data=None): self.key = data self.children = [] def set_root(self, data): ...

Read More
Showing 3931–3940 of 21,090 articles
« Prev 1 392 393 394 395 396 2109 Next »
Advertisements