Instalar pentaho como servicio UNIX

July 9, 2010
Tags: ,

Bueno hace poco me pidieron instalar Pentaho como si fuera un servicio cosa que me pareció muy útil ahí dejo la receta seguramente la mayoría ya sepa como hacerlo pero para el resto ahí va:

  1. bajamos Pentaho y aqui hay dos variantes o te generas el war y lo metes en un tomcat vació o lo enchufas tal y como esta (ese es nuestro caso).
  2. Ahora hacemos lo siguiente sudo vi /etc/init.d/pentaho ahi pegamos lo siguiente:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
export JAVA_HOME=/usr/lib/jvm/java-6-sun
case $1 in
start)
sh ${ruta}/start-pentaho.sh
;;
stop)
sh ${ruta}/stop-pentaho.sh
;;
restart)
sh ${ruta}/stop-pentaho.sh
sh ${ruta}/start-pentaho.sh
;;
clear)
sh${ruta}/stop-pentaho.sh
cd ${ruta}/tomcat/work/Catalina/localhost
rm -r pentaho
rm -r pentaho-style
cd ${ruta}/tomcat/logs
rm *.log
sh ${ruta}/start-pentaho.sh
;;
esac
exit 0

Como se puede ver hay una opcion que se llama clear esto borra el temporal del tomcat y los log esto ayuda cuando estas haciendo pruebas y quieres no tener nada.

  1. después ponemos sudo chmod 755 /etc/init.d/pentaho
  2. y por ultimo sudo update-rc.d pentaho defaults 99

Con esto ya esta como servicio ahora solo /etc/init.d/pentaho start nos arrancara el servicio y tendremos a pentaho funcionanado :D

A ver si saco tiempo y miro si funcionaria en jetty para así tener pentaho en el servidor de aplicaciones muy ligero

0

DataBases OpenSource ¿Cual?

July 9, 2010
Tags:

Bueno ahora que MySQL esta en peligro y que nadie sabe como va a ser el futuro, todo el mundo busca una salida, además se une que ha habido un gran movimiento en las bases de datos se ha creado el movimiento NOSQL y se han creado distintas bases de datos nuevas.

Al trabajar con pentaho me están empezando a pedir algunas bases de datos no corrientes, últimamente quieren hadoop en vede Oracle y cosas así a continuación pongo algunas bases de datos libre que pueden ser de interés.

Siento que estén en ingles pero no tengo tiempo de traducir , también he puesto algunas presentaciones para complementar.
(more…)

0

cherokee summit 2010

May 10, 2010
Tags:

Bueno este fin de semana fui la reunión de cherokee ya he hablado varias veces de el ,de hecho la versión la primera que saque si es que la  saco al final se llama alo , en esas charlas se hablo mucho de su futuro y de que se puede mejorar , bueno hay que decir que en esas charlas no estaban todos los que son ni son todos los que estan.

Yo me quedo con la gente sobre todo con Stefan de Konink y su odio al python un tío lamar de simpático , Taher Shihadeh que me dio una muy buena herramienta para c que no conocía y joder si la hubiera usado antes y Iván Chavero un tío genial y un verdadero crack.

El ultimo día , se hablo sobre la comunidad , he de decir que me tuve que ir , pero ahora quiero hacer algunas reflexiones que para mi son fundamentales :

  1. Lo principal  para mi hacer que la gente que tiene Apache sea capaz de pasar su fichero de configuración a cherokee de manera fácil , es decir alguna aplicación para pasar de apache a cherokee quizás no al 100% pero si a un 60% ò 70% ya que Apache es el que mas esta extendido y la migración ha de ser poco traumática .
  2. take and run , es decir algún tipo de guía en plan tengo esto en Apache pero en cherokee es así ,pero rápido tipo FAQ
  3. bases , es decir hacer algo parecido a SUN en su momento promover concursos de aplicaciones o mejoras o los famosos Bounty pero con cosas accesibles , pero repito algún tipo de concurso atraería a mucha gente sobre todo con el tirón de Alo.
  4. talleres , es una opción me ha pasado muchas veces querer ayudar y nos sabes por donde empezar , se podría montar alguna cosa sencilla para dar un input a la gente .
  5. Montar algo parecido al LAMP pero con cherokee

Otra de las cosas que se comento, fue cherokee y su movimiento dentro del social media Alex Barrera enfatizo mucho esto , pero ahí me dan mas luces que sombras , no creo que sea bueno forzar una comunidad, ya que se puede ir de las manos pero reconozco que si  te ven con el banner de cherokee lo buscaran y miran ,pero vamos no se por que me da que eso tiene un tirón corto.

Para resumir , a mi me gusto mucho ,el sitio esta muy bien , y la gente magnifica y describí algunas cosas chulas de cherokee que no sabia .

Desde aquí dar las felicitaciones a la gente de octality.

Voy adjuntar las fotos que hice pocas por que allí había gente por un tubo y con mil cámaras pero ahí van las mías incluso la de un accidente de un tio que se quería meter directamente en un edificio.

Saludos

2

Ingresar Imagen en el WAQR

March 21, 2010

Una de las cosas que mas me quema cuando hacemos algo en el metadata es la generacional los templates del WAQR,sobre todo si quieres incluir imágenes.
Lo que debemos hacer es colocar la imagen en localhost, ya que por lo visto pentaho no sabe referenciar a otros servidores o IP que sean estas.
Bueno pues por ahi un ejemplo

1
<imageref src=”ruta/imagen”  height=”75″ width=”300″ keepAspectRatio=”true” scale=”true”></imageref>

Espero que os sirva

0

NO Sql

March 6, 2010
Tags:

Bueno desde hace algún tiempo , me han mencionado , este movimiento uno de mis amigos ya comento algo en su blog hace un timepo.

Este movimiento intenta cambiar el paradigma de las bases de datos y cambiar por aquellas que no se acogen a el “lenguaje SQL”.

