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
/* get instances by resource groups */ | |
SELECT | |
name, | |
location, | |
SPLIT_PART(id, '/', 3) as resource_group, | |
JSON_EXTRACT(properties, '$.hardwareProfile.vmSize') as vm_size, | |
JSON_EXTRACT(properties, '$.storageProfile.osDisk.osType') as os_type, | |
JSON_EXTRACT(properties, '$.timeCreated') as time_created | |
FROM azure.compute.virtual_machines | |
WHERE resourceGroupName IN ('stackql-ops-cicd-dev-01', 'stackqlenv1', 'stackqlenv2', 'stackqlenv3', 'stackqlenv4') |
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
const handler = async (event: Event) => { | |
... | |
try { | |
... | |
await logRequest(pageName, jwtId, event); | |
... | |
const data = ...; | |
return { | |
statusCode: 200, | |
body: JSON.stringify(data), |
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
import { Event } from '../helpers/http'; // this is a custom type for the Netlify event object | |
import fetch from "node-fetch"; | |
// used for `sec-ch-ua-mobile` header value conversion to boolean | |
function convertToBoolean(value: string): boolean | null { | |
if (value === '') return null; | |
if (value === '?0') { | |
return false; | |
} else { |
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
{% macro default__snapshot_merge_sql(target, source, insert_cols) -%} | |
{#- customised snapshot merge statement to update additional operational metadata #} | |
{%- set insert_cols_csv = insert_cols | join(', ') -%} | |
merge into {{ target }} as DBT_INTERNAL_DEST | |
using {{ source }} as DBT_INTERNAL_SOURCE | |
on DBT_INTERNAL_SOURCE.dbt_scd_id = DBT_INTERNAL_DEST.dbt_scd_id | |
when matched | |
and DBT_INTERNAL_DEST.dbt_valid_to is null | |
and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete') | |
then update |
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
... | |
insertions as ( | |
select | |
'insert' as dbt_change_type, | |
source_data.*, | |
{#- additional operational metadata fields #} | |
cast("{{ invocation_id }}" as STRING) as INSERT_PROCESS_ID, | |
cast(NULL as STRING) as UPDATE_PROCESS_ID, | |
{{ strategy.updated_at }} as EFFECTIVE_START_TIMESTAMP, | |
cast("{{ var('default_high_dttm') }}" as TIMESTAMP) as EFFECTIVE_END_TIMESTAMP, |
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
{% macro default__build_snapshot_table(strategy, sql) %} | |
{#- customised snapshot table to inject additional operational metadata #} | |
select *, | |
{#- additional operational metadata fields #} | |
cast("{{ invocation_id }}" as STRING) as INSERT_PROCESS_ID, | |
cast(NULL as STRING) as UPDATE_PROCESS_ID, | |
{{ strategy.updated_at }} as EFFECTIVE_START_TIMESTAMP, | |
cast("{{ var('default_high_dttm') }}" as TIMESTAMP) as EFFECTIVE_END_TIMESTAMP, | |
{{ strategy.updated_at }} as INSERT_TIMESTAMP, |
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
import { exec } from 'node:child_process'; | |
const version = `v${process.env['REG_COMMIT_YEAR']}.${process.env['REG_COMMIT_MONTH']}.${process.env['REG_PR_NO'].padStart(5, '0')}`; | |
console.log(`REG_VERSION: ${version}`); | |
exec(`echo "REG_VERSION=${version}" >> $GITHUB_ENV`); |
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
import * as core from '@actions/core'; | |
import * as github from '@actions/github'; | |
import { exec } from 'node:child_process'; | |
async function run() { | |
try { | |
const context = github.context; | |
const eventName = context.eventName; | |
let prNumber; | |
if(eventName == 'pull_request') { |
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
name: Build and Deploy Registry Providers | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
branches: | |
- main |
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
name: Build and Deploy Registry Providers | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
branches: | |
- main |
NewerOlder