Switch to English?
Yes
Переключитись на українську?
Так
Переключиться на русскую?
Да
Przełączyć się na polską?
Tak
Post your project for free and start receiving proposals from freelancers within minutes after publication!

It is necessary to connect the Big Query database to Google Sheets.

Translated13 USD

Client's review of cooperation with freelancer

Quality
Professionalism
Cost
Contactability
Deadlines

There are no comments, Oleksandr solved a somewhat atypical problem, did it in a very short time, then commented on his actions and answered questions. Before starting the work, he recreated a test example on his own, and then offered his service. I consider this an example of a responsible attitude towards work. I am very grateful and wish you successful work!

Freelancer's review of cooperation with Stepan Litvin

Payment
Task setting
Clarity of requirements
Contactability

Everything is great, I was happy to collaborate.

Profile deleted | Safe Safe

    Another 2 proposals concealed
  • Tetyana Shumeyko
    14 August 2024, 21:30 |

    Добрий вечір! А яку саме помилку повертає? 

  • Stepan Litvin
    14 August 2024, 21:32 |

    Ответ от BigQuery: {"error":{"code":403,"message":"BigQuery API has not been used in project 896917572724 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/bigquery.googleapis.com/overview?project=896917572724 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.","errors":[{"message":"BigQuery API has not been used in project 896917572724 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/bigquery.googleapis.com/overview?project=896917572724 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.","domain":"usageLimits","reason":"accessNotConfigured","extendedHelp":"https://console.developers.google.com"}],"status":"PERMISSION_DENIED","details":[{"@type":"type.googleapis.com/google.rpc.Help","links":[{"description":"Google developers console API activation","url":"https://console.developers.google.com/apis/api/bigquery.googleapis.com/overview?project=896917572724"}]},{"@type":"type.googleapis.com/google.rpc.ErrorInfo","reason":"SERVICE_DISABLED","domain":"googleapis.com","metadata":{"service":"bigquery.googleapis.com","consumer":"projects/896917572724"}}]}}

  • Stepan Litvin
    14 August 2024, 21:33 |

    Доброго вечора)

  • Tetyana Shumeyko
    14 August 2024, 21:34 |

    Із цієї помилки виходить, що Ваш проєкт ще не має доступу до BigQuery API, або він був відключений 

  • Stepan Litvin
    14 August 2024, 21:37 |

    Так, я це розумію, але не можу налаштувати API Big Query. image


  • Stepan Litvin
    14 August 2024, 21:38 |

    Якщо добре видно скрін, можна побачити, що статус API - Enabled

  • Stepan Litvin
    14 August 2024, 21:38 |

    Якщо добре видно скрін, можна побачити, що статус API - Enabled

  • Tetyana Shumeyko
    14 August 2024, 21:39 |

    Так, я звернула на це увагу

  • Stepan Litvin
    14 August 2024, 21:45 |

    Якщо це допоможе розумінню, я можу скинути код, який віправляє запит

  • Tetyana Shumeyko
    14 August 2024, 21:57 |

    скиньте мені в особисті

  • Profile deleted
    14 August 2024, 21:59 |

    Доброго дня, поділіться скриптом, постараюсь допомогти з вашою проблемою

  • Stepan Litvin
    14 August 2024, 22:02 |

    function uploadToBigQuery() {

      // ID вашего проекта в Google Cloud

      const projectId = 'technologicaltables';

      

      // Идентификаторы Dataset и Table в BigQuery

      const datasetId = 'Dispatcher';

      const tableId = 'ExampleTable';

      

      // Получение данных из Google Sheets

      const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Исходные данные');

      const data = sheet.getDataRange().getValues();

      // Преобразование данных в формат JSON для вставки в BigQuery

      let rows = [];

      for (let i = 1; i < data.length; i++) { // Начинаем с 1, чтобы пропустить заголовок

        let row = {

          json: {

            "название": data[i][0],

            "статус": data[i][1]

          }

        };

        rows.push(row);

      }

      

      // Логирование данных перед отправкой

      Logger.log('Отправляемые данные: ' + JSON.stringify(rows));

      // Формирование запроса на вставку данных

      let insertAllRequest = {

        rows: rows

      };

      // URL для вставки данных в таблицу BigQuery

      const url = 'https://bigquery.googleapis.com/bigquery/v2/projects/' + projectId + '/datasets/' + datasetId + '/tables/' + tableId + '/insertAll';

      

      // Опции запроса

      const options = {

        method: 'post',

        contentType: 'application/json',

        headers: {

          Authorization: 'Bearer ' + ScriptApp.getOAuthToken()

        },

        payload: JSON.stringify(insertAllRequest),

        muteHttpExceptions: true

      };

      

      // Выполнение запроса

      let response = UrlFetchApp.fetch(url, options);

      let result = JSON.parse(response.getContentText());

      

      // Логирование полного ответа от BigQuery

      Logger.log('Ответ от BigQuery: ' + JSON.stringify(result));

      // Проверка на ошибки

      if (result.insertErrors) {

        for (let i = 0; i < result.insertErrors.length; i++) {

          Logger.log('Ошибка: ' + result.insertErrors[i].errors[0].message);

        }

      } else {

        Logger.log('Данные успешно загружены в BigQuery');

      }

    }

  • Profile deleted
    14 August 2024, 22:32 |

    Запустив ваш код і все працює, є ще певні нюанси які могли визвати таку проблему. Але це вже потрібно перевірити через віддалений доступ

Current freelance projects in the category Web Programming

Creation of a website for an accounting firm on WordPress (using a ready-made template)

557 USD

Good day. We are an accounting firm - we want to create a website for the accounting firm on WordPress (using a ready-made template) in two languages. It should be optimized for Google and SEO.

Web Programming ∙ 22 hours 4 minutes back ∙ 89 proposals

Improvement of the time tracking system on ASP.NET

Need a .NET developer for a small project — an employee payroll system. Three tasks: Deploy the system on our subdomain (we will provide the domain and access). Audit the login form + make security improvements if necessary. Implement a closed API for data export in JSON. Stack:…

Web Programming ∙ 22 hours 17 minutes back ∙ 30 proposals

A modern website is needed for a stretch ceiling company in Poland.

634 USD

Need a modern premium design, mobile device adaptation, fast loading, SEO, animations, calculator, portfolio, application form. Experience in creating websites in Poland, landing pages for construction or renovation companies is preferred. Please be sure to send examples of your…

HTML & CSSWeb Programming ∙ 1 day back ∙ 135 proposals

Looking for a Frontend Developer for an educational platform

Frontend Developer https://www.figma.com/design/vXKC6kfWOeDBX2464BXqRv/%D0%A2%D0%97?node-id=&#61;0-1&p&#61;f&t&#61;OJxQ9DF0zXBNnBJv-0 Hello! We are looking for a frontend developer to work on a modern music platform Muse. The project already has a ready design in Figma, a…

HTML & CSSWeb Programming ∙ 1 day 2 hours back ∙ 86 proposals

Redesign and SEO optimization of the website on the Prom.ua platform

Technical Task Website: protone.com.uaMain Goal The website needs to be made modern, visually appealing, user-friendly, and maximally prepared for promotion in search engines and within the Prom.ua marketplace. The main focus is on improving the design, catalog structure,…

Web ProgrammingWeb Design ∙ 1 day 2 hours back ∙ 24 proposals

Client
Stepan Litvin
Ukraine Kharkiv  2  0
Project published
1 year back
64 views