Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CSV Parser DAG
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSDU Software
OSDU Data Platform
Data Flow
Data Ingestion
CSV Parser
CSV Parser DAG
Merge requests
!356
Cherrypick/m14 to m16
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Cherrypick/m14 to m16
cherrypick/m14-to-m16
into
azure/m16-master
Overview
0
Commits
8
Pipelines
6
Changes
11
Merged
Mahsa Hanifi
requested to merge
cherrypick/m14-to-m16
into
azure/m16-master
1 year ago
Overview
0
Commits
8
Pipelines
6
Changes
11
Expand
0
0
Merge request reports
Compare
azure/m16-master
version 2
8cf64d55
1 year ago
version 1
30ac9d90
1 year ago
azure/m16-master (base)
and
latest version
latest version
21e83319
8 commits,
1 year ago
version 2
8cf64d55
7 commits,
1 year ago
version 1
30ac9d90
6 commits,
1 year ago
11 files
+
152
−
73
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
11
Search (e.g. *.vue) (Ctrl+P)
airflowdags/csv_ingestion_all_steps.py
+
12
−
6
Options
@@ -15,8 +15,8 @@ default_args = {
'
email
'
:
[
'
airflow@example.com
'
],
'
email_on_failure
'
:
False
,
'
email_on_retry
'
:
False
,
'
retries
'
:
1
,
'
retry_delay
'
:
timedelta
(
minutes
=
5
),
'
retries
'
:
0
,
'
retry_delay
'
:
timedelta
(
seconds
=
30
),
}
default_args
=
update_default_args
(
default_args
)
@@ -41,7 +41,8 @@ params = {
"
authorization
"
:
authorization
,
"
dataPartitionId
"
:
dataPartitionId
,
"
steps
"
:
steps
,
"
dataServiceName
"
:
"
{{ dag_run.conf[
'
execution_context
'
].get(
'
data_service_to_use
'
,
'
file
'
) }}
"
"
dataServiceName
"
:
"
{{ dag_run.conf[
'
execution_context
'
].get(
'
data_service_to_use
'
,
'
file
'
) }}
"
,
"
userId
"
:
"
{{ dag_run.conf[
'
execution_context
'
][
'
userId
'
] }}
"
}
# Get environment variables
@@ -52,13 +53,16 @@ if data_service_to_use:
operator_kwargs
=
{
|
K8S_POD_OPERATOR_KWARGS
or
{}
|
}
retry_configuration
=
{
|
OPERATOR_RETRY_CONFIG
or
{}
|
}
with
DAG
(
DAG_NAME
,
DAG_NAME
,
default_args
=
default_args
,
schedule_interval
=
None
)
as
dag
:
update_status_running
=
UpdateStatusOperator
(
task_id
=
"
update_status_running
"
,
**
retry_configuration
)
csv_parser
=
KubernetesPodOperator
(
@@ -69,11 +73,13 @@ with DAG(
arguments
=
[
dumps
(
params
)],
is_delete_operator_pod
=
True
,
image
=
DOCKER_IMAGE
,
**
operator_kwargs
)
**
operator_kwargs
,
**
retry_configuration
)
update_status_finished
=
UpdateStatusOperator
(
task_id
=
"
update_status_finished
"
,
trigger_rule
=
"
all_done
"
trigger_rule
=
"
all_done
"
,
**
retry_configuration
)
update_status_running
>>
csv_parser
>>
update_status_finished
# pylint: disable=pointless-statement
Loading