Skip to content

Instantly share code, notes, and snippets.

View buremba's full-sized avatar
🤖
at LiveRamp

Burak Emre Kabakcı buremba

🤖
at LiveRamp
  • LiveRamp
  • London
  • 07:21 (UTC)
  • X @bu7emba
View GitHub Profile
@buremba
buremba / jinjat_yml_files.json
Created December 23, 2022 10:05
Jinjat yml file JSON Schema
{
"title": "jinjat_yml_files",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"type": "number",
### Rakam Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by Rakam Inc. or its affiliates (“Rakam Inc.”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Rakam Inc. in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact emre@rakam.io.
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to Rakam Inc. a non-exclusive, perpetua
{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v3.json", "dbt_version": "0.21.0", "generated_at": "2021-11-04T09:58:37.901500Z", "invocation_id": "f7c72b82-fb79-42e5-8226-c8ef7f9b7bb0", "env": {}, "project_id": "06e5b98c2db46f8a72cc4f66410e9b3b", "user_id": null, "send_anonymous_usage_stats": false, "adapter_type": "snowflake"}, "nodes": {"model.jaffle_shop.customers": {"raw_sql": "with customers as (\n\n select * from {{ ref('stg_customers') }}\n\n),\n\norders as (\n\n select * from {{ ref('stg_orders') }}\n\n),\n\npayments as (\n\n select * from {{ ref('stg_payments') }}\n\n),\n\ncustomer_orders as (\n\n select\n customer_id,\n\n min(order_date) as first_order,\n max(order_date) as most_recent_order,\n count(order_id) as number_of_orders\n from orders\n\n group by customer_id\n\n),\n\ncustomer_payments as (\n\n select\n orders.customer_id,\n sum(amount) as total_amount\n\n from payments\n\n left join order
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Metriql REST API"
},
"components": {
"schemas": {
"SegmentationQuery": {
"properties": {
{
"nodes": {
"model.snowflake_tpch_sample.example_model": {
"raw_sql": "{{ config( materialized='view',\n ) \n }} \n select 1 as id\n union all\n select null as id",
"compiled": true,
"database": "DEMO_DB",
"schema": "RAKAM_DBT_CLOUD",
"fqn": [
"snowflake_tpch_sample",
"example",
{
"type": "object",
"id": "http://docs.rakam.io/schema/model",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "The analytics model definition",
"required": [
"name"
],
"oneOf": [
{
curl --request POST \
--url https://your-api-url.getrakam.com/event/batch \
--data '{"api":{"api_key": "API_KEY"},"events":[
{"collection": "app_launch", "properties": {
"screen": "homepage",
"user_gender": "male",
"_user": "23",
"_ip": true,
"id": "ae9c718d-f405-477b-b07c-a5230e7620fd",
"_time": "2020-04-24T11:13:23.915Z"
{
"type":"object",
"$schema": "http://json-schema.org/draft-07/schema#",
"title":"The analytics model definition",
"required":[
"version",
"name",
"from"
],
"definitions":{
<html>
<head></head>
<body>
{"status": ::CLOUDFLARE_ERROR_500S_BOX::, "message": "The server is not available, please try again later"}
</body>
</html>
@buremba
buremba / create-table.sql
Last active December 25, 2017 15:53
Raptor metadata queries
-- CREATE TABLE rakam_raptor.demo.demotable (_device_id VARCHAR, _time TIMESTAMP) WITH(temporal_column = '_time', bucketed_on=ARRAY['_device_id'], bucket_count = 10, distribution_name='test');
// Check if table exists
SELECT t.table_id, t.distribution_id, d.distribution_name, d.bucket_count, t.temporal_column_id, t.organization_enabled
FROM tables t
LEFT JOIN distributions d ON (t.distribution_id = d.distribution_id)
WHERE t.schema_name = ?
AND t.table_name = ?
// Check if distribution exists exists