Skip to content

Instantly share code, notes, and snippets.

View meetchandan's full-sized avatar
🎯

Chandan Bhattad meetchandan

🎯
View GitHub Profile
func worker(events <-chan Event) {
ctx := context.Background()
client, err := bigquery.NewClient(ctx, ProjectID)
if err != nil {
panic(err)
}
u := client.Dataset(DataSet).Table(Table).Uploader()
buffer := []*Event{}
{
"Z6CF9026FBE0C6F96D750Z-1": {
"parent_sku": "Z6CF9026FBE0C6F96D750Z",
"attributes": {
"en": {
"product_title": "Yoghurt Go Drinkable Youghurt Snack Wild Strawberry",
"long_description": "Activia Strawberry & wild Strawberry Yoghurt Drink is Rich in fruit pieces you can enrich your day with a delicious, drinkable yoghurt snack . Rich in Calcium and made with probiotic helping to regulate your digestive system.\n<p><strong>Nutrition Value:</strong><br />Nutrition information per 100ml:\n <li>Energy 78 kcal/326 kj</li>\n <li>Protein 2.7 g</li>\n <li>Total Fat 1.7 g</li>\n <li>Carbohydrate 13.2 g</li>\n <li>Sodium 0.04 g</li>",
"nutritional_facts": "Average Nutritional Values Per 100ml\nEnergyinkcal 78kcal\nEnergyinkJ 326kj\nCarbohydrates 13.2g\nProtein 2.7g\nFat 1.7g\nSodium 0.04g",
"title_prefix": null,
"title_suffix": null,
{
[
{
"mp_code": "noon",
"country_code": "ae",
"lang": "en",
"splash_code": "eid_2024",
"config": {
"type": "video",
"url": "url"
CREATE OR REPLACE TABLE noonbitechit.search.crosslisting_sku_mapping
AS
WITH minutes_products AS (
SELECT sku AS zsku, lower(os.country_code) as country_code, psku_code, nsku_child AS nsku, partner_barcode, pb.id_partner, brand_code, SUM(stock_net) as total_stock
FROM `noondwh.instant_spanner.product` prod
JOIN `noondwh.psku.psku` p ON prod.sku = p.zsku_child
JOIN `noondwh.psku.pbarcode` pb USING(psku_code)
{
"cc_emails": [],
"fwd_emails": [],
"reply_cc_emails": [],
"ticket_cc_emails": [],
"fr_escalated": false,
"spam": false,
"email_config_id": null,
"group_id": 84000195229,
"priority": 1,
{
"exref": {
"exref_type_code": "mp_instant_order",
"mp_code": "nooninstant",
"external_ref": "IAEDAQ145A7GCVM7QA"
},
"lines": [
{
"entity_from": "entity::partner::ae::9411",
"entity_to": "entity::customer_address::ae::11a3fbe6ac03f7a0f27acb4725dad58b::1",
{
"exref": {
"exref_type_code": "mp_instant_order",
"mp_code": "nooninstant",
"external_ref": "IEGDA7332P9E39PJOA"
},
"lines": [
{
"entity_from": "entity::partner::eg::9511",
"entity_to": "entity::customer_address::eg::e096335c6b3d8b628533fb7376d55bbf::2",
{
"exref": {
"exref_type_code": "mp_instant_order",
"mp_code": "nooninstant",
"external_ref": "IEGDA65341K8Z7SXRA"
},
"lines": [
{
"entity_from": "entity::partner::eg::9511",
"entity_to": "entity::customer_address::eg::eba9e30e2d3feb5e43bf435f4299b52e::2",
{
"exref": {
"exref_type_code": "mp_instant_order",
"mp_code": "nooninstant",
"external_ref": "IAED9A1514PEB0IOSA"
},
"lines": [
{
"entity_from": "entity::partner::ae::16527",
"entity_to": "entity::customer_address::ae::6064d15bfeeb21b168495aca706a32c9::4",
{
"exref": {
"exref_type_code": "mp_instant_order",
"mp_code": "nooninstant",
"external_ref": "IAED8F123CA975JZKA"
},
"lines": [
{
"entity_from": "entity::partner::ae::9411",
"entity_to": "entity::customer_address::ae::6312c7c3af7767f479cb3dbb6930ee54::2",