Este movieento tambien a acojido a las bases de datos experimentales o no comvencionales :

  • Orientadas a documento como CouchDB o MongoDB
  • Orientadas a grafos como Neo4j
  • Clave/valor, como SimpleDB o Voldemort
  • Orientadas a objetos como Db4o
  • Tabulares como Cassandra o Hypertable
  • Otros acercamientos como GT.M

pero que es :

*Los nombres de los proyectos son tan diversos como extraños: Hadoop, Voldemort, Dynomite, y otros. Pero suelen estar unificados por algunos puntos en común, incluyendo:

No llamarlos “bases de datos”. Werner Vogels, CTO de Amazon, se refiere a su sistema Dynamo como “un almacenamiento de clave-valor de alta disponibilidad”. Google llama a su BigTable, otro de los modelos para muchos simpatizantes de NoSQL, “un sistema de almacenamiento distribuido para gestionar datos estructurados”.

Pueden manejar enormes cantidades de datos. Hypertable, una implementación de código abierto basada en BigTable, se usa dentro del motor de búsqueda Zvents para escribir 1000 millones de celdas de datos por día, según cuenta el ingeniero Doug Judd en su presentación.

A su vez, BigTable, en conjunto con su tecnología hermana MapReduce, procesa hasta 20 petabytes de datos por día.

“Definitivamente la cantidad de datos es tan grande que las personas están buscando otras tecnologías”, dice Travis de SpringSource, que con su tecnología VPork ayuda a los usuarios de NoSQL a realizar benchmarks de rendimiento de sus bases de datos alternativas.

Se ejecutan en clusters de servidores de  PC baratas. Los clusters de PC se pueden expandir de forma facil y barata sin la complejidad y el costo del “data sharding”, que involucra recortar una base de datos en múltiples tablas para ejecutarse en grandes clusters o grillas.

Google cuenta que uno de sus clusters de BigTable más grande gestiona 6 petabytes de datos sobre miles de servidores.

“Oracle te va a decir que con el hardware y la configuración adecuada de Oracle RAC (Real Application Clusters) y algún otro software mágico pueden lograr la misma escalabilidad. ¿Pero a qué costo?”, pregunta Javier Soltero, CTO de SpringSource.

Superan los cuellos de botella de rendimiento. Al no tener que realizar la traducción de datos hacia un formato amigable para SQL, las arquitecturas NoSQL son mucho más rápidas.

“SQL es un enfoque extraño para el código procedural, y casi todo el código es procedural”, dice Curt Monash, un analista independiente de bases de datos y blogger. “El costo de mapear los datos a SQL puede valer la pena para los casos en que estos datos tengan que manipularse extensivamente… pero cuando la estructura de la base de datos es muy simple, SQL no parece ayudar”.

Raffaele Sena, de Adobe Systems, dice que Adobe relanzó su servicio colaborativo ConnectNow Web hace un año y medio, y decidió no usar una base de datos por los motivos explicados por Monash.

Adobe usa Terracotta, un software Java para clustering, para gestionar los datos en formato Java. Sena explica que este enfoque es la clave por la cual el rendimiento de ConnectNow es dos a tres veces superior a la versión anterior. “El sistema hubiera sido mucho más complejo y dificil de desarrollar con una base de datos”, dice.

Otro proyecto, MongoDB, se llama a si mismo “base de datos orientada a documentos” por su almacenamiento nativo de datos de tipo objeto.

Sólo lo necesario. Quienes impulsan NoSQL admiten que las bases de datos tienen características únicas y una reputación sólida para la integridad de datos, pero explican que todo esto puede resultar demasiado para sus necesidades.

Tomemos por ejemplo a ConnectNow que, incluso sin una base de datos, hace tres copias de los datos de la sesión del usuario mientras está online – datos que luego son borrados cuando el usuario se desconecta, dice Sena. “No necesitamos una base de datos, ya que la mejor representación de los datos ya están en memoria.

El otro punto de vista es por que ahora hay tanto moviemineto en las bases de datos pues a mi me da que es por el futuro algo negro o por lo menos grisáceo de MySQL y que el hermano bastardo no tiene mucho tirón y el movimiento para salvar a MySQL no esta llegando a nada y esto si que es peligroso.

Pero de todo esto pueden llegar cosas buenas bases de datos mejores y sobre todo mas especificas que ayuden a aumentar el rendimiento. Los dos próximos post serán unos sobre alternativas a MySQL y la otro sobre  Hadoop que lo estoy probando para RC

*sacado de http://www.dosideas.com/noticias/base-de-datos/657-nosql-el-movimiento-en-contra-de-las-bases-de-datos.html

1

cherokee summit 2010

February 15, 2010

Hola a todos :

Dentro de poco sera la primera reunión de cherokee y aconsejo a  todos los que les gustes este mundo que se apunte , como no he visto ningún banner para anunciar el evento,   he hecho unos con mi mejor intención :D si hay alguna critica ya sabéis comentario.

1

Seguridad User-Rol

February 3, 2010

1260471981_orange-folder-lockedUna de las cosas que mas se hecha en falta en Pentaho , es el hecho de la seguridad , bueno , hemos desarrollado una librería , mas bien hemos modificado una para que tengáis algo mas de seguridad , pero poco mas es muy básica pero ahí se deja :D .

Estamos realizando un bean que contenga esta seguridad . Ya se colgara si alguien quiere participar en el desarrollo pues que lo diga y se le da acceso a la forja , de momento no es publica por temas de concurso y cosas asì pero , cuando se termine todo sera publica. Si alguien tiene alguna duda o queja que ponga un post y si viola el MVC que se le va hacer

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
/*
 * Copyright 2006 Pentaho Corporation.  All rights reserved.
 * This software was developed by Pentaho Corporation and is provided under the terms
 * of the Mozilla Public License, Version 1.1, or any later version. You may not use
 * this file except in compliance with the license. If you need a copy of the license,
 * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
 * BI Platform.  The Initial Developer is Pentaho Corporation.
 *
 * Software distributed under the Mozilla Public License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or  implied. Please refer to
 * the license for the specific language governing your rights and limitations.
 *
 * @created Jul 12, 2005
 * @author James Dixon, Angelo Rodriguez, Steven Barkdull
 *
 */
 
