You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@profiledefhbase_to_dict(hbase_output, escape_slash=False):
"""Optimize hbase output TreeMap for faster conversion to DataFrame"""gateway=JavaGateway(auto_convert=True)
JSONObject=gateway.jvm.org.json.JSONObject# We do bulk export to JSON on Java side to avoid overheads of iterative access# and then parse it back to Dict in Pythonifescape_slash:
hbase_output=str(hbase_output)
optimized=json.loads(JSONObject(str(hbase_output)).toString())
returnoptimized
should not have str(hbase_output) by default when calling JSONObject (only used when escaping slashes).
The text was updated successfully, but these errors were encountered:
The function
should not have
str(hbase_output)
by default when calling JSONObject (only used when escaping slashes).The text was updated successfully, but these errors were encountered: