BlazingDB / blazingsql

BlazingSQL is a lightweight, GPU accelerated, SQL engine for Python. Built on RAPIDS cuDF.
https://blazingsql.com
Apache License 2.0
1.92k stars 181 forks source link

[REVIEW] Fix for GCS credentials from filepath #1585

Closed Christian8491 closed 2 years ago

GPUtester commented 2 years ago

Please update the changelog in order to start CI tests.

View the gpuCI docs here.

wmalpica commented 2 years ago

@Christian8491 could you please describe how you tested this and how you used the API. Could you please share a test script where we can see how you are using the API for GS credentials from a path. Dont put the actual credentials in the example, but enough to make sure we understand how the API is supposed to work. THanks

Christian8491 commented 2 years ago

This is the script i used to test a minimal GCS

from blazingsql import BlazingContext

bc = BlazingContext()

bc.gs('test-tpch',
     project_id='tests-313317',
     bucket_name='test-tpch',
     use_default_adc_json_file=False,
     adc_json_file='//Downloads/tests-313317-XXXXXX.json')

bc.create_table('nation','gs://test-tpch/tpch/nation_0_0.parquet')
query = """ select * from nation """
table = bc.sql(query)
print(table)

Output:

BlazingContext ready
Google Cloud Storage Plugin Registered Successfully
   n_nationkey     n_name  n_regionkey                                          n_comment
0            0    ALGERIA            0   haggle. carefully final deposits detect slyly...
1            1  ARGENTINA            1  al foxes promise slyly according to the regula...
2            2     BRAZIL            1  y alongside of the pending deposits. carefully...
3            3     CANADA            1  eas hang ironic, silent packages. slyly regula...