Pages

Google Ads

Tuesday, March 11, 2014

Como gerar uma senha usando o encr.sh do PDI

Pessoal,

Para gerar uma senha usando o encr.sh do PDI você precisa rodar o caminho abaixo:

./encr.sh -kettle sua_senha

Resultado:

MacBook-Air-de-Caio:data-integration caiomsouza$ ./encr.sh -kettle sua_senha
/Applications/Pentaho/pdi-ce-5.0.1-stable/data-integration
Encrypted 2be98afc86aa7f297be189163db9ca7db

PDI 5.0.1 Error: Oracle / PostgreSQL / MySQL date / timestamp problem using "Dimension lookup/update"

Solution:

 DB Connection properties->Advanced->Uncheck "Supports the timestamp datatype" option.




Log error:
Timestamp : There was a data type error: the data type of java.util.Date
 
 Problem:

 This is a reproducible issue tested in the following conditions:

 OS: Mac OS X Mavericks
 MySQL: 5.5.29
 PDI: 5.0.1

 The Dimension Lookup/Update Step fails when trying to update a row. It will work fine on initial load and if there are no changes found in the target dimension table. As soon as there is any update, an error is thrown with the following text:

 Caused by: java.lang.RuntimeException: date_from Timestamp : There was a data type error: the data type of java.util.Date object [Mon Jan 01 00:00:00 EST 1900] does not correspond to value meta [Timestamp]

 Sample transformation attached

 Solution:

 Found the fix for this problem (thanks mainly to kgdeck on the forums):

 I had to go under the DB Connection properties->Advanced->Uncheck "Supports the timestamp datatype" option. All fixed.

 That being said, I'm leaving this issue open to essentially ask the question of why that was enabled by default. I don't know much about other MySQL versions or if this is a global option for all DB connection types but in my case it should have been switched off by default. At the very least, I think it might be worth noting in the Dimension Lookup/Update step docs so that others understand why they get this error. Just my two cents..

Links:

 http://forums.pentaho.com/showthread.php?156107-Oracle-date-timestamp-problem-using-quot-Dimension-lookup-update-quot

 Dimension Lookup/Update Step Fails with MySQL
 http://jira.pentaho.com/browse/PDI-11353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Saturday, February 22, 2014

Sort emails by filesize gmail

You can now actually run a search for attachments based on size!  Approved operators:
  • size:5m - Find emails with attachments of 5M
  • larger:5m - Find e-mails with attachments larger than 5M
Suggested query: larger:5m older_than:2y
^ Will find all e-mails larger than 5MB and older than 2 years.

Creating S.M.A.R.T. Goals


Specific
Measurable
Attainable
Realistic
Timely

Specific: A specific goal has a much greater chance of being accomplished than a general goal. To set a specific goal you must answer the six “W” questions:
*Who:      Who is involved?
*What:     What do I want to accomplish?
*Where:    Identify a location.
*When:     Establish a time frame.
*Which:    Identify requirements and constraints.
*Why:      Specific reasons, purpose or benefits of accomplishing the goal.
EXAMPLE:  A general goal would be, “Get in shape.” But a specific goal would say, “Join a health club and workout 3 days a week.”

Measurable - Establish concrete criteria for measuring progress toward the attainment of each goal you set.
When you measure your progress, you stay on track, reach your target dates, and experience the exhilaration of achievement that spurs you on to continued effort required to reach your goal.
To determine if your goal is measurable, ask questions such as……
How much? How many?
How will I know when it is accomplished?


Attainable – When you identify goals that are most important to you, you begin to figure out ways you can make them come true. You develop the attitudes, abilities, skills, and financial capacity to reach them. You begin seeing previously overlooked opportunities to bring yourself closer to the achievement of your goals.
You can attain most any goal you set when you plan your steps wisely and establish a time frame that allows you to carry out those steps. Goals that may have seemed far away and out of reach eventually move closer and become attainable, not because your goals shrink, but because you grow and expand to match them. When you list your goals you build your self-image. You see yourself as worthy of these goals, and develop the traits and personality that allow you to possess them.

Realistic- To be realistic, a goal must represent an objective toward which you are both willing and able to work. A goal can be both high and realistic; you are the only one who can decide just how high your goal should be. But be sure that every goal represents substantial progress.
A high goal is frequently easier to reach than a low one because a low goal exerts low motivational force. Some of the hardest jobs you ever accomplished actually seem easy simply because they were a labor of love.

Timely – A goal should be grounded within a time frame. With no time frame tied to it there’s no sense of urgency. If you want to lose 10 lbs, when do you want to lose it by? “Someday” won’t work. But if you anchor it within a timeframe, “by May 1st”, then you’ve set your unconscious mind into motion to begin working on the goal.
Your goal is probably realistic if you truly believe that it can be accomplished. Additional ways to know if your goal is realistic is to determine if you have accomplished anything similar in the past or ask yourself what conditions would have to exist to accomplish this goal.
T can also stand for Tangible – A goal is tangible when you can experience it with one of the senses, that is, taste, touch, smell, sight or hearing.
When your goal is tangible you have a better chance of making it specific and measurable and thus attainable.

Please also see Goal Setting -Powerful Written Goals In 7 Easy Steps!

http://topachievement.com/smart.html

As diferenças de uma bicicleta dobrável

showmystreet.com - Just amazing!!!

Hi folks,

You need to visit this amazing website.

http://showmystreet.com/

You will love it.

Amazing!!!

P.S. Thanks Dad, for showing me this website.

Thursday, February 20, 2014

Monitorando memória usada em servidor Linux e outras coisas

Pessoal,

Seu servidor Linux está lento?

Execute:

ps aux | sort -k 4 -r | head -n 2

Exemplo real:

[ec2-user@it4biz /]$ ps aux | sort -k 4 -r | head -n 2
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root     18562  4.0 68.7 2642072 1166888 ?     Sl   12:35  23:22 /usr/lib/java ...

Outros comandos interessantes:

free -m
free -t -m
vmstat
vmstat 5
ps aux







Tuesday, January 14, 2014

SPTrans - API Olho Vivo

A API do Olho Vivo provê informações em tempo real do monitoramento da
frota da cidade de São Paulo.

http://www.sptrans.com.br/desenvolvedores/

A API de desenvolvimento do Olho Vivo utiliza o protocolo HTTP e seus métodos para trazer as informações necessárias para o desenvolvimento do seu aplicativo.

O formato de retorno dos dados respeita a estrutura RESTFUL e é entregue no formato JSON.

Linhas
A categoria Linhas possibilita a consulta pelas linhas de ônibus da cidade de São Paulo, bem como suas informações cadastrais como por exemplo: horário de operação da linha, dias de operação (dia útil, sábado ou domingo) e extensão da linha (em metros).

Paradas
A categoria Paradas possibilita a consulta pelos pontos de parada da cidade de São Paulo. Atualmente esta categoria contempla apenas as paradas de corredores.

Corredores
A categoria Corredores possibilita uma consulta que retorna todos os corredores inteligentes da cidade de São Paulo.

Posição Dos Veículos
A categoria Posição Dos Veículos é a responsável por retornar a posição exata de cada veículo de qualquer linha de ônibus da SPTrans

Previsão De Chegada
A categoria Previsão de chegada é a responsável por retornar a previsão de chegada de cada veículo de uma determinada linha e de um determinado ponto de parada, além da localização exata de cada veículo que constar na cadeia de previsões.


Fonte:
http://www.sptrans.com.br/desenvolvedores/APIOlhoVivo/Documentacao.aspx?1