Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
141 additions
and
19 deletions.
There are no files selected for viewing
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@echo off | ||
IF [%1] == [] GOTO USAGE | ||
dir /b | find "%1" | ||
exit /B | ||
|
||
:USAGE | ||
echo Usage: A_DatasetLogs.bat StringToFindInLogName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@echo off | ||
IF [%1] == [] GOTO USAGE | ||
type *%1* 2>nul | find "Processing ended after" | ||
exit /B | ||
|
||
:USAGE | ||
echo Usage: A_ETLRuntimes.bat StringToFindInLogName | ||
exit /B 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@echo off | ||
IF [%1] == [] GOTO USAGE | ||
|
||
REM Sanity check | ||
echo %1 | findstr /r "\<[a-Z0123456789][a-Z0123456789][a-Z0123456789][a-Z0123456789]-[a-Z0123456789][a-Z0123456789][a-Z0123456789][a-Z0123456789]\>" | ||
IF %ERRORLEVEL% NEQ 0 ( | ||
echo Invalid Dataset4x4 | ||
exit /B 1 | ||
) | ||
|
||
schtasks /Query /FO list /V | FOR /F "tokens=2 DELIMS=:" %%f in ('findstr /RC:"^Task To Run"') do @FOR /F "tokens=* delims= " %%a in ('@echo %%f') do @echo %%a | FOR /F "tokens=*" %%b in ('find "%1"') do @call %%b | ||
exit /B | ||
|
||
:USAGE | ||
echo Usage: A_RunETL.bat Dataset4x4 | ||
exit /B 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
if [ -z "$1" ] | ||
then | ||
echo "Usage: A_RunETL.sh Dataset4x4" | ||
exit 1 | ||
else | ||
# Sanity check | ||
if [ -z $(echo "$1" | grep "^[a-zA-Z0-9]\{4\}-[a-zA-Z0-9]\{4\}$") ]; then | ||
echo "Invalid Dataset4x4" | ||
exit 1 | ||
fi | ||
CRONTAB_LINE="crontab -l | grep $1 | cut -d ' ' -f 6-" #Returns the 6th and subsequent "fields" from the crontab line containing the 4x4, with the field delimiter being a space. Result: Skips the scheduling part and returns the actual command. | ||
COMMAND_TO_RUN=$(eval $CRONTAB_LINE) | ||
eval $COMMAND_TO_RUN | ||
echo "Command executed: " $COMMAND_TO_RUN | ||
exit 0 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@echo off | ||
REM Specify the 4x4 values to exclude, separated by space characters | ||
set DATASETS_TO_EXCLUDE="n4j6-wkkf t2qx-9pjd qmqz-2xku 97wa-y6ff" | ||
set TODAY=%date:~10,4%%date:~4,2%%date:~7,2% | ||
|
||
IF [%1] == [] GOTO DEFAULT | ||
IF [%1] == [-e] GOTO EXCLUDE | ||
|
||
echo Usage: A_Today.bat [-e] | ||
echo -e Exclude a pre-specified set of datasets by 4x4. generally those that run frequently and would clutter the output. | ||
exit /B 1 | ||
|
||
:DEFAULT | ||
dir /b | find "%TODAY%" | ||
exit /B | ||
|
||
:EXCLUDE | ||
dir /b | find "%TODAY%" | findstr /V %DATASETS_TO_EXCLUDE% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters