Google For Retail

i found this tool on the internet it’s a new project called Google Retail

The goal of this task it’s trying to import a catalog of clothes stores into Big Query and then upload it into the Google Retail platform into Google Cloud.

  • Enable

if you don't have an existing Google Cloud project you can click on the link below Set up a Google Cloud project then you need to create an API KEY and Enable the Retail API

This is the link to enable the Google Retail API

  1. Click the ENABLE button in the Google Cloud console to enable the API.

Set up authentication for your application

You must set up both of the following authentication methods to access the Retail API:

  • Service Account — Applications use a service account to authenticate calls to Product.

Create a service account

  1. Go to the Cloud Console Credentials page.

5. Click Create to create the service account.

6. The JSON file that contains the public/private key for the new service account is automatically downloaded to your computer. This JSON file is the only copy of the key for your service account. Be sure to store it in a secure location. The JSON key file must be stored in a location that is accessible from your application (see your-service-account-json-key-file in Authenticating using a service account (OAuth 2.0).

Data importing into Big Query

there are different way to import the data in Google Retail

  • Importing catalog data from Merchant Center

in this example, we are going to import the data thru BigQuery

the first step create a table called catalog and import this schema below

to import the schema below click on ```edit as text ```

after that, i create i simple python script that makes a query into MySQL and get all information about the catalog in this example I will get just the info below

This is my Python Script

i run my script and now i have my catalog into bigquery

now you can go to Retail Dashboard and import the data from BigQuery and schedule an automatic job

you go first on import product catalog

then you go to source data and select BigQuery

select your Branch in this case Branch1

then select Retail Product Catalogs Schema and your Big Query Table

after the import is done you can find your data in data dashboard

now you can set up your automatic cron on cloud shell

if you have any question please let me know i would love to help you

below all links that i used during this task

--

--

Director Of Engineering at Bucksense, Inc 📈 Crypto & NFT Fan | ⌨️ Mechanical Keyboard Enthusiast | 🍕 Pizza Maker

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michele Berardi

Director Of Engineering at Bucksense, Inc 📈 Crypto & NFT Fan | ⌨️ Mechanical Keyboard Enthusiast | 🍕 Pizza Maker