Tuesday 13 December 2016

Ten common mistakes that can fetch you a tax notice

They may not figure in the Panama Papers, nor have wads of cash stuffed under their beds and investments in benami properties. But there are other reasons why small taxpayers can get into trouble with the tax authorities. "My mother is a senior citizen and has paid all her taxes. But she still got a notice for not filing her return for 2014-15," says Mumbai-based marketing manager Arun Kapoor. Delhi-based finance professional Varun Sahay has received a notice for not deducting TDS when he bought .. 

Once rare, such cases are now quite common. In recent months, the tax department has stepped up efforts to ensure tax compliance. New rules have been introduced to plug tax leaks and officials are cracking down on evasion. Tax records are being put under the scanner and notices are being sent to individuals if the computer-aided selection system notices a discrepancy. Thousands of taxpayers have already received tax notices. 

This week's cover story looks at 10 common mistakes that can fetch you a notice from the tax department. Some of these mistakes are merely calculation errors that will result in a tax demand. But some others are serious transgressions that can invite penalties of up to 300% of the unpaid tax. We tell you where taxpayers are going wrong and the correct position on the matter. We also offer smart tips to help you avoid falling foul of the tax rules. We hope you will find this information useful. I .. 


1. Not reporting interest income 
This is a common mistake. Interest income from fixed deposits, recurring deposits and even tax saving bank deposits and infrastructure bonds is fully taxable. Yet, 59% of the respondents to an online survey conducted by ET Wealth believed that interest income of up to Rs 10,000 a year is tax free. Actually, the tax exemption of Rs 10,000 a year under Sec 80TTA applies only to the interest earned on the balance in a savings bank accounts.

Another 6% of the respondents believed that no tax is payable if their bank has deducted TDS. These taxpayers don't realise that TDS is only 10% of the income. If they fall in a higher tax slab, their liability would be higher. In our survey, almost 50% of the respondents who got this wrong have an annual income of over Rs 10 lakh. They pay 10% TDS even though they are supposed to shell out 30%. 

Interest income often goes unreported in tax returns. In recent years, new rules have been introduced to plug this leak. Till two years ago, TDS kicked in when the interest from deposits made in one bank branch exceeded Rs 10,000 in a financial year. Investors used to split their deposits across bank branches to avoid TDS. Now TDS applies if the combined income from deposits in all branches of a bank exceeds the threshold. What's more, TDS also applies to recurring deposits now. 

In future, as banks start sharing data, TDS could be applied to deposits made across other banks as well. "The mechanism to track deposits across other banks already exists. If banks share the names and PANs of fixed deposit investors, lakhs of individuals could come in the tax net," says M.K. Agrawal, Senior Partner, Mahesh K Agarwal & Co. 

2. Ignoring income of old job 
Every time an individual switches jobs, he is in danger of falling foul of the tax laws. This is because the new employer doesn't take into account the income earned from the previous job and offers tax exemption and deduction to the employee all over again. Instead of Rs 2.5 lakh basic exemption and Rs 1.5 lakh deduction for tax saving investments under Section 80C, he gets Rs 5 lakh basic exemption and Rs 3 lakh deduction. Obviously, he will be paying much less tax than he ought to. 

But this discrepancy won't remain hidden for long and would eventually be discovered when the taxpayer files his return. The incomes in the two Form 16s would be added but he would get basic exemption and deduction only once. This also means a large tax payment at the time of filing returns because the duplicate benefits would be rolled back. The last date for paying the tax is 15 March. After this, if the unpaid tax exceeds Rs 10,000, there is a penal interest of 1% per month of delay. "The employee will have to pay the balance tax along with interest at the rate of 1% per month for delay," says Vaibhav Sankla, Director, H&R Block. 

This is a common problem faced by people who switch jobs without keeping an eye on their taxes. They are saddled with a huge tax liability when they sit down to file their tax returns in June-July. 

