Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Airflow
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Margrenzo Gunawan
Airflow
Commits
3b1ea433
Commit
3b1ea433
authored
Jul 02, 2024
by
Timothy Ardha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check Surrounding Done
parent
736effda
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
1 deletion
+51
-1
1_t24.py
1_t24.py
+51
-1
No files found.
1_t24.py
View file @
3b1ea433
...
...
@@ -51,6 +51,49 @@ def check_file_done(**kwargs):
# STOP DAG
return
False
def
check_surrounding_done
(
**
kwargs
):
if
os
.
path
.
isfile
(
f"""
{
Variable
.
get
(
"LOCAL_PATH"
)
}
switching/
{
yesterday_nodash
}
/done_ext.csv"""
):
print
(
"Switching SELESAI"
)
if
os
.
path
.
isfile
(
f"""
{
Variable
.
get
(
"LOCAL_PATH"
)
}
fincloud/
{
yesterday_nodash
}
/done_ext.csv"""
):
print
(
"Fincloud SELESAI"
)
if
os
.
path
.
isfile
(
f"""
{
Variable
.
get
(
"LOCAL_PATH"
)
}
igate/
{
yesterday_nodash
}
/done_ext.csv"""
):
print
(
"Igate SELESAI"
)
if
os
.
path
.
isfile
(
f"""
{
Variable
.
get
(
"LOCAL_PATH"
)
}
los-fintech/
{
yesterday_nodash
}
/done_ext.csv"""
):
print
(
"Los Fintech SELESAI"
)
if
os
.
path
.
isfile
(
f"""
{
Variable
.
get
(
"LOCAL_PATH"
)
}
los-kpt/
{
yesterday_nodash
}
/done_ext.csv"""
):
print
(
"Los KPT SELESAI"
)
if
os
.
path
.
isfile
(
f"""
{
Variable
.
get
(
"LOCAL_PATH"
)
}
bib/
{
yesterday_nodash
}
/done_ext.csv"""
):
print
(
"BIB SELESAI"
)
if
os
.
path
.
isfile
(
f"""
{
Variable
.
get
(
"LOCAL_PATH"
)
}
ebanking/
{
yesterday_nodash
}
/done_ext.csv"""
):
print
(
"Ebanking SELESAI"
)
if
os
.
path
.
isfile
(
f"""
{
Variable
.
get
(
"LOCAL_PATH"
)
}
mgate/
{
yesterday_nodash
}
/done_ext.csv"""
):
print
(
"MGate SELESAI"
)
return
True
else
:
print
(
"MGate BELUM SELESAI"
)
return
False
else
:
print
(
"Ebanking BELUM SELESAI"
)
return
False
else
:
print
(
"BIB BELUM SELESAI"
)
return
False
else
:
print
(
"Los KPT BELUM SELESAI"
)
return
False
else
:
print
(
"Los Fintech BELUM SELESAI"
)
return
False
else
:
print
(
"Igate BELUM SELESAI"
)
return
False
else
:
print
(
"Fincloud BELUM SELESAI"
)
return
False
else
:
print
(
"Switching BELUM SELESAI"
)
return
False
def
check_done_ext
(
**
kwargs
):
from
random
import
randint
...
...
@@ -197,6 +240,13 @@ with DAG("APJ_1_T24",
op_kwargs
=
{},
)
check_surrounding_done
=
ShortCircuitOperator
(
task_id
=
"check_surrounding_done"
,
provide_context
=
True
,
python_callable
=
check_surrounding_done
,
op_kwargs
=
{}
)
# ###########################################
# METADATA
...
...
@@ -365,4 +415,4 @@ with DAG("APJ_1_T24",
# postgres_conn_id=POSTGRES_CONN_ID,
# )
begin
>>
check_done_ext
>>
sftp_xx
>>
check_file_done
>>
ds_ext_done
>>
history_start
>>
file_sc_cp
>>
metadata_truncate
>>
metadata_sed
>>
metadata_list_extractor
>>
metadata_syntax_copy
>>
metadata_import
>>
metadata_refresh
>>
ds_create_table
>>
ds_list_extractor
>>
csv_clean_syntax
>>
clean_csv
>>
ds_syntax_copy
>>
ds_csv_to_table
>>
ds_create_table_history
>>
ds_create_metadata_file
>>
ds_create_metadata_file_sys
>>
set_access_schemma
>>
set_access_all_table
>>
ds_nominatif
>>
ds_remove_bnk
begin
>>
check_done_ext
>>
sftp_xx
>>
check_file_done
>>
check_surrounding_done
>>
ds_ext_done
>>
history_start
>>
file_sc_cp
>>
metadata_truncate
>>
metadata_sed
>>
metadata_list_extractor
>>
metadata_syntax_copy
>>
metadata_import
>>
metadata_refresh
>>
ds_create_table
>>
ds_list_extractor
>>
csv_clean_syntax
>>
clean_csv
>>
ds_syntax_copy
>>
ds_csv_to_table
>>
ds_create_table_history
>>
ds_create_metadata_file
>>
ds_create_metadata_file_sys
>>
set_access_schemma
>>
set_access_all_table
>>
ds_nominatif
>>
ds_remove_bnk
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment