Skip to content

Instantly share code, notes, and snippets.

View cassioeskelsen's full-sized avatar
🏠
Working from home

Cassio Rogerio Eskelsen cassioeskelsen

🏠
Working from home
  • Unico IDTech
  • Blumenau, SC, Brazil
  • 18:34 (UTC -03:00)
  • X @sricanesh
View GitHub Profile
blueprint:
name: ZHA - Tuya 4-Button Scene Switch
description: Automate your Tuya 4-Button Scene Switch using ZHA events.
domain: automation
input:
tuya_4button_scene_switch:
name: Zigbee 4 button remote - 12 scene
description: Tuya 4-Button Scene Switch to use
selector:
device:
@cassioeskelsen
cassioeskelsen / workflows_commands.sh
Created November 16, 2022 02:58
GCP Workflows commands
#initial setup
export PROJECT_ID=real-state-wf #altere para o nome desejado
export SERVICE_ACCOUNT=workflows-sa
export INCOMING_TOPIC_ID=rent-request
export SUCCES_TOPIC_ID=sucess-topic
export NOT_SUCESS_TOPIC_ID=not-sucess-topic
export REGION=us-east1 #você pode alterar pela sua preferência
export WORKFLOW_NAME=house-rent
gcloud config set project ${PROJECT_ID}
gcloud config set run/region ${REGION}
debezium.sink.type=eventhubs
debezium.sink.eventhubs.connectionstring=Endpoint=sb://xxxx
debezium.sink.eventhubs.hubname=xxxxx
debezium.sink.eventhubs.maxbatchsize=1048576
debezium.source.connector.class=io.debezium.connector.sqlserver.SqlServerConnector
debezium.source.offset.storage.file.filename=data/offsets.dat
debezium.source.offset.flush.interval.ms=0
debezium.source.database.database.applicationIntent=ReadOnly
debezium.source.database.hostname=zzzz.database.windows.net
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: #{deployment}#-pvc-data
namespace: #{namespace}#
spec:
storageClassName: default
accessModes:
- ReadWriteOnce
resources:
FROM registry.access.redhat.com/ubi8/openjdk-11
LABEL maintainer="Debezium Community"
#
# Set the version, home directory, and MD5 hash.
#
ENV DEBEZIUM_VERSION=1.8.0.CR1 \
SERVER_HOME=/debezium \
MAVEN_REPO_CENTRAL="https://repo1.maven.org/maven2"
/* Criação de uma nova capture instance */
EXEC sys.sp_cdc_enable_table
@source_schema = N'Faturamento'
@source_name = N'NotasFiscais',
@role_name = N'CDC_Reader',
@capture_instance = N'NotasFiscais002',
@supports_net_changes = 0
GO
/* Exclusão da antiga capture instance */
EXEC sys.sp_cdc_enable_table
@source_schema = N'Faturamento'
@source_name = N'NotasFiscais',
@role_name = N'CDC_Reader',
@capture_instance = N'NotasFiscais001',
@supports_net_changes = 0
EXEC sys.sp_cdc_enable_db
GO
/*Criar uma role para o usuário debezium: */
CREATE ROLE CDC_Reader
GO
/*Criar um usuário para leitura do CDC: */
CREATE USER [debezium-cdc] WITH PASSWORD = '<senha>'
GO
Prós Contras
Suporta vários Formatos Data Swamps
Suporta Machine Learning Dificuldade de utilização em BIs
Análises mais complexas Exigência de pessoal especializado
Prós Contras
Excelente para BIs Apenas dados estruturados
Sistemas proprietários com interface SQL
Dados Estáticos
Suporte limitado para Machine Learning