Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Segy to oVDS Conversion 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
OSDU Data Platform
Data Flow
Data Ingestion
Segy to oVDS Conversion DAG
Commits
425b9f7d
Commit
425b9f7d
authored
1 year ago
by
Sumra Zafar
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
451bfd0a
No related branches found
Branches containing commit
No related tags found
2 merge requests
!136
Merge Delta changes from M16 to M18
,
!121
Merge M14 delta changes
Checking pipeline status
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openvds_azure.py
+95
-0
95 additions, 0 deletions
openvds_azure.py
with
95 additions
and
0 deletions
openvds_azure.py
0 → 100644
+
95
−
0
View file @
425b9f7d
# Copyright © Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from
datetime
import
timedelta
import
airflow
from
airflow
import
DAG
from
osdu_airflow.backward_compatibility.default_args
import
\
update_default_args
from
osdu_airflow.operators.process_manifest_r3
import
\
ProcessManifestOperatorR3
from
osdu_airflow.operators.segy_open_vds_conversion
import
\
KubernetesPodSegyToOpenVDSOperator
from
osdu_airflow.operators.update_status
import
UpdateStatusOperator
default_args
=
{
"
start_date
"
:
airflow
.
utils
.
dates
.
days_ago
(
0
),
"
retries
"
:
0
,
"
retry_delay
"
:
timedelta
(
seconds
=
30
),
"
trigger_rule
"
:
"
none_failed
"
,
}
default_args
=
update_default_args
(
default_args
)
dag_name
=
"
{| DAG_NAME |}
"
docker_image
=
"
{| DOCKER_IMAGE |}
"
k8s_namespace
=
"
adf
"
K8S_POD_KWARGS
=
{
"
labels
"
:
{
"
aadpodidbinding
"
:
"
osdu-identity
"
},
"
annotations
"
:
{
"
sidecar.istio.io/inject
"
:
"
false
"
}
}
if
not
K8S_POD_KWARGS
:
K8S_POD_KWARGS
=
{}
seismic_store_url
=
"
{| SEISMIC_STORE_URL |}
"
env_vars
=
{
"
SD_SVC_URL
"
:
seismic_store_url
,
"
SD_SVC_API_KEY
"
:
"
test
"
,
}
env_vars
.
update
({
|
EXTRA_ENV_VARS
|
default
(
'
{}
'
)
|
})
dag
=
DAG
(
dag_name
,
default_args
=
default_args
,
description
=
"
Airflow DAG for transformation from SEGY to OpenVDS
"
,
schedule_interval
=
None
,
dagrun_timeout
=
timedelta
(
minutes
=
60
)
)
with
dag
:
update_status_running
=
UpdateStatusOperator
(
task_id
=
"
update_status_running
"
,
)
segy_to_vds
=
KubernetesPodSegyToOpenVDSOperator
(
task_id
=
'
segy_to_vds_ssdms_conversion
'
,
name
=
'
segy_vds_conversion
'
,
env_vars
=
env_vars
,
cmds
=
[
'
SEGYImport
'
],
namespace
=
k8s_namespace
,
image
=
docker_image
,
is_delete_operator_pod
=
True
,
trigger_rule
=
"
none_failed_or_skipped
"
,
**
K8S_POD_KWARGS
)
process_single_manifest_file
=
ProcessManifestOperatorR3
(
task_id
=
"
process_single_manifest_file_task
"
,
previous_task_id
=
segy_to_vds
.
task_id
,
trigger_rule
=
"
none_failed_or_skipped
"
)
update_status_finished
=
UpdateStatusOperator
(
task_id
=
"
update_status_finished
"
,
trigger_rule
=
"
all_done
"
)
update_status_running
>>
segy_to_vds
>>
process_single_manifest_file
>>
update_status_finished
# pylint: disable=pointless-statement
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment