<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mr. Yap</title>
    <description>The latest articles on DEV Community by Mr. Yap (@mryap).</description>
    <link>https://dev.to/mryap</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F67640%2Fb513fa1c-ae24-4c89-a160-80ef546aea9e.jpeg</url>
      <title>DEV Community: Mr. Yap</title>
      <link>https://dev.to/mryap</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mryap"/>
    <language>en</language>
    <item>
      <title>Getting started with BigQuery</title>
      <dc:creator>Mr. Yap</dc:creator>
      <pubDate>Thu, 27 Feb 2020 15:59:50 +0000</pubDate>
      <link>https://dev.to/mryap/getting-started-with-bigquery-4hae</link>
      <guid>https://dev.to/mryap/getting-started-with-bigquery-4hae</guid>
      <description>&lt;p&gt;BigQuery is Google's data warehouse service, dedicated to managing and querying large datasets. &lt;/p&gt;

&lt;p&gt;As BigQuery is one of many Google Cloud Platform products, here are some great benefit to organisations:&lt;br&gt;
    1. Serverless. No need to download data to your machine in order to work with it - the dataset will remain on the cloud. &lt;br&gt;
    2. Ease of use. Run ad-hoc SQL queries on your dataset without having to prepare the data, like indexes, beforehand. This is invaluable for data exploration. &lt;br&gt;
    3. Scale. Carry out data exploration on extremely large datasets interactively. You don't need to sample the data in order to work with it in a timely manner.&lt;br&gt;
     4. Shareability. You will be able to run queries on data from different datasets without any issues. BigQuery is a convenient way to share datasets. Of course, you can also keep your data private, or share them only with specific persons -- not all data need to be public. &lt;/p&gt;

&lt;p&gt;BigQuery charges for storing data, streaming inserts, and querying data. Loading and exporting data are free of charge.&lt;/p&gt;

&lt;p&gt;Getting started in BigQuery can be overwhelming. You need to have experience with sql query, there are platform-specific nuances that might trip you up. You also need to be comfortable working with web analytics data outside the Google Analytics interface.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sKdZvFca--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/jo2orj7r92jgka1cxqzb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sKdZvFca--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/jo2orj7r92jgka1cxqzb.png" alt="Alt Text" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Ingestion
&lt;/h3&gt;

&lt;p&gt;To ingest data into BigQuery, you can use an &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EL pipeline (used for periodic loads of log files), &lt;/li&gt;
&lt;li&gt;ETL pipeline (used when data needs to be enriched or quality controlled), &lt;/li&gt;
&lt;li&gt;ELT pipeline (used for exploratory work)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Data Processing Tasks
&lt;/h3&gt;

&lt;p&gt;Piping Cloud Pub/Sub messages to BigQuery or bulk-compressing files in Cloud Storage are common data processing tasks perform in GCP.&lt;/p&gt;

&lt;p&gt;As pipeline templates are simply stored in Cloud Storage buckets, they can be made publicly available for use across organizations and teams.&lt;/p&gt;

&lt;p&gt;Google provides ready-made templates for several of these common processing tasks, your teams can accomplish these common tasks without ever developing a pipeline.&lt;/p&gt;

&lt;h3&gt;
  
  
  Interacting with BigQuery
&lt;/h3&gt;

&lt;p&gt;You access BigQuery through the&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Google Cloud Platform Console (via a browser),&lt;/li&gt;
&lt;li&gt;Command-line tool, or&lt;/li&gt;
&lt;li&gt;Making calls to the BigQuery REST API using client libraries such as Java, .NET, or Python.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are also a variety of third-party tools that you can use to interact with BigQuery, such as visualizing the data or loading the data.&lt;/p&gt;

&lt;p&gt;Using the BigQuery web UI in the GCP Console as a visual interface to complete tasks like running queries, loading data, and exporting data is the most common way to use BigQuery&lt;/p&gt;

&lt;h3&gt;
  
  
  “External Table” in BigQuery
&lt;/h3&gt;

&lt;p&gt;External Tables are used to query data that you don’t want to import into BigQuery and remain in an external source such as Google Cloud Storage, Google Drive, BigTable.&lt;/p&gt;

&lt;p&gt;Since External tables in BigQuery reference data from an external source, an explicit BigQuery schema cannot be specified for an external table. The format of the external source defines the schema for the table. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://cloud.google.com/bigquery/external-data-sources"&gt;https://cloud.google.com/bigquery/external-data-sources&lt;/a&gt;&lt;/p&gt;

</description>
      <category>bigquery</category>
    </item>
    <item>
      <title>What I learnt today about Google Cloud Platform</title>
      <dc:creator>Mr. Yap</dc:creator>
      <pubDate>Tue, 28 May 2019 09:29:11 +0000</pubDate>
      <link>https://dev.to/mryap/what-i-learnt-today-about-google-cloud-platform-ccj</link>
      <guid>https://dev.to/mryap/what-i-learnt-today-about-google-cloud-platform-ccj</guid>
      <description>&lt;h3&gt;
  
  
  Billing
&lt;/h3&gt;

&lt;p&gt;In GCP, virtual machines are billed in one-second intervals. &lt;/p&gt;

&lt;p&gt;The unit per minute cost of a virtual server is based on the characteristics of the server, such as the number of virtual servers, the amount of memory, and the region where you run the virtual machine, influence the cost. Time of day is not a factor nor is the type of application you run on the virtual machine.&lt;/p&gt;

&lt;p&gt;You want to estimate the cost of GCP resources you will be using Compute Engine and Kubernetes Engine services  to have information on the virtual machines you will be using. &lt;/p&gt;

&lt;p&gt;The following commands will stop a virtual machine named web-server-1?&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud compute instances stop web-server-1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;gcloud compute instances&lt;/code&gt;, to indicate you are working with virtual machines, followed by the &lt;code&gt;stop&lt;/code&gt; command and the name of the VM. &lt;/p&gt;

&lt;p&gt;Your management team is considering 3 different cloud providers. You have been asked to summarize billing and cost information to help the management team compare cost structures between clouds. Which of the following would you mention about the cost of virtual machines in GCP?&lt;/p&gt;

&lt;p&gt;VMs are billed in one-second increments, cost varies with the number of CPUs and amount of memory in a machine type, you can create custom machine types, preemptible VMs cost up to 80 percent less than standard VMs, and Google offers discounts for sustained usage.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cloud Memorystore
&lt;/h3&gt;

&lt;p&gt;Cloud Memorystore is the only GCP designed to cache data in memory. Cloud SQL is a relational database service and might be a good option for the backend database. Cloud Spanner is a global relational database and is a good option when you need a globally consistent database. Cloud Datastore is a document database suitable for product catalogs, user profiles, and other semistructured data.&lt;/p&gt;

&lt;p&gt;Cloud Memorystore Use Case : Your department is deploying an application that has a database backend. You are concerned about the read load on the database server and want to have data available in memory to reduce the time to respond to queries and to reduce the load on the database server.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dataproc
&lt;/h3&gt;

&lt;p&gt;Dataproc is designed to execute workflows in both batch and streaming modes, which makes option A correct. Bigquery is a data warehouse service. Datastore is a document database. AutoML is a machine learning service.&lt;/p&gt;

&lt;h3&gt;
  
  
  IAM
&lt;/h3&gt;

&lt;p&gt;Owner, Editor, and Viewer are the three primitive privileges in Google Cloud Platform.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Identities&lt;/code&gt; are abstractions of users. They can also represent characteristics of processes that run on behalf of a human user or a virtual machine in the GCP. Identities are not related to virtual machine IDs. Roles are collections of privileges that can be granted to identities.&lt;/p&gt;

&lt;p&gt;Organization, folders, and projects are the components used to manage an organizational hierarchy. Buckets, directories, and subdirectories are used to organize storage.&lt;/p&gt;

&lt;h3&gt;
  
  
  Network
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;subnet&lt;/code&gt; is not a parameter to &lt;code&gt;gcloud&lt;/code&gt; to create a firewall. &lt;code&gt;source-ranges&lt;/code&gt; is for specifying sources of network traffic the rule applies to.&lt;/p&gt;

&lt;h3&gt;
  
  
  gcloud command
&lt;/h3&gt;

&lt;p&gt;Assuming there is a MySQL database running Cloud SQL called ace_exam_mysql to connect to a MySQL database running in Cloud SQL. The command is&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud sql connect ace_exam_mysql --user = root.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The correct command starts with &lt;code&gt;gcloud sql&lt;/code&gt; not &lt;code&gt;gcloud connect&lt;/code&gt;. The term sql is needed to identify the GCP service. A password is not needed on the command line; the user will be prompted for it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stackdriver Logging
&lt;/h3&gt;

&lt;p&gt;To view admin activity, system events, and data access on an App Engine project, Stackdriver Logging service you would use to view audit logs&lt;/p&gt;

&lt;h3&gt;
  
  
  Cloud Function
&lt;/h3&gt;

&lt;p&gt;You want to create a cloud function to transform audio files into different formats. The audio files will be uploaded into Cloud Storage. You want to start transformations as soon as the files finish uploading. Which trigger would you specify in the cloud function to cause it to execute after the file is uploaded?&lt;/p&gt;

&lt;p&gt;AnS: &lt;code&gt;google.storage.object.finalize&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Deployment
&lt;/h3&gt;

&lt;p&gt;What parameters of a deployment can be set in the Create Deployment page in Cloud Console?&lt;/p&gt;

&lt;p&gt;You can specify container image, cluster name, and application name along with the labels, initial command, and namespace. &lt;/p&gt;

&lt;h3&gt;
  
  
  Monitoring
&lt;/h3&gt;

&lt;p&gt;You have just created a virtual machine, and you'd like to monitor the VM and have an email sent to you whenever the CPU average utilization exceeds 75 percent for five minutes. What do you need to do to the VM to have this happen?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Install the monitoring agent on the virtual machine
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Security
&lt;/h3&gt;

