Data Wrangling With Shopify's GraphQL API: Python & Pandas QuickStart
Вставка
- Опубліковано 9 чер 2024
- In this video, I’m going to show you how to query Shopify data in bulk efficiently and load the requested data into Pandas data frames.
▬▬▬▬▬▬ V I D E O C H A P T E R S & T I M E S T A M P S ▬▬▬▬▬▬
0:00 Introduction and overview
0:23 Getting the Shopify token
1:00 The Shopify client
1:25 The first GraphQL queries with Python
3:12 Nesting queries efficiently
4:55 Shopify GraphQL bulk operations
6:12 Extracting data and transforming with Pandas - Наука та технологія
Really nice tutorial!
I've been trying to troubleshoot SSL errors while connecting to Shopify's GraphQL...any thoughts on how/why?
is it possible to setup a gql subscription to a bulk query? then a python web socket would update when the query completes. also gql allows you to create sets of fields and reference them in a single variable correct?
Yes, you can set up a webhook on the topic bulk_operations/finish and send the event to pub/sub for processing. When the bulk query finishes, you extract the data from the url received in the pub/sub message. Check out this video for setting up the webhook ua-cam.com/video/SARgBE07tis/v-deo.html. You can define variables as part of your gql queries
Hey Man! Excellent tutorials! I recently started putting together an implementation where I am trying to update shopify product inventory and create products from a vendors xlsx file, but my first program did it one by one and was kind of slow. Is there any way you could do a tutorial on how to set something up for using the GraphQL and bulk API so that I can download the shopify data, compare it to the matching names on the xlsx file, and update inventory for the matching products, as well as create any products that don't already have a match? Sorry I know that's a lot, but using GraphQL has been absolutely destroying me...can't even get past error 400 when uploading my json
Hey Kyle, thanks for watching! I would definitely be using Pandas for this and then a GraphQL mutation to update to products. I will likely make a video about Shopify mutations in the future.
@@rabbitmetrics I have everything ready to go, my JSONL file looks fine and I keep getting this BS when I attempt upload:
Exception occurred: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
Failed to upload JSONL file.
Ever seen that one before? I can't find anything on it and it's not my connection, and shopify isn't down!
hey really helpful, can you please provide the repo for this ?
Hey, do you post a repo anywhere please?
Nice tutorial. Do you have the code in some repo?
Thanks! I don' have a repo for this video but will create one for upcoming videos. This topic will likely be covered again.