https://prefect.io logo
Title
d

datamongus

08/15/2022, 11:25 PM
Greetings, I am trying to install the old prefect-gcp for prefect 1.0 to execute BigQueryTasks
prefect-gcp
seems to only refer to Prefect 2.0
a

Anna Geller

08/15/2022, 11:31 PM
yup exactly - prefect-gcp is for 2.0 only for 1.0 you would need to use the task library
m

Matt Conger

08/15/2022, 11:31 PM
Hi @datamongus I've linked the task library that Anna mentioned above. Hope this helps!
d

datamongus

08/15/2022, 11:33 PM
thank you
is there an associated pip package we should install? I’m running this now and I get an error
ImportError: cannot import name 'secretmanager' from 'google.cloud' (unknown location)
I’m not using the secretmanager task
only the BigQueryTask
Ah I believe I’ve found my error. I needed to add an additional path
import prefect.tasks.gcp
is what I had, I needed
import prefect.tasks.gcp.bigquery
🙌 2
Thank you for the information
m

Matt Conger

08/15/2022, 11:42 PM
Yep that should do it. Happy to help!
l

Lucien Fregosi

08/16/2022, 8:08 AM
Hi just a quick question, what is the advantage with using
prefect-gcp
rather than using the standart python GCP client within a prefect task ?
a

Anna Geller

08/16/2022, 10:48 AM
probably Blocks + the out-of-the-box availability of this integration are the main benefits
you just pip install prefect-gcp and you can start using the tasks without having to figure out how those external libraries work, and how to securely pass credentials (that's the Blocks part)