Don't think you can get away by not mentioning the income from the previous employer in your return. If some tax has been deducted on the income from the first employer, it will be reflected in your Form 26AS. So if you don't report that income, the discrepancy will immediately up by the computerised scrutiny system and you will get a tax notice. 

Smart tip: Inform your new employer about income from previous job so that the TDS is cut accordingly. 

3. Not filing tax returns 
A lot of taxpayers, especially senior citizens such as Kapoor's mother, have received notices for not filing their tax returns. Anybody with an income above the basic exemption is liable to file his tax return. The basic exemption is Rs 2.5 lakh per year for people below 60, Rs 3 lakh for senior citizens above 60 and Rs 5 lakh for very senior citizens above 80. The rest of us, including NRIs, have to comply. 

Keep in mind that this is the gross income before any deductions and tax breaks. If your annual income is Rs 4.2 lakh and you invest Rs 1.5 lakh under Sec 80C, your tax will come down to zero. But you are still liable to file your tax return. Similarly, even if all your taxes are paid, you still need to file the return. 

For a lot of people, confusion stems from a rule introduced four years ago, where salaried individuals with an income of up to Rs 5 lakh a year were exempted from filing returns. However, that rule has long been withdrawn. "Although the regulation was applicable only to that particular financial year, many people tend to still follow it," says Archit Gupta, Founder and CEO of Cleartax.in. 

Not filing returns is not a very serious offence if all your taxes are paid. You will only get a notice asking you to do the needful. The tax laws allow a taxpayer to file delayed returns even after the due date has passed. But if you have unpaid taxes, be ready to pay interest as well as a penalty of up to Rs 5,000. 

Smart tip: Don't miss filing your return even if your tax is zero or all your taxes are paid. File online to avoid mistakes. 
4. Tax sops on house sold before 5 years 
The government offers generous tax benefits to those who buy houses on loans. But if the buyer turns into a seller too early, some of these benefits are rolled back. If you sell the house within five years, the tax benefits availed of under Sec 80C for the principal repayment will get reversed. 

This could mean a heavy tax liability if you have claimed deduction for the principal repayment of the home loan under Sec 80C. You won't be able to keep this under wraps because the buyer may seek tax benefits on the same property. However, the deduction for the interest on the home loan under Sec 24 will not be rolled back. 

Similarly, if you have ended a life insurance policy within three years of purchase, any tax deduction availed on the policy will be reversed. Not many taxpayers are aware of this rule about insurance policies. "No taxpayer is so honest as to report this in his ITR and pay additional tax for the previous years," says a chartered accountant. 

Smart tip: Wait for at least five years before selling a house or three years before ending a life insurance policy. 

5. Misusing forms 15G, 15H to avoid TDS 
As mentioned earlier, many investors try to avoid TDS by splitting their investments across different banks. Many others submit Form 15G or 15H so that their bank does not deduct TDS. These forms are declarations that the individual's income for the year is below the taxable limit and therefore no TDS should be deducted from the interest. 

However, misuse of these forms is a serious offence. "A false declaration not only attracts penalty but also prosecution. The taxpayer can be sentenced to jail for terms ranging from three months to two years," says Sudhir Kaushik, Co-founder and CFO, Taxspanner.com. This doesn't stop people from blindly filling the forms to escape TDS. 

You need to meet two basic conditions to file form 15G. One, your taxable income for the year should not exceed the basic exemption of Rs 2.5 lakh. Two, the total interest received during the financial year should not exceed the basic exemption slab of Rs 2.5 lakh. "The total interest income includes interest from other sources as well, including PPF, NSCs and not just interest income from deposits," says Sankla of H&R Block. Form 15H, which is for senior taxpayers above 60, imposes only the first condition. The final tax on the total annual income should be nil. So, senior citizens whose taxable income is below the Rs 3 lakh limit are eligible to file Form 15H. For very senior citizens above 80, this limit is Rs 5 lakh. 

