Budi Wibowo(Author)

Page 2

24 articles written by Budi Wibowo(Author)

Skim through the screen shot that contains yellow exclamation mark. If one of them apply to you, hopefully this blog helps. The following is the sequence of error I was getting, and how i fixed it. Make sure you only follow the part mark as Solution.


Problem: The project at <folder> is an Android ADT project. To Import this project into Android Studio, you first need to *export* it as Gradle project from ADT.

Solution: Fire up your ADT(Eclipse), import the project into ADT, and Export it to a Gradle export.

To import the file into eclipse and ex, click the following: Continue Reading →

Pig doesn’t support scalar variable assignment. That is you can not have a statement like this

var = 3

The smallest unit you can have is a tuple, containing a single value

var = {3}

So, say that you have a variable X containing 2 columns,


and you need to do some math against the second column, based on the result of a value stored in a variable, var above.

The following statement won’t work:

result = FOREACH X GENERATE $1*var;

Instead you need to join two variables together so that for every row of X, you will have an additional column containing the value from var. You need to produce the following data before proceeding with your calculation


To accomplish this, you need to do the following:

temp = JOIN X BY 1, var BY 1 USING 'replicated';

Now you can do your math operation

result = FOREACH temp GENERATE $1*$2;

My code is pulling JSON data from a web service I wrote. That JSON data is then loaded into a python dictionary. Things works fabulously when I debug in my local console running an internal web server provided by the App Engine SDK. But when I upload the application to Goole CLoud Engine, things break. This is a snippet of my code

except Exception as ex:
   self.response.write("Google says: %s"%(ex.message))
   self.response.write("Try refreshing the page (again)")

I have all the states abbreviation as keys. when I try to access the value of the dictionary directly using square brackets, like


Google App Engine complains about KeyError exception. However if I try iterating through the key using a for loop, like

for each_state in states:

it works flawlessly in the App Engine. I also found out that the following also works perfectly


The only thing I cannot do is accessing the dictionary using square brackets. That baffles me. If you know what’s up with that, drop me a line.