package org.pentaho.platform.web.servlet;
 
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.Principal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
 
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactoryConfigurationError;
 
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.pentaho.platform.api.engine.IAclSolutionFile;
import org.pentaho.platform.api.engine.ICacheManager;
import org.pentaho.platform.api.engine.IContentGeneratorInfo;
import org.pentaho.platform.api.engine.IFileInfo;
import org.pentaho.platform.api.engine.IFileInfoGenerator;
import org.pentaho.platform.api.engine.IParameterProvider;
import org.pentaho.platform.api.engine.IPentahoAclEntry;
import org.pentaho.platform.api.engine.IPentahoSession;
import org.pentaho.platform.api.engine.IPermissionMask;
import org.pentaho.platform.api.engine.IPermissionRecipient;
import org.pentaho.platform.api.engine.IPluginSettings;
import org.pentaho.platform.api.engine.ISolutionFile;
import org.pentaho.platform.api.engine.IUserDetailsRoleListService;
import org.pentaho.platform.api.engine.PentahoAccessControlException;
import org.pentaho.platform.api.repository.ISolutionRepository;
import org.pentaho.platform.engine.core.solution.ActionInfo;
import org.pentaho.platform.engine.core.system.PentahoSystem;
import org.pentaho.platform.engine.security.SecurityHelper;
import org.pentaho.platform.engine.security.SimplePermissionMask;
import org.pentaho.platform.engine.security.SimpleRole;
import org.pentaho.platform.engine.security.SimpleUser;
import org.pentaho.platform.engine.services.WebServiceUtil;
import org.pentaho.platform.util.StringUtil;
import org.pentaho.platform.util.messages.LocaleHelper;
import org.pentaho.platform.util.xml.XmlHelper;
import org.pentaho.platform.web.http.request.HttpRequestParameterProvider;
import org.pentaho.platform.web.servlet.messages.Messages;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
 
public class SolutionRepositoryService extends ServletBase {
 
  /**
   *
   */
  private static final long serialVersionUID = -5870073658756939643L;
 
  private static final Log logger = LogFactory.getLog(SolutionRepositoryService.class);
 
  /**
   * contains instance of a sax parser factory. Use getSAXParserFactory() method to get a copy of the factory.
   */
  private static final ThreadLocal SAX_FACTORY = new ThreadLocal();
  private static final String RESPONSE_DOCUMENT_ENCODING = "UTF-8";
  private static final String RESPONSE_DOCUMENT_VERSION_NUM = "1.0";
 
  @Override
  public Log getLogger() {
    return SolutionRepositoryService.logger;
  }
 
  public SolutionRepositoryService() {
    super();
  }
 
  @Override
  protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
    PentahoSystem.systemEntryPoint();
    OutputStream outputStream = response.getOutputStream();
    try {
      boolean wrapWithSoap = "false".equals(request.getParameter("ajax")); //$NON-NLS-1$ //$NON-NLS-2$
      String component = request.getParameter("component"); //$NON-NLS-1$
      response.setContentType("text/xml"); //$NON-NLS-1$
      response.setCharacterEncoding(LocaleHelper.getSystemEncoding());
 
      IPentahoSession userSession = getPentahoSession(request);
      // send the header of the message to prevent time-outs while we are working
      response.setHeader("expires", "0"); //$NON-NLS-1$ //$NON-NLS-2$
 
      dispatch(request, response, component, outputStream, userSession, wrapWithSoap);
 
      /**
       * NOTE: PLEASE DO NOT CATCH Exception, since this is the super class of RuntimeException. We do NOT want to catch RuntimeException, only CHECKED
       * exceptions!
       */
    } catch (SolutionRepositoryServiceException ex) {
      commonErrorHandler(outputStream, ex);
    } catch (PentahoAccessControlException ex) {
      commonErrorHandler(outputStream, ex);
    } catch (TransformerConfigurationException ex) {
      commonErrorHandler(outputStream, ex);
    } catch (ParserConfigurationException ex) {
      commonErrorHandler(outputStream, ex);
    } catch (TransformerException ex) {
      commonErrorHandler(outputStream, ex);
    } catch (TransformerFactoryConfigurationError ex) {
      commonErrorHandler(outputStream, ex.getException());
    } catch (IOException ex) {
      // Use debugErrorHandler for ioException
      debugErrorHandler(outputStream, ex);
    } finally {
      PentahoSystem.systemExitPoint();
    }
    if (ServletBase.debug) {
      debug(Messages.getString("HttpWebService.DEBUG_WEB_SERVICE_END")); //$NON-NLS-1$
    }
  }
 
  /**
   * Used for logging exceptions that happen that aren't necessarily exceptional. It's common that IOExceptions will happen as people begin their transactions
   * and then abandon their web page by closing their browser or current tab. Logging each one fills up the server log needlessly. Setting to debug level allows
   * us visibility without compromising a production deployment.
   *
   * @param outputStream
   * @param ex
   * @throws IOException
   */
  private void debugErrorHandler(final OutputStream outputStream, final Exception ex) throws IOException {
    String msg = Messages.getErrorString("SolutionRepositoryService.ERROR_0001_ERROR_DURING_SERVICE_REQUEST"); //$NON-NLS-1$;
    debug(msg, ex);
    WebServiceUtil.writeString(outputStream, WebServiceUtil.getErrorXml(msg), false);
  }
 
  private void commonErrorHandler(final OutputStream outputStream, final Exception ex) throws IOException {
    String msg = Messages.getErrorString("SolutionRepositoryService.ERROR_0001_ERROR_DURING_SERVICE_REQUEST"); //$NON-NLS-1$;
    error(msg, ex);
    WebServiceUtil.writeString(outputStream, WebServiceUtil.getErrorXml(msg), false);
  }
 
  private static String[] getFilters(final HttpServletRequest request) {
    String filter = request.getParameter("filter"); //$NON-NLS-1$
    List filters = new ArrayList();
    if (!StringUtils.isEmpty(filter)) {
      StringTokenizer st = new StringTokenizer(filter, "*.,");
      while (st.hasMoreTokens()) {
        filters.add(st.nextToken());
      }
    }
 
    return filters.toArray(new String[] {});
  }
 
  protected void dispatch(final HttpServletRequest request, final HttpServletResponse response, final String component, final OutputStream outputStream,
      final IPentahoSession userSession, final boolean wrapWithSOAP) throws IOException, SolutionRepositoryServiceException, PentahoAccessControlException,
      ParserConfigurationException, TransformerConfigurationException, TransformerException, TransformerFactoryConfigurationError {
 
    IParameterProvider parameterProvider = new HttpRequestParameterProvider(request);
    if ("getSolutionRepositoryDoc".equals(component)) { //$NON-NLS-1$
      String[] filters = SolutionRepositoryService.getFilters(request);
      Document doc = getSolutionRepositoryDoc(userSession, filters);
      WebServiceUtil.writeDocument(outputStream, doc, wrapWithSOAP);
    } else if ("createNewFolder".equals(component)) { //$NON-NLS-1$
      String solution = request.getParameter("solution"); //$NON-NLS-1$
      String path = request.getParameter("path"); //$NON-NLS-1$
      String name = request.getParameter("name"); //$NON-NLS-1$
      String desc = request.getParameter("desc"); //$NON-NLS-1$
      boolean result = createFolder(userSession, solution, path, name, desc);
      WebServiceUtil.writeString(outputStream, "" + result + "", wrapWithSOAP); //$NON-NLS-1$
    } else if ("delete".equals(component)) { //$NON-NLS-1$
      String solution = request.getParameter("solution"); //$NON-NLS-1$
      String path = request.getParameter("path"); //$NON-NLS-1$
      String name = request.getParameter("name"); //$NON-NLS-1$
      boolean result = delete(userSession, solution, path, name);
      WebServiceUtil.writeString(outputStream, "" + result + "", wrapWithSOAP); //$NON-NLS-1$
    } else if ("setAcl".equals(component)) { //$NON-NLS-1$
      setAcl(parameterProvider, outputStream, userSession, wrapWithSOAP);
    } else if ("getAcl".equals(component)) { //$NON-NLS-1$
      getAcl(parameterProvider, outputStream, userSession, wrapWithSOAP);
 
    } else {
      throw new RuntimeException(Messages.getErrorString("HttpWebService.UNRECOGNIZED_COMPONENT_REQUEST", component)); //$NON-NLS-1$
    }
  }
 
  @Override
  protected void doPost(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
    doGet(request, response);
  }
 
  /**
   * This method will delete a file from the ISolutionRepository and respects IPentahoAclEntry.PERM_DELETE.
   *
   * @param userSession
   *          An IPentahoSession for the user requesting the delete operation
   * @param solution
   *          The name of the solution, such as 'steel-wheels'
   * @param path
   *          The path within the solution to the file/folder to be deleted (does not include the file/folder itself)
   * @param name
   *          The name of the file or folder which will be deleted in the given solution/path
   * @return Success of the delete operation is returned
   * @throws IOException
   */
  public static boolean delete(final IPentahoSession userSession, final String solution, final String path, final String name)
      throws IOException {
 
    ISolutionRepository repository = PentahoSystem.get(ISolutionRepository.class, userSession);
    String fullPath = ActionInfo.buildSolutionPath(solution, path, name);
    ISolutionFile solutionFile = repository.getFileByPath(fullPath);
    if (solutionFile != null &amp;&amp; repository.hasAccess(solutionFile, IPentahoAclEntry.PERM_DELETE)) {
      repository.removeSolutionFile(fullPath);
      return true;
    }
    return false;
  }
 
  /**
   * This method creates a folder along with it's index.xml file.
   * This method also verifies that the user has PERM_CREATE permissions before
   * creating the folder.
   *
   * @param userSession the current user
   * @param solution the solution path
   * @param path the folder path
   * @param name the name of the new folder
   * @param desc the description of the new folder
   * @return true if success
   * @throws IOException
   */
  public static boolean createFolder(IPentahoSession userSession, String solution, String path, String name, String desc) throws IOException {
    ISolutionRepository repository = PentahoSystem.get(ISolutionRepository.class, userSession);
    if (solution == null) {
      solution = "";
    }
 
    // verify that the name does not contain a path separator before creating the folder
    if (name == null || name.indexOf("/") &gt;= 0 || name.indexOf("\\") &gt;= 0 || //$NON-NLS-1$ //$NON-NLS-2$
        name.indexOf(ISolutionRepository.SEPARATOR) &gt;= 0) {
      return false;
    }
 
    String parentFolderPath = ActionInfo.buildSolutionPath(solution, path, "" + ISolutionRepository.SEPARATOR);
    ISolutionFile parentSolutionFile = repository.getFileByPath(parentFolderPath);
    if (parentSolutionFile != null &amp;&amp; parentSolutionFile.isDirectory() &amp;&amp;
        repository.hasAccess(parentSolutionFile, IPentahoAclEntry.PERM_CREATE)) {
      File parent = new File(PentahoSystem.getApplicationContext().getSolutionPath(parentFolderPath));
      File newFolder = new File(parent, name);
      if (newFolder.exists()) {
        // if the new folder already exists, we need to get out
        return false;
      }
      repository.createFolder(newFolder);
 
      // create the index file content
      String defaultIndex = "" + name + "" + (desc!=null?desc:name) //$NON-NLS-1$
          + "reporting.pngtruelist"; //$NON-NLS-1$
 
      // add the index file to the repository
      String indexPath = ActionInfo.buildSolutionPath(solution, path, name);
      String baseURL = PentahoSystem.getApplicationContext().getSolutionPath("");
      repository.addSolutionFile(baseURL, indexPath, ISolutionRepository.INDEX_FILENAME, defaultIndex.getBytes(), false);
      return true;
    }
    return false;
  }
 
  private boolean acceptFilter(String name, String[] filters) {
    if (filters == null || filters.length == 0) {
      return true;
    }
    for (int i = 0; i &lt; filters.length; i++) {
      if (name.endsWith(filters[i])) {
        return true;
      }
    }
    return false;
  }
 
  private boolean accept(boolean isAdministrator, ISolutionRepository repository, ISolutionFile file) {
    return isAdministrator || repository.hasAccess(file, IPentahoAclEntry.PERM_EXECUTE);
  }
 
  private Element createChild(ISolutionRepository repository, Element parentElement, ISolutionFile childSolutionFile, String name) {
	  Element child = parentElement.getOwnerDocument().createElement("file");
      parentElement.appendChild(child);
      try {
        String localizedName = repository.getLocalizedFileProperty(childSolutionFile, "name");
        child.setAttribute("localized-name", localizedName == null || "".equals(localizedName) ? name : localizedName);
      } catch (Exception e) {
        child.setAttribute("localized-name", name); //$NON-NLS-1$
      }
      try {
        String visible = repository.getLocalizedFileProperty(childSolutionFile, "visible");
        child.setAttribute("visible", visible == null || "".equals(visible) ? "false" : visible);
      } catch (Exception e) {
        e.printStackTrace();
        child.setAttribute("visible", "false"); //$NON-NLS-1$
      }
      String description = repository.getLocalizedFileProperty(childSolutionFile, "description");
      child.setAttribute("description", description == null || "".equals(description) ? name : description);
      child.setAttribute("name", name); //$NON-NLS-1$
      child.setAttribute("isDirectory", "true"); //$NON-NLS-1$
      child.setAttribute("lastModifiedDate", "" + childSolutionFile.getLastModified()); //$NON-NLS-1$
 
      return child;
  }
 
  private boolean isRoleInList(List roles, String roleName) {
 
	  boolean found = false;
 
	  for (int i = 0; i &lt; roles.size() &amp;&amp; !found; i++) { 		 found = roles.get(i).equals(roleName); 	  } 	   	  return bFound; 	     }      private void processRepositoryFile(IPentahoSession session, boolean isAdministrator, ISolutionRepository repository, Element parentElement,       ISolutionFile parentFile, String[] filters) {     ISolutionFile children[] = parentFile.listFiles();     //System.out.println("--&gt;processRepositoryFile");
 
    for (ISolutionFile childSolutionFile : children) {
      if (!accept(isAdministrator, repository, childSolutionFile)) {
        // we don't want this file, skip to the next one
        continue;
      }
 
      String name = childSolutionFile.getFileName();
      if (name.startsWith(".")) {
        // these are hidden files of some type that are never shown
        // we don't want this file, skip to the next one
        continue;
      }
      if (childSolutionFile.isDirectory()) {
        // we always process directories
 
        // MDD 10/16/2008 Not always.. what about 'system'
        if (childSolutionFile.getFileName().startsWith("system")) {
          // skip the system dir, we DO NOT ever want this to hit the client
          continue;
        }
 
        Principal principal = (Principal) session.getAttribute(SecurityHelper.SESSION_PRINCIPAL);
        String parentNode = parentElement.getAttribute("localized-name");
        String parentNameNode = parentElement.getAttribute("name");
        if (parentNameNode.equalsIgnoreCase("users")) {
        	if (childSolutionFile.getFileName().equals(principal.getName())) {
        		Element child = createChild(repository, parentElement, childSolutionFile, name);
            	processRepositoryFile(session, isAdministrator, repository, child, childSolutionFile, filters);
        	}        	
 
        }
        else if (parentNameNode.equalsIgnoreCase("roles")) {
	        IUserDetailsRoleListService roleListService = PentahoSystem.getUserDetailsRoleListService();
	        List roles = roleListService.getRolesForUser(principal.getName());
 
	        if (isRoleInList(roles, childSolutionFile.getFileName())) {
	        	Element child = createChild(repository, parentElement, childSolutionFile, name);
            	processRepositoryFile(session, isAdministrator, repository, child, childSolutionFile, filters);
	        }
 
	    }
        else {
 
        	Element child = createChild(repository, parentElement, childSolutionFile, name);
 
        	processRepositoryFile(session, isAdministrator, repository, child, childSolutionFile, filters);
        }
        // we have finished processing this so skip to the next one
        continue;
      }
 
      if (acceptFilter(name, filters)) { //$NON-NLS-1$
        int lastPoint = name.lastIndexOf('.');
        String extension = ""; //$NON-NLS-1$
        if (lastPoint != -1) {
          // ignore anything with no extension
          extension = name.substring(lastPoint + 1).toLowerCase();
        }
 
        // xaction and URL support are built in
        boolean addFile = "xaction".equals(extension) || "url".equals(extension); //$NON-NLS-1$ //$NON-NLS-2$
        boolean isPlugin = false;
        // see if there is a plugin for this file type
        IPluginSettings pluginSettings = PentahoSystem.get(IPluginSettings.class, session); //$NON-NLS-1$
        if (pluginSettings != null) {
          Set types = pluginSettings.getContentTypes();
          isPlugin = types != null &amp;&amp; types.contains(extension);
          addFile |= isPlugin;
        }
 
        Element child = parentElement.getOwnerDocument().createElement("file");
        parentElement.appendChild(child);
        IFileInfo fileInfo = null;
 
        if (addFile) {
          try {
            // the visibility flag for action-sequences is controlled by /action-sequence/documentation/result-type
            // and we should no longer be looking at 'visible' because it was never actually used!
            String visible = "none".equals(repository.getLocalizedFileProperty(childSolutionFile, "documentation/result-type")) ? "false" : "true";
            child.setAttribute("visible", visible == null || "".equals(visible) ? "true" : visible);
          } catch (Exception e) {
            child.setAttribute("visible", "true"); //$NON-NLS-1$
          }
          if (name.endsWith(".xaction")) {
            // add special props?
            // localization..
          } else if (name.endsWith(".url")) {
 
            // add special props
            String props = new String(childSolutionFile.getData());
            StringTokenizer tokenizer = new StringTokenizer(props, "\n");
            while (tokenizer.hasMoreTokens()) {
              String line = tokenizer.nextToken();
              int pos = line.indexOf('=');
              if (pos &gt; 0) {
                String propname = line.substring(0, pos);
                String value = line.substring(pos + 1);
                if ((value != null) &amp;&amp; (value.length() &gt; 0) &amp;&amp; (value.charAt(value.length() - 1) == '\r')) {
                  value = value.substring(0, value.length() - 1);
                }
                if ("URL".equalsIgnoreCase(propname)) {
                  child.setAttribute("url", value);
                }
              }
            }
          } else if (isPlugin) {
            // must be a plugin - make it look like a URL
            IContentGeneratorInfo info = pluginSettings.getDefaultContentGeneratorInfoForType(extension, session);
            if (info != null) {
              IFileInfoGenerator fig = info.getFileInfoGenerator();
              if (fig != null) {
                fig.setLogger(this);
                // get the file info object for this file
                fileInfo = fig.getFileInfo(childSolutionFile.getSolution(), childSolutionFile.getSolutionPath(), name, childSolutionFile.getData());
                String handlerId = pluginSettings.getContentGeneratorIdForType(extension, session);
                String fileUrl = pluginSettings.getContentGeneratorUrlForType(extension, session);
                String solution = childSolutionFile.getSolutionPath();
                String path = ""; //$NON-NLS-1$
                int pos = solution.indexOf(ISolutionRepository.SEPARATOR);
                if (pos != -1) {
                  path = solution.substring(pos + 1);
                  solution = solution.substring(0, pos);
                }
                String url;
                if (!fileUrl.equals("")) { //$NON-NLS-1$
                  url = PentahoSystem.getApplicationContext().getBaseUrl() + fileUrl + "?solution=" + solution + "&amp;path=" + path + "&amp;action=" + name; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
                } else {
                  url = PentahoSystem.getApplicationContext().getBaseUrl()
                      + "content/" + handlerId + "?solution=" + solution + "&amp;path=" + path + "&amp;action=" + name; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
                }
                child.setAttribute("url", url); //$NON-NLS-1$
              }
            }
          }
        }
 
        // localization
        try {
          String localizedName = null;
          if (name.endsWith(".url")) {
            localizedName = repository.getLocalizedFileProperty(childSolutionFile, "url_name");
          } else if (fileInfo != null) {
            localizedName = fileInfo.getTitle();
          } else {
            localizedName = repository.getLocalizedFileProperty(childSolutionFile, "title");
          }
          child.setAttribute("localized-name", localizedName == null || "".equals(localizedName) ? name : localizedName);
        } catch (Exception e) {
          child.setAttribute("localized-name", name); //$NON-NLS-1$
        }
        try {
          // only folders, urls and xactions have descriptions
          if (name.endsWith(".url")) {
            String url_description = repository.getLocalizedFileProperty(childSolutionFile, "url_description");
            String description = repository.getLocalizedFileProperty(childSolutionFile, "description");
            if (url_description == null &amp;&amp; description == null) {
              child.setAttribute("description", name);
            } else {
              child.setAttribute("description", url_description == null || "".equals(url_description) ? description : url_description);
            }
          } else if (name.endsWith(".xaction")) {
            String description = repository.getLocalizedFileProperty(childSolutionFile, "description");
            child.setAttribute("description", description == null || "".equals(description) ? name : description);
          } else if (fileInfo != null) {
            child.setAttribute("description", fileInfo.getDescription()); //$NON-NLS-1$
          } else {
            child.setAttribute("description", name);
          }
        } catch (Exception e) {
          child.setAttribute("description", "xxxxxxx"); //$NON-NLS-1$
        }
 
        // add permissions for each file/folder
        child.setAttribute("name", name); //$NON-NLS-1$
        child.setAttribute("isDirectory", "" + childSolutionFile.isDirectory()); //$NON-NLS-1$
        child.setAttribute("lastModifiedDate", "" + childSolutionFile.getLastModified()); //$NON-NLS-1$
      }
    }
  }
 
  public org.w3c.dom.Document getSolutionRepositoryDoc(IPentahoSession session, String[] filters) throws ParserConfigurationException {
    ISolutionRepository repository = PentahoSystem.get(ISolutionRepository.class, session);
    ISolutionFile rootFile = repository.getRootFolder();
    org.w3c.dom.Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
    org.w3c.dom.Element root = document.createElement("repository");
    document.appendChild(root);
    root.setAttribute("path", rootFile.getFullPath());
    boolean isAdministrator = SecurityHelper.isPentahoAdministrator(session);
    processRepositoryFile(session, isAdministrator, repository, root, rootFile, filters);
    return document;
  }
 
  private void getAcl(final IParameterProvider parameterProvider, final OutputStream outputStream, final IPentahoSession userSession, final boolean wrapWithSOAP)
      throws SolutionRepositoryServiceException, IOException {
    String solution = parameterProvider.getStringParameter("solution", null); //$NON-NLS-1$
    String path = parameterProvider.getStringParameter("path", null); //$NON-NLS-1$
    String filename = parameterProvider.getStringParameter("filename", null); //$NON-NLS-1$
 
    if (StringUtil.doesPathContainParentPathSegment(solution) || StringUtil.doesPathContainParentPathSegment(path)) {
      String msg = Messages.getString("AdhocWebService.ERROR_0008_MISSING_OR_INVALID_REPORT_NAME"); //$NON-NLS-1$
      throw new SolutionRepositoryServiceException(msg);
    }
 
    ISolutionRepository repository = PentahoSystem.get(ISolutionRepository.class, userSession);
    String fullPath = ActionInfo.buildSolutionPath(solution, path, filename);
    ISolutionFile solutionFile = repository.getFileByPath(fullPath);
 
    String strXml = null;
    // ouch, i hate instanceof
    if (solutionFile instanceof IAclSolutionFile) {
      Map filePermissions = repository.getPermissions((solutionFile));
      String processingInstruction = XmlHelper.createXmlProcessingInstruction(SolutionRepositoryService.RESPONSE_DOCUMENT_VERSION_NUM,
          SolutionRepositoryService.RESPONSE_DOCUMENT_ENCODING);
      strXml = processingInstruction + getAclAsXml(filePermissions);
    } else {
      strXml = ""; //$NON-NLS-1$
    }
    WebServiceUtil.writeString(outputStream, strXml, false);
  }
 
  // TODO sbarkdull, this method belongs in an AclUtils class?
  // turn acl into an XML representation, and return the document.
  // probably belongs in the SecurityHelper class, but does this class still exist?
  String getAclAsXml(final Map filePermissions) {
    StringBuffer sb = new StringBuffer(XmlHelper.createXmlProcessingInstruction(SolutionRepositoryService.RESPONSE_DOCUMENT_VERSION_NUM,
        SolutionRepositoryService.RESPONSE_DOCUMENT_ENCODING));
 
    sb.append("");
    for (Map.Entry filePerm : filePermissions.entrySet()) {
      IPermissionRecipient permRecipient = filePerm.getKey();
      if (permRecipient instanceof SimpleRole) {
        sb.append("");
      } else {
        // entry belongs to a user
        sb.append("");
      }
    }
    sb.append("");
    return sb.toString();
  }
 
  Map createAclFromXml(final String strXml) throws ParserConfigurationException, SAXException, IOException {
    SAXParser parser = SolutionRepositoryService.getSAXParserFactory().newSAXParser();
    Map m = new HashMap();
 
    DefaultHandler h = new AclParserHandler(m);
    String encoding = XmlHelper.getEncoding(strXml);
    InputStream is = new ByteArrayInputStream(strXml.getBytes(encoding));
 
    parser.parse(is, h);
 
    return m;
  }
 
  private class AclParserHandler extends DefaultHandler {
 
    Map acl;
 
    public AclParserHandler(final Map acl) {
      this.acl = acl;
    }
 
    @Override
    public void startElement(final String uri, final String localName, final String qName, final Attributes attributes) throws SAXException {
      if (qName.equalsIgnoreCase("entry")) {
        String permissions = attributes.getValue("", "permissions");
        IPermissionRecipient permRecipient = null;
        String user = attributes.getValue("", "user");
        if (null != user) {
          permRecipient = new SimpleUser(user);
        } else {
          permRecipient = new SimpleRole(attributes.getValue("", "role"));
        }
        this.acl.put(permRecipient, new SimplePermissionMask(Integer.parseInt(permissions)));
      }
    }
  }
 
  private void setAcl(final IParameterProvider parameterProvider, final OutputStream outputStream, final IPentahoSession userSession, final boolean wrapWithSOAP)
      throws SolutionRepositoryServiceException, IOException, PentahoAccessControlException {
    String solution = parameterProvider.getStringParameter("solution", null); //$NON-NLS-1$
    String path = parameterProvider.getStringParameter("path", null); //$NON-NLS-1$
    String filename = parameterProvider.getStringParameter("filename", null); //$NON-NLS-1$
    String strAclXml = parameterProvider.getStringParameter("aclXml", null); //$NON-NLS-1$
 
    if (StringUtil.doesPathContainParentPathSegment(solution) || StringUtil.doesPathContainParentPathSegment(path)) {
      String msg = Messages.getString("AdhocWebService.ERROR_0008_MISSING_OR_INVALID_REPORT_NAME"); //$NON-NLS-1$
      throw new SolutionRepositoryServiceException(msg);
    }
 
    ISolutionRepository repository = PentahoSystem.get(ISolutionRepository.class, userSession);
    String fullPath = ActionInfo.buildSolutionPath(solution, path, filename);
    ISolutionFile solutionFile = repository.getFileByPath(fullPath);
 
    // ouch, i hate instanceof
    if (solutionFile instanceof IAclSolutionFile) {
      Map acl;
      try {
        acl = createAclFromXml(strAclXml);
 
        // TODO sbarkdull, fix these really really lame exception msgs
      } catch (ParserConfigurationException e) {
        throw new SolutionRepositoryServiceException("ParserConfigurationException", e);
      } catch (SAXException e) {
        throw new SolutionRepositoryServiceException("SAXException", e);
      } catch (IOException e) {
        throw new SolutionRepositoryServiceException("IOException", e);
      }
      repository.setPermissions(solutionFile, acl);
    }
    // TODO sbarkdull, what if its not instanceof
 
    String msg = WebServiceUtil.getStatusXml(Messages.getString("AdhocWebService.ACL_UPDATE_SUCCESSFUL")); //$NON-NLS-1$
    WebServiceUtil.writeString(outputStream, msg, false);
  }
 
  /**
   * Get a SAX Parser Factory
   *
   * NOTE: Need sax parser factory per thread for thread safety. See: http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/parsers/SAXParserFactory.html
   *
   * @return
   */
  public static SAXParserFactory getSAXParserFactory() {
    SAXParserFactory threadLocalSAXParserFactory = SolutionRepositoryService.SAX_FACTORY.get();
    if (null == threadLocalSAXParserFactory) {
      threadLocalSAXParserFactory = SAXParserFactory.newInstance();
      SolutionRepositoryService.SAX_FACTORY.set(threadLocalSAXParserFactory);
    }
    return threadLocalSAXParserFactory;
  }
}