Though this is a standard practice, and investors take it lightly, don't assume that the Form 15G and 15H will not get noticed by the taxman. "If TDS is not deducted because the person has filed Form 15G or 15H, it is separately shown in part A1 of the Form 26AS," cautions Gupta of Cleartax.in. 

Smart tip: File Forms 15G only if you fulfill both the conditions. TDS is an interim tax and you can claim a refund if you have paid more than due. 

6. Not deducting TDS when buying property 
Given that real estate investments involve a lot of unaccounted money, the government has extended the scope of TDS to property transactions as well. If you buy a house worth more than Rs 50 lakh, you have to deduct 1% TDS from the payment to the seller. In case the seller is an NRI, the TDS will be higher at 30%. This amount should be deposited with the government on behalf of the seller using Form 26QB. Delhibased Sahay had no idea of this rule when he bought a property in Noida last year. He now has to respond to a tax notice, and could even be slapped with a penalty of up to Rs 1 lakh. 

The rule is applicable even if you pay in instalments. In such cases, the TDS needs to be deducted from each payment and the money deposited with the government within seven days. 

While TDS deduction happens automatically when you buy a new property from a builder, in case of transactions between individuals, it is often ignored. Like Sahay, most buyers are unaware of the rule. Even if they are aware, they are not sure how to calculate the tax. "The TDS has to be calculated on the total sale price and not just the amount exceeding Rs 50 lakh. Many make this calculation error," says Gupta. The total sale price is the amount payable and as registered in the sale agreement. It does not include stamp duty and brokerage. 

Also, only the sale price has to be taken into consideration, not the circle rate of the property. If a property is valued at Rs 60 lakh based on the circle rate, but gets sold for less than Rs 50 lakh, the buyer need not deduct TDS. 
Smart tip: Make it clear to the seller that you will be deducting 1% TDS from the payment. Make sure you have his correct PAN details. 

7. Not reporting foreign assets 
We usually don't want to be alarmist but this is one area where taxpayers need to tread with caution. They can no longer afford to be unsure about their foreign income and assets. "There is a lot of exchange of information between countries and we will see an exponential rise in the number of notices being sent to taxpayers on this account," says Tapati Ghose, Partner, Deloitte Haskins & Sells LLP. 

Mis-reporting overseas assets will not be taken lightly by the government. You could be prosecuted under the Black Money Act and the penalty can be as high as Rs 10 lakh for even small errors. Experts say taxpayers who have worked abroad often go wrong when reporting their foreign assets. "The employee stock options is often acquired at no cost or be  be sold out during the year and therefore get missed when you take an account of your assets. Capital assets like jewellery often skips the mind as they do not generate any income. In fact, they may have been bought only as ornaments," says Ghose. 

Not just salary and perks, freelancers who receive money from foreign clients need to report this income under the foreign assets schedule. "This should also include gifts, which are deemed to be income," says Ghose. Also, all foreign bank accounts—whether operational or not and even with a tiny balance—need to be reported. You even have to report bank accounts where you are merely a signing authority. 

Smart tip: Start collecting details of your foreign assets much .. 
8. Disregarding clubbing provisions 
It's quite common for taxpayers to invest in the name of non-working spouses or minor children. But though gifts made to a spouse or a minor child do not attract tax, if that money is invested the income it generates is clubbed with the income of the giver and taxed accordingly. So, if you bought a house in your wife's name, any income from that house, whether as capital gains when you sell it or as rent, will be treated as your income. .. 
Similarly, if a husband has invested in fixed deposits in the name of his wife, the interest will be taxed as his income. "It doesn't matter whether your spouse's income is below the basic exemption. the income from the investment will get clubbed to your income," says ghose of deloitte. 

The rules are slightly different in case of investments in the name of minor children (below 18 years). The earnings are treated as the income of the parent who earns more. However, the taxman has softened the tax blow by extending an exemption of Rs 1,500 a year per child up to a maximum of two children. 

Parents who want to invest in the name of their children can go for tax-free options such as the Sukanya Samriddhi Yojana, PPF or tax-free bonds. Though the income will get clubbed, there will be no tax implication. Mutual funds also help bypass the clubbing provision because the tax liability is deferred indefinitely. If the child withdraws after 18, that income is his, not the parent's. 

Smart tip: Invest in tax-free options in spouse's name. Invest the income in FDs or RDs. Income is clubbed but the income from income is not. 

9. Not reporting tax-free income 
This may not be a serious offence but a taxpayer is required to mention tax-free income in his return. Tax-free income includes interest earned on PPF, tax-free bonds, life insurance policies, capital gains from stocks and equity-oriented funds and gifts from specified relatives. "Even if you are not liable to pay any tax on these all your interest income, including savings bank interest, has to be reported in the ITR," says Gupta of Cleartax.in. The taxpayer can then claim exemption for the same. While you may not receive a notice for not mentioning tax-free income, it will certainly create an inconsistency in your return. 

Similarly, dividend income has to be reported in the ITR even though it is tax-free. This year's Budget has proposed a tax on dividend income if it exceeds Rs 10 lakh. The new rule will impact HNIs who use dividend stripping strategies to earn tax-free income. 

Smart tip: Mention all tax-free income in your ITR but claim exemption for it under various sections. 

10. Spending, investing beyond means 
We all know that reckless spending is not good for our financial health. But few people realise that spending too much can also lead to a tax notice. If your expenses or cash withdrawals exceed certain limits, your credit card company and your bank are supposed to report that to the tax department. 

If these expenses are much beyond your reported income, the income tax department may send you a notice or pick up your case for scrutiny. "If cash transactions, including ATM withdrawals, exceed Rs 50 lakh in a year, a bank is supposed to report it," says Minal Agarwal, Chartered Accountant and Partner, Mahesh K Agarwal & Company. 

Similarly, if investments by an individual cross certain thresholds, mutual funds, banks and brokerages are supposed to inform the tax department. If you invest more than Rs 1 lakh in stocks, your broker will squeal on you. Invest over Rs 2 lakh in a mutual fund and your name gets into a list of high-value investors. 

Buy bonds worth over Rs 5 lakh and you get noticed. Even the purchase of gold, which was till now a safe haven for unaccounted money, will require your PAN card details. If these purchases and investments don't match your reported income, be ready for a tax notice. "The government is gradually getting to know all aspects of the individual's financial life," says Agarwal. 

Smart tip: Avoid cash transactions as far as possible. If depositing cash in bank account, keep record of source of cash. 

Wednesday 9 November 2016

Talend - Out of Memory Error and Java Heap Space Error

The Out of Memory Error and Java Heap Space Error are two of the usual errors which occur in the Talend jobs handling a large volume of data. These errors can be avoided to an extent by following some design guidelines.

(1) Keep in mind that tMap is a heavy component. Minimize its use in your jobs.

  • Avoid tMap if you need just simple transformations like trimming the string values, replacing null numbers by zeroes, etc. In its place you can use tJavaRow component.
  • If you want to get only a small set of columns from a huge collection avoid using a tMap. For that you can use a lighter component- tFilterColumns
  • Similarly, to filter rows you can use tFilterRow instead of a tMap
(2) Use store on disk option whenever necessary.
          This option is available in tMap, tUniqRow, tSortRow, etc.
  • tMap
While using store on disk option in tMap the directory to store temporary data will be created automatically. This data will not be deleted or replaced on subsequent run(s) of the job. So it is advised to delete the temporary directory created using tFileDelete component from within the job. You can give that in On Subjob Ok of tPostJob component.

  • tUniqRow
In the case of tUniqRow the temporary directory should be created manually before the job run/or can be handled within the job. If the temporary directory is not available, the component tUniqRow will give out FileNotFoundException!

  • tSortRow
