In the talk described our experience of integration Tableau into our data reporting and Business Intelligence process.
Switching from in-house reporting solution to Tableau reporting, data refreshes with Command Line Utility
and other small tips and tricks. Using Tableau reports for building a flexible system for monitoring KPI of a company.
From simple to more advanced: Lessons learned in 13 months with Tableau
1. From simple to more advanced:
Lessons learned in 13 months
wi th Tableau
S E R G I I K H O M E N K O , D A T A S C I E N T I S T ,
S E R G I I . K H O M E N K O @ S T Y L I G H T . C O M , @ l c 0 d 3 r
S T Y L I G H T . C O M
2. A G E N D A
L i f e b e f o r e T a b l e a u
C u r r e n t S t a t e o f A r t
A d v a n c e d t e c h n i q u e s
6. The life before Tableau
D I F F E R E N T T O O L S , D I F F E R E N T A P P R O A C H E S
7.
8. P R O B L E M S :
D a t a c o n s i s t e n c y
N o t f l e x i b l e s t r u c t u r e – r e p o r t c h a n g e
D i f f i c u l t t o s c a l e
T i m e - c o n s u m i n g – f o r n e w a d - h o c
M a i n t a i n a n d s u p p o r t – i n - h o u s e
d e v e l o p m e n t
I n s h o r t t e r m
M o r e f l e x i b l e
E a s y t o a d d a l e r t i n g
16. P R O B L E M S :
T a b l e a u i s n o t y o u r d a t a w a r e h o u s e
C o n n e c t i n g G o o g l e A n a l y t i c s
C u s t o m e x t r a c t t r a n s f o r m l o a d
19. Tableau Data Extract API
S c h e m a d e f i n i t i o n
TABLEAU_PATH = 'c:Program FilesTableauTableau 8.2bin'
DATA_SCTRUCT = [('date', tde.Type.DATE),
('timeframe', tde.Type.INTEGER),
('rank_id', tde.Type.INTEGER),
('rank_name', tde.Type.UNICODE_STRING),
('rank_class', tde.Type.UNICODE_STRING),
('shop_id', tde.Type.INTEGER),
('shop_rank', tde.Type.INTEGER),
('active-traffic', tde.Type.UNICODE_STRING),
('active-server', tde.Type.UNICODE_STRING)]
20. def push_source(source, filename):
"""
Push data source to Tableau Server
"""
template = open('cmdpush.txt', 'r').read()
config = template % (filename, source)
params = config.split("n”)
formatted = list(itertools.chain.from_iterable([make_argument(param) for param in params]))
formatted.insert(0, "tableau.com")
formatted.insert(1, "addfiletoextract")
current_path = os.getcwd()
os.chdir(TABLEAU_PATH)
output = check_output(formatted)
os.chdir(current_path)
return output
Tableau Data Extract API
P u s h d a t a s o u r c e
21. Tableau Data Extract Command-Line Utility
for source in sources:
config = template % source
params = config.split("n")
def make_argument(param):
name, value = param.split("=")
return ("--%s" % name, value)
M a n u a l r e f r e s h e s
formatted = list(itertools.chain.from_iterable(map(make_argument, params)))
formatted.insert(0, "tableau.com")
formatted.insert(1, "refreshextract")
try:
os.chdir(tableau_path)
output = check_output(formatted)
if output:
logger.exception('Exception during the execution: %s' % output)
22. Custom Google Analytics to Tableau
M a n u a l r e f r e s h e s
parser = argparse.ArgumentParser(description='GoogleAnalytics to Tableau ETL script')
parser.add_argument('--date', '-d', metavar='date', default=(date.today() - timedelta(1)).isoformat(), help='A date
used to ETL data')
args = parser.parse_args()
source = 'GA data'
table_def, tdefile, tabletran = tableau.init_source(source)
generate_ga_data(table_def, tabletran, args.date)
tdefile.close()
tableau.push_source(source, "%s%s.tde" % (os.path.dirname(os.path.realpath(__file__)), source))
25. Sergii Khomenko
Data Scientist
STYLIGHT GmbH
sergii.khomenko@stylight.com
@lc0d3r
Nymphenburger Straße 86
80636 Munich, Germany
S T Y L I G H T . C O M