0

Save MySQL

January 18, 2010

Bueno desde aqui , quiero apollar la iniciativa para ayudar a MySQL.No es mucho pero intentaremos apoyar a esta gran base de datos.

En abril de 2009, Oracle anunció que había acordado la compra de Sun. Como Sun había comprado MySQL el año anterior, esto significaría que Oracle, empresa líder en el mercado para bases de datos de código cerrado, también sería el propietario de MySQL, la base de datos de código abierto más popular.

Si Oracle comprara MySQL basado en lo anterior, tendría un control sobre MySQL equivalente a cualquier cantidad de dinero que podría comprar un proyecto de código abierto. De hecho, para la mayoría de proyectos de código abierto (como Linux o Apache), no hay ninguna forma comparable en la que un competidor pudiera comprar incluso un décimo de esa influencia. Pero el éxito de MySQL siempre ha dependido de la compañía que está detrás y que se encarga de desarrollar, vender y promoverlo. Esa compañía (inicialmente MySQL AB, después Sun) siempre ha sido la propietaria de los importantes derechos de propiedad intelectual (IPR, por sus siglas en inglés), especialmente la marca registrada, los derechos de autor y, hasta el momento sólo con propósitos defensivos, las patentes. Ha utilizado los derechos de propiedad intelectual para generar ingresos y ha reinvertido gran parte de esos ingresos en desarrollo, no sólo creciendo sino también mejorando con el tiempo.

Si esos derechos de propiedad intelectual caen en manos de la competencia principal de MySQL, entonces MySQL inmediatamente deja de ser una alternativa frente a los propios productos costosos de Oracle. Hasta el momento, los clientes podían escoger entre utilizar MySQL en los nuevos proyectos en vez de los productos de Oracle. Algunas grandes compañías incluso migraron de Oracle a MySQL para las soluciones de software existentes. Y cualquiera podía con certeza amenazar a los vendedores de Oracle con utilizar MySQL a menos que se otorgara un descuento importante. Si Oracle es la propietaria de MySQL, se reirá cuando los clientes intenten hacer esto. Deshacerse de este problema le vale a Oracle, al menos, mil millones de dólares al año, si no más.

0

Di no al BI

January 18, 2010
Tags:

Siempre hay que tener una buena , sonrisa  . Asi que ahi va.

Dedicado a @pepeblog y a @skiterskiterio skitero y a super @dagi3d :D

0

Analisis Predictivos

January 16, 2010

Que es el analisis predictivo , es la otra manera de decir Mineria de Datos , muchos dicen que es que es proximo paso para el analisis de datos. Pero hay muchos problemas por que dentro de la mineria de datos,es que nadie sabe que es y para que sirve y por eso no lo piden o cuando lo piden lo que  piden es un imposible.

