Skip to content
Snippets Groups Projects
Commit 322f4ff4 authored by harshit aggarwal's avatar harshit aggarwal
Browse files

init

parent afbd1d13
No related branches found
No related tags found
No related merge requests found
"""Temporary DAG for tests."""
import airflow
from airflow import DAG
from airflow.operators.bash_operator import BashOperator
default_args = {
"start_date": airflow.utils.dates.days_ago(0),
}
with DAG(
"manifest_ingestion",
default_args=default_args,
description="The DAG is used for testing Workflow service, it does nothing but returns "
"OK status only to Workflow service.",
schedule_interval=None
) as dag:
t1 = BashOperator(task_id="echo", bash_command="echo test")
# Copyright 2020 Google LLC
# Copyright 2020 EPAM Systems
#
# 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.
"""DAG for R2 ingestion."""
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.deprecated.update_status import UpdateStatusOperator
from osdu_airflow.operators.process_manifest_r2 import ProcessManifestOperatorR2
from osdu_airflow.operators.search_record_id import SearchRecordIdOperator
default_args = {
"start_date": airflow.utils.dates.days_ago(0),
"retries": 0,
"retry_delay": timedelta(minutes=50),
"trigger_rule": "none_failed",
}
default_args = update_default_args(default_args)
workflow_name = "Osdu_ingest_r2"
dag = DAG(
workflow_name,
default_args=default_args,
description="liveness monitoring dag",
schedule_interval=None,
dagrun_timeout=timedelta(minutes=60)
)
update_status_running_op = UpdateStatusOperator(
task_id="update_status_running_task",
dag=dag
)
update_status_finished_op = UpdateStatusOperator(
task_id="update_status_finished_task",
dag=dag,
trigger_rule="all_done"
)
process_manifest_op = ProcessManifestOperatorR2(
task_id="proccess_manifest_task",
dag=dag
)
search_record_ids_op = SearchRecordIdOperator(
task_id="search_record_ids_task",
dag=dag,
retries=1
)
update_status_running_op >> process_manifest_op >> \
search_record_ids_op >> update_status_finished_op # pylint: disable=pointless-statement
# Copyright 2020 Google LLC
# Copyright 2020 EPAM Systems
#
# 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.
[DEFAULTS]
tenant = common
authority = osdu
kind_version = 0.2.0
[KINDS_INITIAL]
file_kind = file
well_kind = well-master
wellbore_kind = wellbore-master
wellboremarker_wp_kind = wellboremarker-wp
wellboremarker_wpc_kind = wellboremarker-wpc
wellboretrajectory_wp_kind = wellboretrajectory-wp
wellboretrajectory_wpc_kind = wellboretrajectory-wpc
welllog_wp_kind = welllog-wp
welllog_wpc_kind = welllog-wpc
facilitytype_kind = facility-type
materialtype_kind = material-type
agreementtype_kind = agreement-type
aliasnametypeclass_kind = alias-name-type-class
aliasnametype_kind = alias-name-type
artefactrole_kind = artefact-role
azimuthreferencetype_kind = azimuth-reference-type
basintype_kind = basin-type
calculationmethodtype_kind = calculation-method-type
contractortype_kind = contractor-type
currency_kind = currency
documenttype_kind = document-type
drillingreasontype_kind = drilling-reason-type
encodingformattype_kind = encoding-format-type
facilityeventtype_kind = facility-event-type
facilitystatetype_kind = facility-state-type
facilityverticalmeasurementtype_kind = facility-vertical-measurement-type
featuretype_kind = feature-type
geologicalformation_kind = geological-formation
geopoliticalentitytype_kind = geopolitical-entity-type
horizontalcrs_kind = horizontal-crs
logcurvebusinessvalue_kind = log-curve-business-value
logcurvefamily_kind = log-curve-family
logcurvetype_kind = log-curve-type
logtype_kind = log-type
markertype_kind = marker-type
obligationtype_kind = obligation-type
organisationtype_kind = organisation-type
osduregion_kind = osdu-region
parametertype_kind = parameter-type
projectrole_kind = project-role
projectstatetype_kind = project-state-type
projecttype_kind = project-type
qualitativespatialaccuracytype_kind = qualitative-spatial-accuracy-type
quantitativeaccuracyband_kind = quantitative-accuracy-band
resourcecurationstatus_kind = resource-curation-status
resourcelifecyclestatus_kind = resource-lifecycle-status
resourcesecurityclassification_kind = resource-security-classification
schemaformattype_kind = schema-format-type
seismicgeometrytype_kind = seismic-geometry-type
spatialgeometrytype_kind = spatial-geometry-type
spatialparametertype_kind = spatial-parameter-type
unitofmeasure_kind = unit-of-measure
verticalcrs_kind = vertical-crs
wellboretrajectorytype_kind = wellbore-trajectory-type
welldatumtype_kind = well-datum-type
wellinteresttype_kind = well-interest-type
welloperatingenvironment_kind = well-operating-environment
document_wp_kind = document-wp
document_wpc_kind = document-wpc
seismictracedata_wp_kind = seismictracedata-wp
seismictracedata_wpc_kind = seismictracedata-wpc
seismicacquisitionproject_kind = seismic-acquisition-project
seismicinterpretationproject_kind = seismic-interpretation-project
seismicprocessingproject_kind = seismic-processing-project
seismichorizon_wp_kind = seismichorizon-wp
seismichorizon_wpc_kind = seismichorizon-wpc
bingriddefinitionmethodtype_kind = bin-grid-definition-method-type
processingparametertype_kind = processing-parameter-type
seismicdomaintype_kind = seismic-domain-type
seismicenergysourcetype_kind = seismic-energy-source-type
seismichorizontype_kind = seismic-horizon-type
seismicmigrationtype_kind = seismic-migration-type
seismicpickingtype_kind = seismic-picking-type
seismicstackingtype_kind = seismic-stacking-type
seismictracedatadimensionalitytype_kind = seismic-trace-data-dimensionality-type
seismicfilteringtype_kind = seismic-filtering-type
objectivetype_kind = objective-type
seismicbingridtype_kind = seismic-bin-grid-type
verticalmeasurementtype_kind = vertical-measurement-type
discretizationschemetype_kind = discretization-scheme-type
seismicfaulttype_kind = seismic-fault-type
propertyfieldrepresentationtype_kind = property-field-representation-type
seismicattributetype_kind = seismic-attribute-type
propertynametype_kind = property-name-type
petroleumsystemelementtype_kind = petroleum-system-element-type
velocityanalysismethod_kind = velocity-analysis-method
seismicwavetype_kind = seismic-wave-type
interpolationmethod_kind = interpolation-method
velocitytype_kind = velocity-type
seismicprocessingstagetype_kind = seismic-processing-stage-type
velocitydirectiontype_kind = velocity-direction-type
anisotropytype_kind = anisotropy-type
dimensiontype_kind = dimension-type
verticalmeasurementpath_kind = vertical-measurement-path
verticalmeasurementsource_kind = vertical-measurement-source
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment