Skip to content

Instantly share code, notes, and snippets.

View Kulasangar's full-sized avatar

Kulasangar Kulasangar

View GitHub Profile
@Kulasangar
Kulasangar / flow.xml
Last active January 15, 2022 19:48
Replace your flowfile with this and test
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flowController encoding-version="1.4">
<maxTimerDrivenThreadCount>10</maxTimerDrivenThreadCount>
<maxEventDrivenThreadCount>1</maxEventDrivenThreadCount>
<registries/>
<parameterContexts/>
<rootGroup>
<id>2cf1e375-017d-1000-1dc6-f43e1ff015a7</id>
<name>NiFi Flow</name>
<position x="0.0" y="0.0"/>
{
"test_db": {
"columns": [
{
"column": "id",
"length": "10",
"data type": "INT"
},
{
"column": "name",
import json
from schemacrawler.schema import TableRelationshipType # pylint: disable=import-error
print(catalog.crawlInfo)
tables = {}
for table in catalog.tables:
col_list = []
columns = {}
var AWS = require('aws-sdk');
var s3 = new AWS.S3({
signatureVersion: 'v4',
});
exports.handler = (event, context, callback) => {
console.log('event:'+ JSON.stringify(event));
const bucketName = process.env.S3_BUCKET_NAME;
service: presignedurl-serverless
custom:
region: ${opt:region, 'us-west-2'}
bucketName: presignedurl-test-#{AWS::AccountId}
myDomain: 'localhost'
path: s3upload
provider:
region: ${self:custom.region}
import boto3
connection = boto3.client(
'emr',
region_name='us-east-1',
aws_access_key_id='YOUR ACCESS KEY',
ws_secret_access_key='YOUR SECRET KEY',
)
cluster_id = 'give the cluster id'
import boto3
connection = boto3.client(
'emr',
region_name='us-east-1',
aws_access_key_id='YOUR ACCESS KEY',
aws_secret_access_key='YOUR SECRET KEY',
)
cluster_id = connection.run_job_flow(
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3ClientBuilder;
import com.amazonaws.AmazonServiceException;
/**
* Copy an object from one Amazon S3 bucket to another.
*/
public class test {
public static void main(String[] args) {
final String USAGE = "\n" + "To run this example, supply the name (key) of an S3 object, the bucket name\n"
version: '3'
services:
vuejs:
build: ./simple-login-project
volumes:
- ./simple-login-project:/usr/src/app/
ports:
- "8080:80"
FROM php:7.0-apache
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
#installing
RUN apt-get update
RUN apt-get install apache2 -y
#making /app as the working directory
WORKDIR /app