Muchas de las herramientas open source lo que pretenden  es crear un modelo y luego en el flujo de infromacion pasar los datos por ese modelo y genrar otro modelo paralelo.

Kettle o PDI lo no biene de serie con el plugin de  mineria de datos que en el caso de son:

  1. Sacar ficheros en formato arff
  2. WekaScoring : Con este plugin sacamos un modelo con weka y luego lo que hacemos , es pasar el flujo de informacion por ese modelo.

Dentro de poco hare un video de como actualizar  el kettle para poder  poner kettle en este caso el mas importante es el numero 2.

Lo principal dentro del analisis predictivo son los siguientes

Análisis de Cesta de Mercado
Descubra qué objetos tienden a ser comprados juntos para crear recomendaciones en la marcha y para determinar cómo el posicionamiento del producto puede contribuir directamente a su línea inferior.
Análisis Churn
Anticipe a los clientes que puedan estar considerando cancelar su servicio e identificar los beneficios que podrían retenerlos.
Análisis de mercado
Defina los segmentos de mercado agrupando clientes similares automáticamente. Utilice este análisis para buscar clientes rentables.
Proyecciones (Forecasting)
Pronostique ventas y montos de inventario y aprenda cómo están relacionados entre sí. para prever cuellos de botella y mejorar el rendimiento.
Exploración de Información
Analice la rentabilidad a través de los clientes o compare clientes que prefieren diferentes marcas del mismo producto, para descubrir nuevas oportunidades.