In the case of tSortRow the temporary directory will be created automatically


(3) The JVM arguments can be modified as and when needed
.
-Xms256M - initial memory size available to JVM is 256 MB
-Xmx1024M - maximum memory size available to JVM is 1024 MB


TALEND Installation Instructions

A)Pre-requisites before Talend Installation :

1)      Talend User needs to be created, in order to access the PROJECTS in REMOTE Repository.
For Local Repository, you can igore this.

2)       Need to have Java  JDK  V1.6 or higher

Oracle JDK Setup Details :

1)      Install Oracle JDK 1.6 or Higher. You will need the JDK, not the JRE to develop jobs using the Talend 6 studio. You can download and install this here:

Talend Installer automatically Checks for JDK version 1.6 or higher version. If no instance of JDK is found, the installer will shutdown.

2)Set up your JAVA_HOME environment Path Variable.

Define your JAVA_HOME evironment variable so that it points to the JDK directory.
For example, if the JDK path is C:\java\JDKx.x.x\bin, then you must set the JAVA_HOME environment variable to point to C:\Java\JDKx.x.x.

It is highly recommended that the full path to the server installation directory is as short as possible and does not contain any space character. If you already have a suitable JDK installed in a path with a space, you simply need to put quotes around the path when setting the values for the environment variable.

If you use Talend Installer, you also have to set the Path system variable.

3)Add the previously defined JAVA_HOME variable to the Path environment variable.

For Example  <PathVariable>%JAVA_HOME%\bin.


Note : You can add the Path variable and  create the JAVA_HOME environment variable in System Variables Section.



Thursday 8 September 2016

STRING RELATED FUNCTIONS IN TALEND

CONTAINS & EQUALS :

row1.contains("ram")
row2.equals("Name")

LASTINDEXOF :
("tFileList_1_CURRENT_FILE")).lastIndexOf("."))

SUBSTRING:
Input  :  "ABCD".substring(0,2)
Result :   ABC

GETTING CURRENT FILEPATH  IN tFILELIST :
((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))

GETTING CURRENT FILENAME FROM  tFILELIST :
((String)globalMap.get("tFileList_1_CURRENT_FILE")).substring(0,((String)globalMap.get
("tFileList_1_CURRENT_FILE")).lastIndexOf("."))

replace() Example :
-------------------------

we can use this for replacing special characters in a string
String input_row="abcd:[],kdkkxyzkll:[],";


 

String abc="{\"NOTIFICATION_RESPONSE\":{"+input_row.replace(":[],",":\"\"")+"}}";
System.out.println(abc);
Output :  
-----------
{"NOTIFICATION_RESPONSE":{abcd:""kdkkxyzkll:""}}
Note :  Go for replace() if  replaceAll() is not working.
replaceAll() will not work for dollar ($),doublequotes("),comma(,) etc special characters, in such
cases you can go for replace().

Friday 19 August 2016

TALEND/TAC ERROR : TAC, TALEND JOB CONDUCTOR shows the TALEND job in SENDING state when the job is executed...

When a talend job is deployed in TAC  it stores the job in multiple places as below

1)C:\TAC Installed Folder\repository
2)C:\TAC Installed Folder\generated_jobs\task_NUMBER
3)C:\TAC Installed Folder\TalendJobServersFiles\archiveJobs

We got to delete the task_NUMBER(NUMBER will be generated by TAC once you deploy the job) folder in the path C:\TAC Installed Foldergenerated_jobs\

Once you delete the task, the hanging mode or SENDING state or  DEPLOYING state will be released automatically.


Tuesday 16 August 2016

7 Tricks To Learn Any Language In 7 Days (From The Superpolyglot Twins Who Did It)

What’s possible in a week? If you dedicated seven days to the achievement of one goal, how ambitious could you make this goal? These were the questions that the multilingual twins Matthew and Michael Youlden posed themselves when they determined to learn Turkish in one week. They would attempt to liberate themselves from the distractions and responsibilities of modern-day life in order to cram eight hours of study time into their daily routine. Here are the seven things that I learned by observing some of the world’s most capable language learners.

