curl https://thoughtworks.github.io/talisman/install.sh > ~/install-talisman.sh
chmod +x ~/install-talisman.sh
cd
package com.spring.aws.gateway.config; | |
import com.amazonaws.auth.AWS4Signer; | |
import com.amazonaws.auth.AWSCredentials; | |
import com.amazonaws.auth.AWSCredentialsProvider; | |
import com.amazonaws.auth.BasicAWSCredentials; | |
import com.spring.aws.gateway.AWSRequestSigningApacheInterceptor; | |
import org.apache.http.impl.client.CloseableHttpClient; | |
import org.apache.http.impl.client.HttpClientBuilder; |
# Download the talisman installer script | |
curl https://thoughtworks.github.io/talisman/install.sh > ~/install-talisman.sh | |
chmod +x ~/install-talisman.sh | |
# Install to a single project | |
cd <project-folder> | |
# as a pre-push hook |
curl https://thoughtworks.github.io/talisman/install.sh > ~/install-talisman.sh
chmod +x ~/install-talisman.sh
cd
server: | |
port: 9001 | |
spring: | |
cloud: | |
stream: | |
function: | |
definition: fizzBuzzProducer;fizzBuzzProcessor;fizzBuzzConsumer |
input { | |
kafka{ | |
codec => json | |
bootstrap_servers => "localhost:9092" | |
topics => ["elastic-test"] | |
} | |
} | |
filter { | |
mutate { |
package com.spring.aws.gateway.controller; | |
import org.springframework.beans.factory.annotation.Qualifier; | |
import org.springframework.http.HttpEntity; | |
import org.springframework.http.HttpHeaders; | |
import org.springframework.http.HttpMethod; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.PathVariable; | |
import org.springframework.web.bind.annotation.RequestMapping; |
explain analyze select * from user_details where details -> 'info' ->> 'crop' = 'Corn' and details -> 'info' ->> 'farmSize' = '2-3' limit 50; | |
QUERY PLAN | | |
----------------------------------------------------------------------------------------------------------------------------------------------------------| | |
Limit (cost=1000.00..136551.01 rows=50 width=426) (actual time=3.764..4.346 rows=50 loops=1) | | |
-> Gather (cost=1000.00..255835.90 rows=94 width=426) (actual time=0.165..40.441 rows=50 loops=1) | | |
Workers Planned: 2 | | |
Workers Launched: 2 |
data = from(bucket: "daily-aggregate") | |
|> range(start: -1y) | |
|> filter(fn: (r) => r["_measurement"] == "ticks") | |
|> filter(fn: (r) => r["product"] == "AGUX/USD") | |
|> window(every: 1y) | |
max = data | |
|> filter(fn: (r) => r["_field"] == "max") | |
|> max() |
from(bucket: "local") | |
|> range(start: -1y) | |
|> filter(fn: (r) => r["_measurement"] == "ticks") | |
|> filter(fn: (r) => r["_field"] == "price") | |
|> filter(fn: (r) => r["product"] == "AGUX/USD") | |
|> aggregateWindow(every: 1y, fn: max, createEmpty: false) | |
|> yield(name: "max") | |
from(bucket: "local") | |
|> range(start: -1y) |
from(bucket: "local") | |
|> range(start: -37d, stop: now()) | |
|> filter(fn: (r) => r["_measurement"] == "ticks") | |
|> filter(fn: (r) => r["_field"] == "price") | |
|> filter(fn: (r) => r["product"] == "AGUX/USD") | |
|> window(period: 1h) | |
|> first() | |
|> yield(name: "first") |