Análisis de Cesta de Mercado

Descubra qué objetos tienden a ser comprados juntos para crear recomendaciones en la marcha y para determinar cómo el posicionamiento del producto puede contribuir directamente a su línea inferior.

Análisis Churn

Anticipe a los clientes que puedan estar considerando cancelar su servicio e identificar los beneficios que podrían retenerlos.

Análisis de mercado

Defina los segmentos de mercado agrupando clientes similares automáticamente. Utilice este análisis para buscar clientes rentables.

Proyecciones (Forecasting)

Pronostique ventas y montos de inventario y aprenda cómo están relacionados entre sí. para prever cuellos de botella y mejorar el rendimiento.

Exploración de Información

Analice la rentabilidad a través de los clientes o compare clientes que prefieren diferentes marcas del mismo producto, para descubrir nuevas oportunidades.Pero, ¿qué pasa cuando el número de variables por analizar es por docenas o incluso cientos? Se vuelve más difícil el encontrar una buena hipótesis, analizar la base de datos con OLAP, verificarla o desaprobarla.

La minería de datos es diferente de OLAP porque en lugar de verificar patrones hipotéticos, usa los mismos datos para descubrir tales patrones. Es en esencia un proceso inductivo.Minería de datos exitosa.

Hay dos llaves para tener éxito con la minería de datos. La primera es llegar a un modelo preciso del problema que se está tratando de resolver. Posteriormente analizaremos conceptos como Clustering y Análisis de Relaciones. La segunda es interpretar y usar los datos. Conoceremos varios algoritmos como las Redes Neuronales, Árboles De Decisión, Inducción De Reglas, K-Vecino Cercano, Regresión Logística, Análisis de Discriminantes y Algoritmos Genético.

aqui dejo un video de Mineria de Datos

URL

Related Posts with Thumbnails
0