How to Integrate the Google Drive API in Denodo

Total Page:16

File Type:pdf, Size:1020Kb

How to Integrate the Google Drive API in Denodo How To Integrate the Google Drive API in Denodo Revision 20200810 NOTE This document is confidential and proprietary of Denodo Technologies. No part of this document may be reproduced in any form by any means without prior written authorization of Denodo Technologies. Copyright © 2021 Denodo Technologies Proprietary and Confidential How To Integrate the Google Drive API in Denodo 20200810 2 of 10 Goal This document explains how to access Google Drive from Virtual DataPort by taking advantage of the Google Drive API. We will create a JSON data source specifying the resource we want to access and authenticate ourselves using OAuth 2.0. Content Google Drive offers a REST API with full capabilities to perform CRUD operations from our applications. Before creating a data source in Virtual DataPort, it is necessary to configure the Google Developer account to be able to authenticate an application using OAuth 2.0: 1. Access Google Developers Console at https://console.developers.google.com. 2. Click on the Library tab, and search for the Google Drive API to enable it: 3. Go back to the Dashboard tab, and click on the Google Drive API. 4. In the Google Drive API overview page, click Create Credentials: 5. Give the following answers: How To Integrate the Google Drive API in Denodo 20200810 3 of 10 6. Give a name for the credentials, such as: How To Integrate the Google Drive API in Denodo 20200810 4 of 10 7. Click Done: 8. Once the OAuth 2.0 client ID is configured, its details can be found in the Credentials tab. Two values will be used for the OAuth 2.0 authentication, and they are known to Google and the application as: a. Client ID b. Client secret Now that the API is enabled and the authentication is set, a JSON data source can be created in Virtual DataPort to access Google Drive’s REST API. As an example, we will create a data source that searches for a filename via a parameterized query using the following request URL: https://www.googleapis.com/drive/v3/files?q=name+contains+'@name' This request will return all the folders and files with names containing the string passed as the name parameter. 1. Create a new JSON data source: How To Integrate the Google Drive API in Denodo 20200810 5 of 10 a. File > New > Data source > JSON b. In Design Studio, you can hover over the connected virtual database, and click on the three dots to go to New > Data source > JSON. 2. For the Data route, select HTTP Client. 3. In the “Configuration” section: a. For the HTTP method, select GET. b. For the URL, GET requests of this API follow this format: https://www.googleapis.com/drive/v3/files?q=name+contains+'@name' 4. In the “Authentication” section: a. Authentication: OAuth 2.0 b. Authorization Grant: Authorization code grant c. Client identifier: Give the one obtained from Google Developers Console. d. Client secret: Give the one obtained from Google Developers Console. e. Click Launch the OAuth 2.0 credentials wizard to help you obtain these credentials. i. Token endpoint URL: https://accounts.google.com/o/oauth2/token ii. Authorization server URL: https://accounts.google.com/o/oauth2/auth iii. Redirect URI: If your web container port is 9090, then use the default redirect URI. Otherwise, select Other, and replace the port in the default redirect URI with your web container port. iv. Scopes: https://www.googleapis.com/auth/drive Note: To see a list of the other scopes that can be used, check https://developers.google.com/drive/web/scopes. v. Check Set the “state” request parameter. vi. In Generate the authentication URL, click Generate and then Open URL. vii. In Paste authorization response URL, give the URL retrieved in the previous step. viii. Click OAuth 2.0 credentials. ix. Click Ok to fill the remaining fields in the “Authentication” section. 5. Click Save to save the data source. How To Integrate the Google Drive API in Denodo 20200810 6 of 10 When we create the data source and base view, a dialogue will ask for a value for the name parameter: This is needed to send a sample request to the data source to test the connectivity and, when creating the base view, to introspect the schema. The base view’s schema is created over the data source using the response obtained with the sample value. From the created base view, it is possible to search for files containing any specific string in their names: How To Integrate the Google Drive API in Denodo 20200810 7 of 10 This first example shows all the files containing “pdf” in their names. If we query the base view, we will see one row with an array field called “files”: This array contains references to each of the files returned by the search, and we can access them by clicking on the “files” field: How To Integrate the Google Drive API in Denodo 20200810 8 of 10 If we want to access a single file’s complete information, it can be done by searching the exact filename or unique ID of the object. In this example, we will create a parameterized data source to get a file object by its ID. The Google Drive API URL for this is: https://www.googleapis.com/drive/v3/files/@{fileId}?fields=appProperties %2Ccapabilities%2CcontentHints%2CcreatedTime%2Cdescription%2CexplicitlyTrashed %2CfileExtension%2CfolderColorRgb%2CfullFileExtension%2CheadRevisionId %2CiconLink%2Cid%2CimageMediaMetadata%2CisAppAuthorized%2Ckind %2ClastModifyingUser%2Cmd5Checksum%2CmimeType%2CmodifiedByMeTime %2CmodifiedTime%2Cname%2CoriginalFilename%2CownedByMe%2Cowners %2Cparents%2Cpermissions%2Cproperties%2CquotaBytesUsed%2Cshared %2CsharedWithMeTime%2CsharingUser%2Csize%2Cspaces%2Cstarred %2CthumbnailLink%2Ctrashed%2Cversion%2CvideoMediaMetadata%2CviewedByMe %2CviewedByMeTime%2CviewersCanCopyContent%2CwebContentLink %2CwebViewLink%2CwritersCanShare This URL includes an optional parameter called “fields.” This parameter allows us to select which fields containing information about the file are returned. If the “fields” How To Integrate the Google Drive API in Denodo 20200810 9 of 10 parameter is excluded, only a small subset of the fields will be part of this method’s response. We have chosen to include all possible fields for this example. We created a JSON data source following the same steps as before but giving the above method as the GET request URL: Creating a base view on top of this data source returns detailed file information: We can query this view with any file ID returned by the “bv_gdrive_search_by_name” view: How To Integrate the Google Drive API in Denodo 20200810 10 of 10 Multiple views can be created on top of the Google Drive API in this manner. Once the base views containing the necessary information are created, they can then be combined like any other views in Virtual DataPort. Using the two base views created in this document as an example, we could create a join view that uses a file ID to obtain complete information of the files returned by a keyword search. References Using OAuth 2.0 to Access Google APIs Using OAuth 2.0 for Installed Applications Retrieve and Use OAuth 2.0 Credentials Choose Auth Scopes Google Developers Console.
Recommended publications
  • Xbook: Redesigning Privacy Control in Social Networking Platforms
    xBook: Redesigning Privacy Control in Social Networking Platforms Kapil Singh∗ Sumeer Bhola∗ Wenke Lee SchoolofComputerScience Google SchoolofComputerScience Georgia Institute of Technology [email protected] Georgia Institute of Technology [email protected] [email protected] Abstract in social networks. Social networking websites have recently evolved from With the advent of Web 2.0 technologies, web appli- being service providers to platforms for running third cation development has become much more distributed party applications. Users have typically trusted the so- with a growing number of users acting as developers and cial networking sites with personal data, and assume that source of online content. This trend has also influenced their privacy preferences are correctly enforced. However, social networks that now act as platforms allowing de- they are now being asked to trust each third-party applica- velopers to run third-party content on top of their frame- tion they use in a similar manner. This has left the users’ work. Facebook opened up for third-party application private information vulnerable to accidental or malicious development by releasing its development APIs in May leaks by these applications. 2007 [22]. Since the release of the Facebook platform, In this work, we present a novel framework for build- several other sites have joined the trend by supporting ing privacy-preservingsocial networking applications that Google’s OpenSocial [10], a cross-site social network de- retains the functionality offered by the current social net- velopment platform. works. We use information flow models to control what These third-party applications further escalate the pri- untrusted applications can do with the information they vacy concerns as user data is shared with these applica- receive.
    [Show full text]
  • How to Generate P12 Key
    Lepide Active Directory Self Service Generate P12 Key This document explains the steps to successfully install SSL security. Lepide Active Directory Self Service Generate P12 Key How to generate P12 key Lepide Active Directory Self Service allows Password Synchronization of Google Apps and IBM accounts. In order to enable Google Apps Password synchronization, you need to generate a P12 key by making certain settings in your Google service account. Follow the below mentioned steps to generate the P12 key for Google App Service Account. 1. Open Google Developer Console Project for Google Cloud Platform - https://console.developers.google.com/project in Web browser, preferably Google Chrome. 2. Enter the email address of your Google Service Account and click "Next". © Lepide Software Pvt. Ltd. Page 2 Lepide Active Directory Self Service Generate P12 Key 3. Enter the password of your Google Service Account and click "Sign In". It takes you to the Google Service Projects page. 4. Click "Create Project" to access "New Project" pop-up. © Lepide Software Pvt. Ltd. Page 3 Lepide Active Directory Self Service Generate P12 Key 5. The Project ID is assigned as per the project name. If you want to provide a manual project ID, click "Edit" link. You can also click "Show advanced options..." to access the advanced options. 6. Enter the Project Name, Project ID, and select the advanced option. Click "Create" to create the project. © Lepide Software Pvt. Ltd. Page 4 Lepide Active Directory Self Service Generate P12 Key 7. Once created, the dashboard comes up. Click "Enable and Manage APIs" in "Use Google APIs" section.
    [Show full text]
  • Monitoring Google Cloud Platform
    Monitoring Google Cloud Platform Google Cloud Platform *BETA* PowerPack version 100 Table of Contents Introduction 3 What is Google Cloud Platform? 3 What Does the Google Cloud Platform *BETA* PowerPack Monitor? 4 What are GCP Regions and Zones? 4 Installing the Google Cloud Platform *BETA* PowerPack 5 Configuring Google Cloud Platform for Monitoring 7 Creating a Google Cloud Platform Service Account 7 Enabling Google Cloud Platform APIs 9 Creating an SSH/Key Credential for Google Cloud Platform 10 Creating a Google Cloud Platform Virtual Device 12 Aligning the Google Cloud Platform Dynamic Applications 13 Discovering Google Cloud Platform Component Devices 13 Viewing Google Cloud Platform Component Devices 15 Relationships Between Component Devices 17 Chapter 1 1 Introduction Overview This manual describes how to monitor Google Cloud Platform (GCP) resources in the ScienceLogic platform using the Google Cloud Platform *BETA* PowerPack. The following sections provide an overview of GCP and the Google Cloud Platform *BETA* PowerPack: What is Google Cloud Platform? 3 What Does the Google Cloud Platform *BETA* PowerPack Monitor? 4 What are GCP Regions and Zones? 4 Installing the Google Cloud Platform *BETA* PowerPack 5 NOTE: ScienceLogic provides this documentation for the convenience of ScienceLogic customers. Some of the configuration information contained herein pertains to third-party vendor software that is subject to change without notice to ScienceLogic. ScienceLogic makes every attempt to maintain accurate technical information and cannot be held responsible for defects or changes in third-party vendor software. There is no written or implied guarantee that information contained herein will work for all third-party variants.
    [Show full text]
  • Jeffrey Scudder Google Inc. March 28, 2007 Google Spreadsheets Automation Using Web Services
    Jeffrey Scudder Google Inc. March 28, 2007 Google Spreadsheets Automation using Web Services Jeffrey Scudder Google Inc. March 28, 2007 2 Overview What is Google Spreadsheets? • Short Demo What is the Google Spreadsheets Data API? • Motivations (Why an API?) • Protocol design • Atom Publishing Protocols • GData • List feed deconstructed How do I use the Google Spreadsheets Data API? • Authentication • Longer Demo Questions 3 What is Google Spreadsheets? Let’s take a look 4 What is Google Spreadsheets? Why not ask why • Spreadsheets fits well with our mission… – “Organize My Information… and… – Make it Accessible and Useful… – With whomever I choose (and nobody else, thanks)” • In other words…. – Do-it-yourself Content Creation – Accepted/Familiar Interface of Spreadsheets and Documents – Accessibility from anywhere (…connected) – Easy-to-use Collaboration – Do-it-yourself Community Creation 5 What is the Google Spreadsheets Data API? Motivations • Foster development of specific-use apps • Allow users to create new UIs • To extend features offered • To integrate with 3rd party products • To offer new vertical applications 6 What is the Google Spreadsheets Data API? Protocol design based on existing open standards • Deciding on design principles – Use a RESTful approach – Reuse open standards – Reuse design from other Google APIs • The end result – REST web service based on GData – Data is in Atom XML and protocol based on the Atom Publishing Protocol (APP) – GData is based on Atom and APP and adds authentication, query semantics, and more
    [Show full text]
  • Com Google Gdata Client Spreadsheet Maven
    Com Google Gdata Client Spreadsheet Maven Merriest and kinkiest Casey invent almost accelerando, though Todd sucker his spondulicks hided. Stupefied and microbiological Ethan readies while insecticidal Stephen shanghais her lichee horribly and airts cherubically. Quietist and frostbitten Waiter never nest antichristianly when Stinky shook his seizin. 09-Jun-2020 116 24400 google-http-java-client-findbugs-1220-lp1521. It just gives me like a permutation code coverage information plotted together to complete output panel making mrn is com google gdata client spreadsheet maven? Chrony System EnvironmentDaemons 211-1el7centos An NTP client. Richard Huang contact-listgdata. Gdata-mavenmaven-metadataxmlmd5 at master eburtsev. SpreadsheetServiceVersionsclass comgooglegdataclientspreadsheet. Index of sitesdownloadeclipseorgeclipseMirroroomph. Acid transactions with maven coordinates genomic sequences are required js code coverage sequencing kits and client library for com google gdata client spreadsheet maven project setup and table of users as. Issues filed for googlegdata-java-client Record data Found. Uncategorized Majecek's Weblog. API using Spring any Spring Data JPA Maven and embedded H2 database. GData Spreadsheet1 usages comgooglegdataclientspreadsheet gdata-spreadsheet GData Spreadsheet Last feather on Feb 19 2010. Maven dependency for Google Spreadsheet Stack Overflow. Httpmavenotavanopistofi7070nexuscontentrepositoriessnapshots false. Gdata-spreadsheet-30jar Fri Feb 19 105942 GMT 2010 51623. I'm intern to use db2triples for the first time fan is a java maven project. It tries to approve your hours of columns throughout the free software testing late to work. Maven Com Google Gdata Client Spreadsheet Google Sites. Airhacksfm podcast with adam bien Apple. Unable to build ODK Aggregate locally Development ODK. Bmkdep bmon bnd-maven-plugin BNFC bodr bogofilter boinc-client bomber bomns bonnie boo books bookworm boomaga boost1710-gnu-mpich-hpc.
    [Show full text]
  • Sakai and GWT.Pdf
    Sakai and GW T Toward Improved UX and Easy Web 2.0 D evelopment all in Java Claude Coulombe Sacha Leprêtre Université de Montréal CRIM & Sakai Québec OpenSyllabus: O ld fashioned web - Click and wait! W eb 2.0 : User Experience (UX ) W eb 2.0 : User Experience (UX ) • Perceived 2nd generation of web sites and services • Improved UX is what W eb 2.0 is all about • Students ask for responsive and dynamic web interfaces and web interface similar to desktop interface • Sakai must evolve toward W eb 2 and deliver a better UX • Improving UX more complex GUI more work for developers • How to keep happy users & developers? • But, great technology doesn't give great UX … • The real magicians are the UI designers O penSyllabus - Short D emo • W hat we have done with O penSyllabus… AJAX – A breakthrough! AJAXAJAX The first use of the term in public was by Jesse James Garrett in February 2005 AJAX – A breakthrough! • Ajax eliminates painful page loading! • Ajax stands for Asynchronous JavaScript and X ML • X MLHttpRequest JavaScript O bject allows asynchronous requests for data to the server and updates the web page without doing a full page reload • Invented by Microsoft • W ithout Ajax we were still stuck with click and wait interface • The result is more responsive and dynamic W ebapps • But, Ajax is based on Client-side JavaScript Looking for a silver bullet… • Hundreds of JavaScript Libraries and Ajax Frameworks • W hich one will be the good one? • Survey of Sakai’s Ajax and alternative technologies: - UX Richness of the libraries - Easy dev, quick learning curve - Easy integration with Sakai - O pen Source License - D ocumentation - Endorsement - Cross browsing compatibility - Java based - D ev tools / ID E (eclipse) - D ebugging/Test Problems with JavaScript… So, he didn't know JavaScript well enough..
    [Show full text]
  • Ray Cromwell
    Building Applications with Google APIs Ray Cromwell Monday, June 1, 2009 “There’s an API for that” • code.google.com shows 60+ APIs • full spectrum (client, server, mobile, cloud) • application oriented (android, opensocial) • Does Google have a Platform? Monday, June 1, 2009 Application Ecosystem Client REST/JSON, GWT, Server ProtocolBuffers Earth PHP Java O3D App Services Media Docs Python Ruby Utility Blogger Spreadsheets Maps/Geo JPA/JDO/Other Translate Base Datastore GViz Social MySQL Search OpenSocial Auth FriendConnect $$$ ... GData Contacts AdSense Checkout Monday, June 1, 2009 Timefire • Store and Index large # of time series data • Scalable Charting Engine • Social Collaboration • Story Telling + Video/Audio sync • Like “Google Maps” but for “Time” Monday, June 1, 2009 Android Version 98% Shared Code with Web version Monday, June 1, 2009 Android • Full API stack • Tight integration with WebKit browser • Local database, 2D and 3D APIs • External XML UI/Layout system • Makes separating presentation from logic easier, benefits code sharing Monday, June 1, 2009 How was this done? • Google Web Toolkit is the Foundation • Target GWT JRE as LCD • Use Guice Dependency Injection for platform-specific APIs • Leverage GWT 1.6 event system Monday, June 1, 2009 Example App Code Device/Service JRE interfaces Guice Android Browser Impl Impl Android GWT Specific Specific Monday, June 1, 2009 Shared Widget Events interface HasClickHandler interface HasClickHandler addClickHandler(injectedHandler) addClickHandler(injectedHandler) Gin binds GwtHandlerImpl
    [Show full text]
  • Brisbin Google Apis for Biodiversity.Pdf
    Use of Google APIs for Biodiversity Informatics Kathryn Hurley, Rebecca Shapley Google Fusion Tables Team Current Usage - Google Maps Protected Planet* Mountain Biodiversity Portal BioGeomancer GBIF *in progress Current Usage - App Engine Map of Life / GeoPhylo Engine VertNet* *in progress Many, many Google APIs HTTP (REST) HTML/JS Extension/App Storage Visualization Google Earth BigQuery Maps Picasa Prediction Language GWT Fusion Tables App Engine Latitude Android Buzz 77 APIs!! http://imagine-it.org/google/apistimeline.html Many, many Google APIs HTTP (REST) HTML/JS Extension/App Storage Visualization Google Earth BigQuery Maps Picasa Prediction Language GWT Fusion Tables App Engine Latitude Android Buzz 77 APIs!! http://imagine-it.org/google/apistimeline.html Problem - Sharing Data Nice data! Can I have a copy? I've got data about that, too! Happy to share, but I'm still making the data better... Solution - Virtual data join in Fusion Tables Solution - Virtual data union in Fusion Tables Problem - Mapping data John has data on several species of butterflies in North America. He would like to create several maps using the data. Solution - Fusion Tables Why Use it Upload data to Fusion Tables. Select a subset of the data to display on a map Place the map on an HTML page! Find out more http://code.google.com/apis/fusiontables/ More mapping with Fusion Tables Problem - Sharing apps, but not data John created an App Engine app to collect his butterfly data. Pete and Sharon really like this app and would love to use it for collecting their own data. Butterfly Collector Name: Description: Image: Select..
    [Show full text]
  • Google Apps Technical Transition Guide for Business, Education, and Government
    Google Apps Technical Transition Guide For Business, Education, and Government Google, Inc. 1600 Amphitheatre Parkway Mountain View, CA 94043 www.google.com Part number: GATTG_1.4 August 12, 2015 © Copyright 2015 Google, Inc. All rights reserved. Google, the Google logo, Google Apps, Google Apps Mail, Google Docs, Google Calendar, Google Sites, Google Video, Google Talk, Gmail, Google Message Filtering, Google Message Security, Google Message Discovery are trademarks, registered trademarks, or service marks of Google Inc. All other trademarks are the property of their respective owners. Use of any Google solution is governed by the license agreement included in your original contract. Any intellectual property rights relating to the Google services are and shall remain the exclusive property of Google, Inc. and/or its subsidiaries (“Google”). You may not attempt to decipher, decompile, or develop source code for any Google product or service offering, or knowingly allow others to do so. Google documentation may not be sold, resold, licensed or sublicensed and may not be transferred without the prior written consent of Google. Your right to copy this manual is limited by copyright law. Making copies, adaptations, or compilation works, without prior written authorization of Google. is prohibited by law and constitutes a punishable violation of the law. No part of this manual may be reproduced in whole or in part without the express written consent of Google. Copyright © by Google Inc. Google provides this publication “as is” without warranty of any either express or implied, including but not limited to the implied warranties of merchantability or fitness for a particular purpose.
    [Show full text]
  • Google Loader Developer's Guide
    Google Loader Developer's Gui... Thursday, November 11, 2010 18:30:23 PM Google Loader Developer's Guide In order to use the Google APIs, you must import them using the Google API loader in conjunction with the API key. The loader allows you to easily import one or more APIs, and specify additional settings (such as language, location, API version, etc.) applicable to your needs. In addition to the basic loader functionality, savvy developers can also use dynamic loading or auto-loading to enhance the performance of your application. Table of Contents Introduction to Loading Google APIs Detailed Documentation google.load Versioning Dynamic Loading Auto-Loading Available APIs Introduction to Loading Google APIs To begin using the Google APIs, first you need to sign up for an API key. The API key costs nothing, and allows us to contact you directly if we detect an issue with your site. To load the APIs, include the following script in the header of your web page. Enter your Google API key where it says INSERT-YOUR-KEY in the snippet below. Warning: You need your own API key in order to use the Google Loader. In the example below, replace "INSERT- YOUR-KEY" with your own key. Without your own key, these examples won't work. <script type="text/javascript" src="https://www.google.com/jsapi?key=INSERT-YOUR- KEY"></script> Next, load the Google API with google.load(module, version), where • module calls the specific API module you wish to use on your page. • version is the version number of the module you wish to load.
    [Show full text]
  • Google Data Collection —NEW—
    Digital Content Next January 2018 / DCN Distributed Content Revenue Benchmark Google Data Collection —NEW— August 2018 digitalcontentnext.org CONFIDENTIAL - DCN Participating Members Only 1 This research was conducted by Professor Douglas C. Schmidt, Professor of Computer Science at Vanderbilt University, and his team. DCN is grateful to support Professor Schmidt in distributing it. We offer it to the public with the permission of Professor Schmidt. Google Data Collection Professor Douglas C. Schmidt, Vanderbilt University August 15, 2018 I. EXECUTIVE SUMMARY 1. Google is the world’s largest digital advertising company.1 It also provides the #1 web browser,2 the #1 mobile platform,3 and the #1 search engine4 worldwide. Google’s video platform, email service, and map application have over 1 billion monthly active users each.5 Google utilizes the tremendous reach of its products to collect detailed information about people’s online and real-world behaviors, which it then uses to target them with paid advertising. Google’s revenues increase significantly as the targeting technology and data are refined. 2. Google collects user data in a variety of ways. The most obvious are “active,” with the user directly and consciously communicating information to Google, as for example by signing in to any of its widely used applications such as YouTube, Gmail, Search etc. Less obvious ways for Google to collect data are “passive” means, whereby an application is instrumented to gather information while it’s running, possibly without the user’s knowledge. Google’s passive data gathering methods arise from platforms (e.g. Android and Chrome), applications (e.g.
    [Show full text]
  • Advance Project in Computer Science Youtube Mini-Crawler Program for Video Database Construction
    בס"ד Advance project in computer science YouTube Mini-Crawler Program for Video Database Construction Personal Information • Name: Carmi Nehoray • ID: 065 910 267 • Address: Shtulim, HaMeyasdim 100 • Email: [email protected] • Cell-Phone: 0525287784 Supervisors names in alphabetical order: • Dr. Avigail Mireille • Dr. Cohen Azaria • Dr. Lerner Anat 1. Abstract...................................................................................................................... 4 2. Introduction .............................................................................................................. 5 3. Project overview ....................................................................................................... 6 3.1. Project description ............................................................................................. 6 3.2. Component overview ....................................................................................... 6 3.3. Phase overview .................................................................................................. 7 3.3.1. Initialization ................................................................................................ 7 3.3.2. Search ........................................................................................................... 7 3.3.3. Save .............................................................................................................. 7 4. Tools ..........................................................................................................................
    [Show full text]