1. Get To Know Why

Lesson learned: Clearly define your goal at the very beginning and then plot a route towards this goal’s achievement.
The twins set themselves the challenge of learning a language in a week in order to stretch themselves, and then it was a question of choosing which language to learn. Turkish presented itself as a natural option; there are nigh on 300,000 Turkish speakers in Germany’s capital, and the areas of Kreuzberg and Neukölln are dotted with stores adorned with signs in Turkish. Truly understanding one’s environment in these neighbourhoods requires one to first understand Turkish.

2. Get Sticky

Lesson learned: Map and label your immediate environment in the new language from the very first moment. You’ll build and reinforce associations passively while going about your daily life.
The first operational step in the twins’ learning process was to decorate the entire apartment with sticky notes. This had an almost ceremonial touch to it as the twins delved into dictionaries and proceeded to label everything with its corresponding Turkish name. Within the space of about an hour it was impossible to carry out any menial task, be it making a coffee or flicking off a light switch, without first being presented with at least three different words related to this action.

3. Get A Partner

Lesson learned: There are few better motivations than a peer with the same goal. Whether you’re motivated by competition or a sense of mutual responsibility, the mere presence of a learning partner is likely to exert just the right amount of pressure to keep you on track.
The importance of the other twin’s presence became immediately apparent as Matthew and Michael delegated responsibilities for rooms to decorate with sticky notes. This simple task was augmented by continuous little tests that they would spring on one another, and the fact that they split up their day slightly differently and studied different topics meant that each twin became a source of knowledge for the other; the question how do you say that again? was met surprisingly often with an answer. The most extraordinary moment came towards the end of the week when the twins simply switched their everyday conversations to Turkish, asking one another if they wanted tea or coffee, were ready to cook dinner or when they were going to leave the house the next day.

4. Prepare Mini-Motivations

Lesson learned: You need landmarks on your route towards your goal. These landmarks can consist of small challenges - real life interactions in the language, for example - which force you to prepare areas of vocabulary to overcome them. The gratification that will come with their completion will serve to spur you on to ever greater heights.
Matthew and Michael had numerous micro-challenges throughout the week. On the first day they were visited by a Turkish friend who greeted them in Turkish and complimented them on how quickly they’d picked up their first words and phrases. They then learned the names of fruits and the numbers from one to a billion so that they could visit the Turkish market in Kreuzberg (although they refrained from purchasing nine hundred thousand kumquats). Displaying their haul after their first functional exchange in Turkish, they beamed with pride and a palpable sense of accomplishment before marching back home to study further.

5. Eat The Language

Lesson learned: Find a way to tie everything you do to learning. Surround yourself with the food, the music and the films, so that even in your downtime you can prime your mind towards the language and perhaps trigger further areas of interest and motivation.
On our second visit to the brothers’ apartment 24 hours into the week, we found them sampling dozens of different kinds of Turkish snacks. Like kids staring at the backs of cereal packs before heading to school, the nutritional information and various special offers and competitions on the packaging were analysed during snack breaks. There was no moment of complete removal from the language learning process during the eight hours that the twins had allotted to it. The intensity ebbed and flowed, but it never dissipated entirely.

6. Use What You Already Know

Lesson learned: The greater the depth of processing, the more likely the information will be remembered. Find pleasure in drawing parallels and making comparisons between the language(s) you already know and your new language.
One of the twins’ most common phrases was, “ah, that’s a bit like in … ?” They were constantly using their existing knowledge to support the ever-growing knowledge of Turkish. Not only did this spark some energetic exchanges regarding the etymology of various words, but it also ensured new words would never be forgotten once woven into their web of associations. Even if you are learning your second language, you will likely come across words that share common origins with words in your native tongue.

7. Variation is the spice of life

Lesson learned: So you have your route plotted and an idea of your favored methods, but do remember to try new things; your new language has just as many sources as your native language.
The twins spent a lot of time engrossed in books or on their computers and apps, flicking and swiping their way through exercises eagerly, but at other times they were to be found searching busily for Turkish radio stations and write-ups of Turkish football games on the web. There is no definitive method to learn a language, nor any tool or teacher that will single-handedly deliver you to the holy grail of fluency. Language is written, spoken, read and heard. Each of these areas is considered a core skill within which there are myriad potential inputs; would you restrict yourself to one in your native language? All too often, people enter their weekly language class to converse with their teacher, but then barely have any contact with other native speakers or the media being broadcast in their target language. Try something new every day. Listen to a cheesy song, read a newspaper article from a newspaper whose politics differ from your own, write a story for kids, attempt some improvised theatre and talk to yourself while cooking. Spice it up and add some flavour to your language learning!

FINDING ACTIVE PORTS in WINDOWS

netstat -an


Finding SQL STATEMENTS that are locking TABLES.

SELECT * FROM pg_stat_activity;

Removing TABLE Locks in POSTGRES


1) Find Blocked Tables with the below query and get the PID.

select t.relname,l.locktype,page,virtualtransaction,pid,mode,granted from pg_locks l, pg_stat_all_tables t where l.relation=t.relid order by relation asc;

2) Pass the PID in the below query to Remove the LOCK
SELECT pg_terminate_backend(6052);

Finding Blocked Tables in POSTGRES

select t.relname,l.locktype,page,virtualtransaction,pid,mode,granted from pg_locks l, pg_stat_all_tables t where l.relation=t.relid order by relation asc;

CASE Example in POSTGRES

SELECT  
CASE WHEN "EQU000"."city_C"= 'abc'
THEN 'cityNAME'
ELSE 'Group'
END AS "NAME"
FROM "EQU000" 

Getting Rowcount of all the tables in POSTGRES

SELECT
  nspname AS schemaname,relname,reltuples
FROM pg_class C
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
WHERE
  nspname NOT IN ('pg_catalog', 'information_schema') AND
  relkind='r'
ORDER BY reltuples DESC;

Describing Table in POSTGERS (DESC in Oracle)

Describing Table :

select column_name, data_type, character_maximum_length
from INFORMATION_SCHEMA.COLUMNS where table_name = 'EQUI_HDR';

OVER PARTITION ..... ROW_NUMBER Example in POSTGRES

select * from (
SELECT "PROCE_UNIT_C" ,"EQUI_C" ,"COMPO_C" ,"COMPO_TYPE_C","CUIF_INS_CAT",
row_number() over(PARTITION BY "PROCE_UNIT_C", "EQUIP_C","COMPO_C","COMPO_TYPE_C","CUIF_INS_CAT")  "Row_Number",
count("CUIF_INS_CAT") over(PARTITION BY "PROCE_UNIT_C", "EQUI_C","COMPO_C","COMPO_TYPE_C","CUIF_INS_CAT"),
CHR(min(ASCII("CUIF_INS_CAT")) over(PARTITION BY "PROCE_UNIT_C", "EQUI_C","COMPO_C","COMPO_TYPE_C"))
FROM
"INSPHISTORY" ) "a"
where "a"."Row_Number"=1

Wednesday 27 July 2016

LOGIC OF==ALPABETIC===ALPHANUMERIC===NUMERIC===NEGATIVENO===checking in TALEND

**AlphaNumeric||length > 5|| ==0 then reject else Accept

b=myString.matches("[0-9]+") ? myString.length() > 5 || myString.matches("0") ? "false" : "true" : "false";

**AlphaNumeric
myString.matches("[A-Za-z0-9]+")

**Numeric
myString.matches("[0-9]+"))

**Negative
myString.matches("-[0-9]+"))

**Alphabetic
myString.matches("[A-Za-z]+")


Eg:

* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
 public static void main (String[] args) throws java.lang.Exception
 {
  String myString = "-123456";
System.out.println(myString.matches("[A-Za-z0-9]+"));

String a=(myString.matches("[A-Za-z]+")) ? "String1" :

(myString.matches("[0-9]+")) ? myString.length() > 5 ? ">5" : "Good" :
(myString.matches("-[0-9]+")) ? "Negative" : "none";

System.out.println("hi"+a);

if(myString.matches("[A-Za-z]+"))
{
 System.out.println("String");
}
else
{   if(myString.matches("[0-9]+"))
      {
         System.out.println("Number");
      }
}    

System.out.println(myString.matches("[A-Za-z]+"));
 }
}

BUSINESS MODEL in TALEND

Business Model
Talend's Business Models allow data integration project stakeholders to graphically represent their needs regardless of the technical implementation requirements. Business Models help the IT operation staff understand these expressed needs and translate them into technical processes (Jobs).

draw your business needs,
•create and assign numerous repository items to your model objects,
•define the business model properties of your model objects.


All objects are represented in the Palette as shapes, and can be included in the model.

Shapes

Select the shape corresponding to the relevant object you want to include in your Business Model. Double-click it or click the shape in the Palette and drop it in the modeling area.

Alternatively, for a quick access to the shape library, keep your cursor still on the modeling area for a couple of seconds to display the quick access toolbar:



Terminal--The rounded corner square can illustrate any type of output terminal.

List--forms a list with the extracted data. The list can be defined to hold a certain nature of data.

InpuT--Inserts an input object allowing the user to type in or manually provide data to be processed.

Gear--This gearing piece can be used to illustrate pieces of code programmed manually that should be replaced by a Talend Job for example.

Ellipse--Inserts an ellipse shape.

Document--Inserts a Document object which can be any type of document and can be used as input or output for the data processed.

Decision--The diamond shape generally represents an if condition in the model. Allows to take context-sensitive actions.

Database--Inserts a database object which can hold the input or output data to be processed.

Data--A parallelogram shape symbolize data of any type.

Actor--This schematic character symbolizes players in the decision-support as well technical processes.

Action--The square shape can be used to symbolize actions of any nature, such as transformation, translation or formatting.

Assignment tab

The Assignment tab displays in a tabular form details of the Repository attributes you allocated to a shape or a connection.

To display any assignment information in the table, select a shape or a connection in the active model, then click the Assignment tab in the Business Model view.

You can also display the assignment list placing the mouse over the shape you assigned information to.


Assigning repository elements to a Business Model
The Assignment tab in the Business Models view lists the elements from the Repository tree view which have been assigned to a shape in the Business Model.
You can define or describe a particular object in your Business Model by simply associating it with various types of information, for example by adding metadata items.

You can set the nature of the metadata to be assigned or processed, thus facilitating the Job design phase.

To assign a metadata item, simply drop it from the Repository tree view to the relevant shape in the design workspace.

The Assignment table, located underneath the design workspace, gets automatically updated accordingly with the assigned information of the selected object.

The types of items that you can assign are:

Job designs--If any Job Designs developed for other projects in the same repository are available, you can reuse them as metadata in the active Business Model.
Metadata--You can assign any descriptive data stored in the repository to any of the objects used in the model. It can be connection information to a database for example.
Business Models--You can use in the active model all other Business Models stored in the repository of the same project.
Documentation--You can assign any type of documentation in any format. It can be a technical documentation, some guidelines in text format or a simple description of your databases.
Routines (Code)--If you have developed some routines in a previous project, to automate tasks for example, you can assign them to your Business Model. Routines are stored in the Code folder of the Repository tree view.



COURTS : CASES : LAWYERS : JUDGES : ::::::::: VICTIMS : ACCUSED

  *We have got so many SMART people in our COUNTRY. *we have got so many IIT completed SMART students in our COUNTRY. * we have got so many ...