Skip to content

Conversation

@shubhampathakk
Copy link

Added code for AWS Glue to Dataplex connector code

for job in page['Jobs']:
job_name = job['Name']
# Optimization: Limit to latest run to reduce API calls
job_runs = self.__glue_client.get_job_runs(JobName=job_name, MaxResults=1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it guaranteed to return the latest run?

job_runs = self.__glue_client.get_job_runs(JobName=job_name, MaxResults=1)

for job_run in job_runs.get('JobRuns', []):
if job_run.get('JobRunState') == 'SUCCEEDED':
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to filter the jobs fetched in get_job_runs to only return jobs which 'SUCCEEDED'?

Comment on lines +83 to +85
graph = self.__glue_client.get_dataflow_graph(PythonScript=script_location)
if graph:
sources = [edge['Source'] for edge in graph.get('Edges', [])]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's assumed that the i-th element in sources corresponds to the i-th element in targets, representing a directed edge from source to target. Is this assumption reasonable? Please add a comment for the same.

return "OTHER"

def build_database_entry(config, db_name):
"""Builds a database entry, mimicking the successful Oracle format."""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Remove such comments.

@@ -0,0 +1,93 @@
# AWS Glue to Google Cloud Dataplex Connector
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants