Skip to content

Instantly share code, notes, and snippets.

View laughingman7743's full-sized avatar
🤣

laughingman7743

🤣
  • Niihama-shi
  • 09:28 (UTC +09:00)
View GitHub Profile
CREATE SCHEMA IF NOT EXISTS common;
CREATE EXTERNAL TABLE IF NOT EXISTS common.calendar
(
dt date,
week_num int
)
PARTITIONED BY(year int)
STORED AS orc
LOCATION 's3://YOUR_S3_LOCATION/'
// ==UserScript==
// @name Feedly with Hatena bookmark
// @version 0.7.3
// @namespace http://www.otchy.net
// @include http://www.feedly.com/*
// @include http://cloud.feedly.com/*
// @include http://feedly.com/*
// @include https://www.feedly.com/*
// @include https://cloud.feedly.com/*
// @include https://feedly.com/*
#!/bin/bash -xe
aws s3 cp s3://YOUR_BUCKET_NAME/path/to/json-serde-1.3.7-jar-with-dependencies.jar /tmp/
aws s3 cp s3://YOUR_BUCKET_NAME/path/to/brickhouse-0.7.1-SNAPSHOT.jar /tmp/
sudo mkdir -p /usr/lib/hive/plugin/
sudo cp /tmp/json-serde-1.3.7-jar-with-dependencies.jar /usr/lib/hive/plugin/
sudo cp /tmp/brickhouse-0.7.1-SNAPSHOT.jar /usr/lib/hive/plugin/
ADD JAR s3://YOUR_BUCKET_NAME/path/to/json-serde-1.3.7-jar-with-dependencies.jar;
CREATE EXTERNAL TABLE IF NOT EXISTS test.nested_json_table (
column1 string,
column2 array<int>,
column3 struct<
nestedcolumn1: array<string>,
nestedcolumn2: array<
struct<
morenestedarraycolumn1: int,
select
elb,
count(1, elb_status_code like "5%") as count_5xx
from elblogs.win:time_batch(5 min)
group by elb
# The MIT License
#
# Copyright (c) 2015, CloudBees, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
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 \