Demo entry 5627347



Submitted by anonymous on Jul 05, 2016 at 20:45
Language: Python. Code size: 443 Bytes.

def count_rows(service,param_table_id):

    # 1. in order to send a "select" request against a Fusion Tables table simply prepare the query in a string
    fs_query = 'select count(col1) from ' + param_table_id 

    # 2. then send of the query with the function "sqlGet".
    request = service.query().sqlGet(sql=fs_query).execute()
    # 3. in return get a JSON object and parse it accordingly
    return request['rows'][0][0]

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).