Skip to content

Instantly share code, notes, and snippets.

@boristyukin
boristyukin / impala_command_drop_database_tables.sh
Created March 23, 2019 01:41
How to drop all Impala tables in a given database
impala-shell -d mydbname -q 'show tables' -B | xargs -I '{}' impala-shell -d mydbname -q 'DROP TABLE IF EXISTS `{}`;'
@boristyukin
boristyukin / kudu_test.groovy
Created November 16, 2018 21:06
kudu getPendingErrors issue
import org.apache.kudu.ColumnSchema
import org.apache.kudu.Schema
import org.apache.kudu.Type
import org.apache.kudu.client.AlterTableOptions
import org.apache.kudu.client.CreateTableOptions
import org.apache.kudu.client.Insert
import org.apache.kudu.client.KuduClient
import org.apache.kudu.client.KuduException
import org.apache.kudu.client.KuduPredicate
import org.apache.kudu.client.KuduPredicate.ComparisonOp
@boristyukin
boristyukin / ssis_output_value_from_script.cs
Last active September 21, 2021 21:38
SSIS write string value to Output Window for debug
///////////////////////////////////////
// For Script Task (control flow)
///////////////////////////////////////
bool fireAgain = true; Dts.Events.FireInformation(1,"YOUR TITLE",myVar.ToString(),"",0, ref fireAgain); //debug message
Dts.Events.FireError(0, "Error!", "Your custom Error message", String.Empty, 0); //raise custom error
///////////////////////////////////////
//For Script Component (data flow)
///////////////////////////////////////
@boristyukin
boristyukin / qlikview_dynamic_charts
Last active August 29, 2015 14:15
QlikView implementation of dynamic charts (trends), driven by user selection
Dimension Expression (Primary and Secondary)
------------------------------------------------
= $(='['&only(%TrendDimensionName)&']')
= $(='['&only(%TrendDimensionNameSecondary)&']')
Dimension Label
------------------------------------------------
=%TrendDimensionName
Metric Expression
@boristyukin
boristyukin / qlikview_set_expression_to_ignore_dimension_selections
Last active January 1, 2016 18:19
Qlikview - dynamic set expression to disregard all calendar (or any other dimension) selections
// Credit to http://community.qlikview.com/blogs/qlikviewdesignblog/2013/11/18/dollar-expansions
// define variable which will pull/contatenate all members of dimension to disregard
Set vClearCalendar = "='[' & Concat({1<$Table={'Calendar'}>} $Field, ']=,[') & ']=' ";
// if you want to exclude some, for example Year:
Set vClearCalendar = "='[' & Concat({1<$Table={'Calendar'}, $Field-={'Year'}>} $Field, ']=,[') & ']=' ";
//this is how set expression will look like
// Sum ({$<$(vClearCalendar)>} Amount)