&lt;p&gt;You are running applications that manage personal information for clients, and you want to take advantage of enhanced security features available to virtual machines in GCP. What option would you enable when creating a VM to get these enhanced security features?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Shielded VM is a set of enhanced security mechanisms, including Secure Book, Virtual Trusted Platform Module (vTPM), and Integrity monitoring. Integrity monitoring and secure boot are included with Shield VM and are not enabled separately.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  4 things about Cloud Storage
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Cloud Storage buckets can have retention periods.&lt;/li&gt;
&lt;li&gt;Cloud Storage does not provide block-level access to data within files stored in buckets.&lt;/li&gt;
&lt;li&gt;Cloud Storage is designed for high durability.&lt;/li&gt;
&lt;li&gt;Lifecycle configurations cannot be used to change storage class from regional to multiregional.(Once a bucket is created as regional or multiregional, it cannot be changed to the other) &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  App Engine
&lt;/h3&gt;

&lt;p&gt;You are running a production application in App Engine. You would like to upgrade the application, but you want to minimize the risk of disrupting the service. The best approach is create a new version of the service and route a small subset of traffic to that version and monitor for errors or other issues.  Take advantage of App Engine versions and the ability to split traffic. If there is a problem, you can detect it while exposing a small number of users to the new version. &lt;/p&gt;

&lt;h3&gt;
  
  
  Preemptible virtual machine
&lt;/h3&gt;

&lt;p&gt;Preemptible virtual machines may be shut down at any time, but they will be shut down if they run over 24 hours.&lt;/p&gt;

&lt;h3&gt;
  
  
  BigQuery
&lt;/h3&gt;

&lt;p&gt;To get an estimate of the volume of data scanned by BigQuery from the command line, type&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bq --location=[LOCATION] query --use_legacy_sql=false --dry_run [SQL_QUERY]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The correct bq command structure, which includes &lt;code&gt;location&lt;/code&gt; and the &lt;code&gt;--dry_run&lt;/code&gt; option. This option calculates an estimate without actually running the query.&lt;/p&gt;

&lt;p&gt;You have received a large data set from an Internet of Things (IoT) system. You want to use BigQuery to analyze the data. What command-line command would you use to make data available for analysis in BigQuery?&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bq load --autodetect --source_format=[FORMAT] [DATASET].[TABLE] [PATH_TO_SOURCE]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The autodetect and source_format parameters and path to source are correctly specified in all options. &lt;/p&gt;

&lt;p&gt;A client asks for recommendations for deploying a data warehouse in GCP. The client wants to minimize the amount of time spent on systems administration. Most of the analysts using the data warehouse know Microsoft Excel, SQL, and Python. They want the data warehouse infrastructure to grow as needed without having a database administrator modifying database configurations. What GCP services would I recommend?&lt;/p&gt;

&lt;p&gt;BigQuery is a data warehouse and analytic database managed service that minimizes administration overhead. There is no need to configure storage; that is managed by Google. BigQuery uses SQL as a query language. Cloud Storage is an object storage system and not suitable for data warehouses. Datastore is an object store and not suitable for analyzing with SQL. Bigtable is not appropriate for large, analytic queries like those found in data warehouse. Bigtable does not support SQL.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stackdriver
&lt;/h3&gt;

&lt;p&gt;What Stackdriver service is best for identifying bottlenecks in your application code?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Cloud Trace is a distributed tracing application that provides details on how long different parts of code run &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monitoring is used to notify DevOps engineers when resources are not functioning as expected. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Logging is for collecting, storing, and viewing log data, and although log entries might help diagnose bottlenecks, it is not specifically designed for that.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Debug is used to generate snapshot and inject logpoints.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>googlecloudplatform</category>
    </item>
    <item>
      <title>What you need to know about Firebase</title>
      <dc:creator>Mr. Yap</dc:creator>
      <pubDate>Mon, 27 May 2019 11:59:56 +0000</pubDate>
      <link>https://dev.to/mryap/what-you-need-to-know-about-firebase-2091</link>
      <guid>https://dev.to/mryap/what-you-need-to-know-about-firebase-2091</guid>
      <description>&lt;p&gt;Firebase allows you to do&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A/B Testing 🆎&lt;/li&gt;
&lt;li&gt;Machine Learning 🤖&lt;/li&gt;
&lt;li&gt;Hosting 🖥️&lt;/li&gt;
&lt;li&gt;Storage 🏬&lt;/li&gt;
&lt;li&gt;Data Analytics 📊
in one platform for all your mobile apps (including PWA)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Within the platform, a suite of Firebase products available for web apps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Firebase Authentication to easily allow your users to sign into your app.&lt;/li&gt;
&lt;li&gt;Cloud Firestore to save structured data on the cloud and get instant notification when data changes.&lt;/li&gt;
&lt;li&gt;Cloud Storage for Firebase to save files in the cloud.&lt;/li&gt;
&lt;li&gt;Firebase Hosting to host and serve your assets.&lt;/li&gt;
&lt;li&gt;Firebase Cloud Messaging to send push notifications and display browser popup notifications.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Follow me as I attempt to built a chat web app on Firebase platform &lt;/p&gt;

&lt;p&gt;I am doing this to get myself similar what out there so it makes my job as a web analyst easier. &lt;/p&gt;

</description>
      <category>firebase</category>
    </item>
  </channel>
</rss>
