Posts

Showing posts from January, 2019

Git tagging

1) view existing tags in repo git tag 2) Set a tag on latest commit git tag -a v1.4 -m 'major release' 3) set a tag on specific commit with commit id git tag -a v1.2 9fcddd 4) push up tags to repo git push --tags origin master 5) Delete a tag remove from repo: git push --delete origin tagname remove from local: git tag --delete tagname 6) reverting back to a tag. Its best to revert back in a new branch so not to lose commits. git checkout -b branchname v1.2 or git reset --hard v1.2 7) See commit attached to the tag git show v1.2

Changing BigQuery table field names

https://cloud.google.com/bigquery/docs/manually-changing-schemas With sql you can change a BQ table field name e.g. SELECT * EXCEPT(last_activity_ts, invalid_reason), last_activity_ts as evpo, invalid_reason as evpo_invalid_reason FROM dataset.tableName This sql will select all fields except the ones you want to change then change the name using as keyword. In bq options select the table you want to change and replace table option. The table will replace itself with original table content but with new field names. For large datasets you are paying for entire table scan and can be expensive.