Skip to content

Instantly share code, notes, and snippets.

View laughingman7743's full-sized avatar
🤣

laughingman7743

🤣
  • 1776 5419 5080
  • 12:06 (UTC +09:00)
View GitHub Profile
REDASH_STATIC_ASSETS_PATH=../rd_ui/dist/
REDASH_LOG_LEVEL=INFO
REDASH_REDIS_URL=redis://YOUR_REDIS_URL
REDASH_DATABASE_URL=postgresql://YOUR_DATABASE_URL
ADD JAR /usr/lib/hive-hcatalog/share/hcatalog/hive-hcatalog-core-1.0.0-amzn-3.jar;
CREATE EXTERNAL TABLE IF NOT EXISTS test_json_table
(
_id bigint,
column1 string,
column2 string,
column3 string,
column4 string,
column5 string
FROM python:2.7
ENV AIRFLOW_VERSION=1.7.0 \
AIRFLOW_HOME=/usr/local/airflow
RUN apt-get update -yqq \
&& apt-get install -yqq --no-install-recommends libmysqlclient-dev \
libpq-dev \
&& useradd -ms /bin/bash -d ${AIRFLOW_HOME} airflow \
&& pip install --no-cache-dir airflow==${AIRFLOW_VERSION} \
FROM anapsix/alpine-java:jre8
ENV JRUBY_VERSION=9.0.5.0 \
PATH=/opt/jruby/bin:$PATH
RUN apk upgrade --update \
&& apk add --update curl \
&& curl -L -o /tmp/jruby.tar.gz https://s3.amazonaws.com/jruby.org/downloads/${JRUBY_VERSION}/jruby-bin-${JRUBY_VERSION}.tar.gz \
&& tar -C /opt -zxf /tmp/jruby.tar.gz \
&& ln -s /opt/jruby-${JRUBY_VERSION} /opt/jruby \
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import re
import signal
import sys
import time
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import json
import requests
SLACK_API = 'https://slack.com/api/'
SLACK_API_METHOD = 'chat.postMessage'
{
"Records": [
{
"eventID": "shardId-000000000000:49545115243490985018280067714973144582180062593244200961",
"eventVersion": "1.0",
"kinesis": {
"partitionKey": "partitionKey-3",
"data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0IDEyMy4=",
"kinesisSchemaVersion": "1.0",
"sequenceNumber": "49545115243490985018280067714973144582180062593244200961"
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
analyze-vacuum-schema.py
* Copyright 2015, Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Amazon Software License (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import boto3
SCRIPT_RUNNER_JAR = 's3://us-east-1.elasticmapreduce/libs/script-runner/script-runner.jar'
BASE_ARGS_HIVE_STEP = [
'/usr/share/aws/emr/scripts/hive-script',
'--run-hive-script',
'--args',
[program:airflow-scheduler]
process_name=%(program_name)s
directory=/home/airflow
environment=PATH="/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH",AIRFLOW_HOME=/home/airflow/airflow
command=/usr/local/bin/airflow scheduler
autostart=true
autorestart=true
user=airflow
redirect_stderr=true
stdout_logfile=/var/log/airflow/%(program_name)s.log