This file contains hidden or 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
#!/usr/bin/env bash | |
## This is copied directly from `lorri init` | |
# the shebang is ignored, but nice for editors | |
if type -P lorri &>/dev/null; then | |
eval "$(lorri direnv)" | |
else | |
echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]' | |
use nix |
This file contains hidden or 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
#!/usr/bin/env bash | |
REALPATH="$(nix-shell -p coreutils -p which --pure --run 'which realpath')" | |
#echo $REALPATH | |
usage() { | |
echo "Usage: $0 files..." | |
echo "Move files into a datestamped .trash/ directory at the root of the git repo" | |
} |
This file contains hidden or 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
def _snapshot_query( | |
snapshot_dataset: str, | |
source_dataset: str, | |
source_table: str, | |
retention_days: int | None, | |
) -> str: | |
"""Contsruct the query for snapshotting a table. | |
Taken from: https://cloud.google.com/bigquery/docs/table-snapshots-scheduled#schedule_the_monthly_query | |
See the docstring for _create_scheduled_snapshot for details on parameters. |
OlderNewer