Skip to content

Instantly share code, notes, and snippets.

Felipe Lolas flolas

  • Santiago, Chile
Block or report user

Report or block flolas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@flolas
flolas / sftp_sensor.py
Last active May 31, 2019
SFTP Sensor Airflow 1.9.0
View sftp_sensor.py
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
View SlackCallBack.py
def get_slack_on_retry_callback(owners_list):
def retry_callback(context):
from airflow.operators import SlackAPIPostOperator
slack_conf = getVarIfExists("slack_conf", json=True)
message = '[{DS}]\n[{DAG}]\n[{TASK}]\n :warning: La tarea se está reintentando :warning: \n Alerta para {OWNERS} \n -----------'\
.format(
DAG = context['dag'].dag_id,
TASK = context['task'].task_id,
DS = context['ds'],
OWNERS = ' '.join(owners_list)
@flolas
flolas / README.md
Last active Aug 20, 2018
Siddhi with Kerberized Kafka Source
View README.md

Kerberized Kafka with Siddhi

  • krb5-user package with krb.conf
  • crt in JKS
  • valid keytab for renewing token
@flolas
flolas / teradata_hook.sql
Created Jan 12, 2018
Teradata Hook for Apache Airflow using PyTd (Teradata Python Module)
View teradata_hook.sql
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Minimal sample using ADAL.JS</title>
<meta charset="utf-8" />
<script src="https://secure.aadcdn.microsoftonline-p.com/lib/1.0.11/js/adal.min.js"></script>
<script src="powerbi.js"></script>
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-3.2.1.min.js"><\/script>')</script>
</head>
View james.sh
sudo apt-get -y update
sudo apt-get -y install default-jre libc6-i386 libc6-dev-i386 curl unzip vim netcat telnet
sudo useradd james
sudo mkdir /home/james
sudo chown -R james:james /home/james
sudo adduser james sudo
mkdir /opt/james
sudo curl -o /opt/james/james-server-app-3.0.0-app.zip http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip
sudo unzip /opt/james/james-server-app-3.0.0-app.zip -d /opt/james
sudo chown -R james:james /opt/james
View teradataop.py
from airflow.contrib.operators.teradata_operator import TeradataOperator
task = TeradataOperator(sql='query.sql', teradata_conn_id='teradata-prod', task_id='Ejecuta_query_sql', dag=dag)
View teradataop.py
from airflow.contrib.operators.teradata_operator import TeradataOperator
task = TeradataOperator(sql='query.sql', teradata_conn_id='teradata-prod', task_id='Ejecuta_query_sql', dag=dag)
@flolas
flolas / Event.json
Created Mar 30, 2017
EventStreaming
View Event.json
{
context : {
session : <int>,
id: <int>
},
timestamp: <timestamp(6)>,
event: <str>,
subevent: <str>,
fields: [
{
View Dockerfile.bcp
FROM ubuntu
ENV LANGUAGE en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV LC_CTYPE en_US.UTF-8
ENV LC_MESSAGES en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN apt update && \
You can’t perform that action at this time.