What’s happening in BigQuery: New persistent user-defined functions, increased concurrency limits, GIS and encryption functions, and more

We’ve been busy this summer releasing new features for BigQuery, Google Cloud’s petabyte-scale data warehouse. BigQuery lets you ingest and analyze data quickly and with high availability, so you can find new insights, trends, and predictions to efficiently run your business. Recently added BigQuery features include new user-defined functions, faster reporting capabilities, increased concurrency limits, and new functions for encryption and GIS, all with the goal of helping you get more out of your data faster.  Read on to learn more about these new capabilities and get quick demos and tutorial links so you can try these features yourself.BigQuery persistent user-defined functions are now in betaThe new persistent user-defined functions (UDFs) in BigQuery let you create SQL and JavaScript functions that you can reuse across queries and share with others. Setting up these functions allows you to save time and automate for consistency and scalability. For example, if you have a custom function that handles date values a certain way, you can now create a shared UDF library, and anyone who has access to your dataset can invoke those date values in their queries. UDFs can be defined in SQL or JavaScript. Here’s an example:Creating a function to parse JSON into a SQL STRUCTIngesting and transforming semi-structured data from JSON objects into your SQL tables is a common engineering task. With BigQuery UDFs, you can now create a persistent Javascript UDF that does the parsing for you. Here, we’ll take a JSON string input and convert it into multiple fields in a SQL STRUCT. First we’ll define the function in this query:After executing the query, click the “Go to function” button in the BigQuery UI to see the function definition:You can now execute a separate query to call the UDF:And voila! Our JSON string is now a SQL STRUCT:Share your Persistent UDFs The benefit of persistent UDFs is that other project team members can now invoke your new function in their scripts without having to re-create it or import it first. Keep in mind that you will need to share the dataset that contains your UDFs in order for them to access it. Learn more:Documentation: CREATE FUNCTION statementMore examples: New in BigQuery—Persistent UDFs by Felipe HoffaConcurrent query limit has doubledTo help enterprises get insights faster, we’ve raised the concurrent rate limit for on-demand, interactive queries from 50 to 100 concurrent queries per project in BigQuery. This means you can run twice as many queries at the same time. As before, queries with results returned from the query cache, dry run queries, and queries ran inbatch mode do not count against this limit.You can monitor your team’s concurrent queries in Stackdriver and visualize them in Data Studio.Learn more:Documentation: Quotas and limitsBlog: Taking a practical approach to BigQuery monitoringTutorial: BigQuery monitoring with StackdriverTutorial: Visualize billing data with Data StudioBigQuery’s new user interface is now GAWe introduced the new BigQuery user interface (UI) last year to make it easier for you to uncover data insights and share them with teammates and colleagues in reports and charts. The BigQuery web UI is now generally available in the Google Cloud Platform (GCP) console. You can check out key features of the new UI in the quick demo below:Easily discover data by searching across tables, datasets, and projectsQuickly preview table metadata (size, last updated) and total rowsStart writing queries faster by clicking on columns to add.If you haven’t seen the new UI yet, try it out by clicking the blue button in the top right of your Google Cloud console window.Learn more:Documentation: BigQuery Web UILab: Using BigQuery in the GCP ConsoleBigQuery’s GIS functions are now GAWe’re continually working on adding new functionality to BigQuery so you can expand your data analysis to other data types. You might have noticed in the BigQuery Web UI demo that there’s now a field for hurricane latitude and longitude. These Geographic Information System (GIS) data types are now natively supported in BigQuery, as are the GIS functions to analyze, transform, and derive insights from GIS data. Here’s a look at using BigQuery GIS functions and this tutorial to plot the path of a hurricane:Applying GIS functions to geographic data (including lat/long, city, state, and zip code) lets analysts perform geographic operations within BigQuery. You can more easily answer common business questions like “Which store is closest for this customer?” “Will my package arrive on time?” or “Who should we mail a promotion coupon to?”You can also now cluster your tables using geography data type columns. The order of the specified clustered columns determines the sort order of the data. For our hurricane example, we clustered on `iso_time` to increase performance for common reads that want to track the hurricane path sorted by time. Learn more:Documentation: BigQuery GISDemo: BigQuery Public Dataset and GIS demo plotting U.S. lightning strikesTutorial: Plot the path of a hurricaneAEAD encryption functions are now available in Standard SQLBigQuery usesencryption at rest to help keep your data safe, and provides support for customer managed encryption keys (CMEKs), so you can encrypt tables with specific encryption keys you control. But in some cases, you may want to encrypt individual values within a table. AEAD (Authenticated Encryption with Associated Data) encryption functions, now available in BigQuery, allow you to create keysets that contain keys for encryption and decryption, use these keys to encrypt and decrypt individual values in a table, and rotate keys within a keyset.This can be particularly useful for applications of crypto-deletion or crypto-shredding. For example, say you want to keep data for all your customers in a common table. By encrypting each of your customers’ data using a different key, you can easily render that data unreadable by simply deleting the encryption key. If you’re not familiar with the concept of crypto-shredding, you’ve probably already used it without realizing it—it’s a common practice for things like factory-resetting a device and securely wiping its data. Now you can do the same type of data wipe on your structured datasets in BigQuery. Learn more:Understand crypto-deletion, crypto-shredding, and more: AEAD Encryption Concepts Documentation: AEAD Encryption Functions Documentation: AEAD.ENCRYPT() example codeCheck out a few more updates worth sharingOur Google Cloud engineering team is continually making improvements to BigQuery to accelerate time-to-value for our customers. Here are a few other recent highlights: You can now run scheduled queries at more frequent intervals. The minimum time interval for custom schedules has changed from three hours to 15 minutes. Faster schedules means fresher data for your reporting needs.The BigQuery Data Transfer Service now supports transferring data into BigQuery from Amazon S3. These Amazon S3 transfers are now in beta.Creating a new dataset? Want to make it easy for all to use? Add descriptive column labels within SQL using SQL DDL labels.Clean up your old BigQuery ML models with new SQL DDL statement support for DROP MODEL.In case you missed itFor more on all things BigQuery, check out these recent posts, videos and how-tos:Looker, Snowflake, and more on This Week in CloudPersistent UDF examples Uber Datasets now in BigQueryQuerying the night sky with BigQuery GISExperimenting with BigQuery sandboxAnalyze BigQuery data with Kaggle Kernels notebooksData Catalog hands-on guide: A mental modelTo keep up on what’s new with BigQuery, subscribe to our release notes and stay tuned to the blog for news and announcements And let us know how else we can help.
Quelle: Google Cloud Platform

GCP developer pro-tips: How to schedule a recurring Python script on GCP

So, you find yourself executing the same Python script each day. Maybe you’re executing a query in BigQuery and dumping the results in BigTable each morning to run an analysis. Or perhaps you need to update the data in a Pivot Table in Google Sheets to create a really pretty histogram to display your billing data. Regardless, no one likes doing the same thing every day if technology can do it for them. Behold the magic ofCloud Scheduler, Cloud Functions, and PubSub!Cloud Scheduler is a managed Google Cloud Platform (GCP) product that lets you specify a frequency in order to schedule a recurring job. In a nutshell, it is a lightweight managed task scheduler. This task can be an ad hoc batch job, big data processing job, infrastructure automation tooling—you name it. The nice part is that Cloud Scheduler handles all the heavy lifting for you: It retries in the event of failure and even lets you run something at 4 AM, so that you don’t need to wake up in the middle of the night to run a workload at otherwise off-peak timing. When setting up the job, you determine what exactly you will “trigger” at runtime. This can be a PubSub topic, HTTP endpoint, or an App Engine application. In this example, we will publish a message to a PubSub topic.Our PubSub topic exists purely to connect the two ends of our pipeline: It is an intermediary mechanism for connecting the Cloud Scheduler job and the Cloud Function, which holds the actual Python script that we will run. Essentially, the PubSub topic acts like a telephone line, providing the connection that allows the Cloud Scheduler job to talk, and the Cloud Function to listen. This is because the Cloud Scheduler job publishes a message to the topic. The Cloud Function subscribes to this topic. This means that it is alerted whenever a new message is published. When it is alerted, it then executes the Python script.The CodeSQLFor this example, I’ll show you a simple Python script that I want to run daily at 8 AM ET and 8 PM ET. The script is basic: it executes a SQL query in BigQuery to find popular Github repositories. We will specifically be looking for which owners created repositories with the most amount of forks and in which year they were created. We will use data from the public dataset bigquery-public-data:sample, which holds data about repositories created between 2007 and 2012. Our SQL query looks like this:PythonWe will soon paste this query in our github_query.sql file. This will be called in our main.py file, which calls a main function that executes the query in Python by using the Python Client Library for BigQuery.Step 1: Ensure that you have Python 3 and install and initialize the Cloud SDK. The following will walk you through how to create the GCP environment. If you wish to test it locally, ensure that you have followed the instructions for setting up Python 3 on GCP first.Step 2: Create a file called requirements.txt and copy and paste the following:Step 3: Create a file called github_query.sql and paste in the SQL query from above.Step 4: Create a file called config.py and edit with your values for the following variables. You may use an existing dataset for this or pick an ID of a new dataset that you will create, just remember the id as you will need it for granting permissions later on.Step 4:Create a file called main.py which references the previous two files.In order to deploy the function on GCP, you can run the following gcloud commands. This specifies using a runtime of Python 3.7, creating a PubSub topic with a name of your choosing, and specifying that this function is triggered whenever a new message is published to this topic. I have also set the timeout to the maximum that GCP offers of 540 seconds, or nine minutes.Make sure you first cd into the directory where the files are located before deploying, or else the following will not work.You specify the frequency of how often your Cloud Function will run in UNIX cron time when setting up Cloud Scheduler with the schedule flag. This means that it will publish a message to the PubSub topic every 12 hours in the UTC timezone, as seen below:where [JOB_NAME] is a unique name for a job, [SCHEDULE] is the frequency for the job in UNIX cron, such as “0 */12 * * *” to run every 12 hours, [TOPIC_NAME] is the name of the topic created in the step above when you deployed the Cloud Function, and [MESSAGE_BODY] is any string. An example command would be:Our Python code does not use the actual message This is a job that I run twice per day!“” published in the topic because we are just executing a query in BigQuery, but it is worth noting that you could retrieve this message and act on it, such as for logging purposes or otherwise.Grant permissionsFinally, open up the BigQuery UI and click ‘Create Dataset’ in the project that you referenced above.By creating the Cloud Function, you created a service account with the email in the format [PROJECT_ID]@appspot.gserviceaccount.com. Copy this email for the next step.Hover over the plus icon for this new dataset.Click “Share Dataset”.In the pop-up, enter the service account email. Give it permission “Can Edit”.Run the job:You can test the workflow above by running the project now, instead of waiting for the scheduled UNIX time. To do this:Open up the Cloud Scheduler page in the console.Click the ‘Run Now’ button.Open up BigQuery in the console.Under your output dataset, look for your [output_table_name], this will contain the data.To learn more, read our documentation on setting up Cloud Scheduler with PubSub trigger, and try it out using one of our BigQuery public datasets.
Quelle: Google Cloud Platform

Improving speech recognition for contact centers

Contact centers are critical to many businesses, and the right technologies play an important role in helping them provide outstanding customer care. Last July, we announced Contact Center AI to help businesses apply artificial intelligence to greatly improve the contact center experience. Today, we’re announcing a number of updates to the technologies that underpin the Contact Center AI solution—specifically Dialogflow and Cloud Speech-to-Text—that improve speech recognition accuracy by over 40% in some cases to better support customers and the agents that help them.These updates include:Auto Speech Adaptation in Dialogflow (beta)Speech recognition baseline model improvements for IVRs and phone-based virtual agents in Cloud Speech-to-TextRicher manual Speech Adaptation in Dialogflow and Cloud Speech-to-Text (beta)Endless streaming in Cloud Speech-to-Text (beta)MP3 file format support in Cloud Speech-to-TextImproving speech recognition in virtual agentsVirtual agents are a powerful tool for contact centers, providing a better user experience around the clock while reducing wait times. However, the automated speech recognition (ASR) that virtual agents require is much harder to do on noisy phone lines than in the lab. And even at high recognition-accuracy rates (~90%), ASR can sometimes still result in a frustrating customer experience, as you can see below.To help virtual agents quickly understand what customers need, and respond accurately, we’re introducing an exciting new feature in Dialogflow.Auto Speech Adaptation in Dialogflow BetaJust like knowing the context in a conversation makes it easier for people to understand one another, ASR improves when the underlying AI understands the context behind what a speaker is saying. We use the term speech adaptation to describe this learning process.In Dialogflow—our development suite for creating automated conversational experiences—knowing context can help virtual agents respond more accurately. Using the example in the animation above, if the Dialogflow agent knew the context was “ordering a burger” and that “cheese” is a common burger ingredient, it would probably understand that the user meant “cheese” and not “these”. Similarly, if the virtual agent knew that the term “mail” is a common term in the context of a product return, it wouldn’t confuse it with the words “male” or “nail”. To meet that goal, the new Auto Speech Adaptation feature in Dialogflow helps the virtual agent automatically understand context by taking all training phrases, entities, and other agent-specific information into account. In some cases, this feature can result in a 40% or more increase in accuracy on a relative basis.It’s easy to activate Auto Speech Adaptation: just click the “on” switch in the Dialogflow console (off by default), and you’re all set!Cloud Speech-to-Text baseline model improvements for IVRs and phone-based virtual agentsIn April 2018, we introduced pre-built models for improved transcription accuracy from phone calls and video. We followed that up last February by announcing the availability of those models to all customers, not just those who had opted in to our data logging program. Today, we’ve further optimized our phone model for the short utterances that are typical of interactions with phone-based virtual agents. The new model is now 15% more accurate for U.S. English on a relative basis beyond the improvements we previously announced. Applying speech adaptation can also provide additional improvements on top of that gain. We’re constantly adding more quality improvements to the roadmap—an automatic benefit to any IVR or phone-based virtual agent, without any code changes needed–and will share more about these updates in future blog posts.Improving transcription to better support human agentsAccurate transcriptions of customer conversations can help human agents better respond to customer requests, resulting in better customer care. These updates improve the quality of transcription accuracy to support human agents.Richer manual speech adaptation tuning in Cloud Speech-to-TextWhen using Cloud Speech-to-Text, developers use what are called SpeechContext parameters to provide additional contextual information that can make transcription more accurate. This tuning process can help improve recognition of phrases that are common in the specific use case involved. For example, a company’s customer service support line might want to better recognize the company’s product names. Today, we are announcing three updates, all currently in beta, that make SpeechContext even more helpful for manually tuning ASR to improve transcription accuracy. These new updates are available in both the Cloud Speech-to-Text and Dialogflow APIs.SpeechContext classes BetaClasses are pre-built entities reflecting popular/common concepts, which give Cloud Speech-to-Text the context it needs to more accurately recognize and transcribe speech input. Using classes lets developers tune ASR for a whole list of words at once, instead of adding them one by one.For example, let’s say there is an utterance that would normally result in the transcription, “It’s twelve fifty one”. Based on your use case, you could use a SpeechContext class to refine the transcription in a few different ways:A number of other classes are available to similarly provide context around digit sequences, addresses, numbers, and money denominations—you can see the full list here. SpeechContext boost BetaTuning speech recognition with tools like SpeechContext increases the likelihood of certain phrases getting captured—which will both reduce the number of false negatives (when a phrase was mentioned, but does not appear in the transcript), but can also potentially increase the number of false positives (when a phrase wasn’t mentioned, but appears in transcript). The new “boost” feature lets developers use the best speech adaptation strength for their use case.Example:SpeechContext expanded phrase limit BetaAs part of the tuning process, developers use “phrase hints” to increase the probability that commonly used words or phrases related to their business or vertical will be captured by ASR. The maximum number of phrase hints per API request has now been raised by 10x, from 500 to 5,000, which means that a company can now optimize transcription for thousands of jargon words (such as product names) that are uncommon in everyday language.  In addition to these new adaptation-related features, we’re announcing a couple of other highly requested enhancements that improve the product experience for everyone. Endless streaming Beta in Cloud Speech-to-TextSince we introduced Cloud Speech-to-Text nearly three years ago, long-running streaming has been one of our top user requests. Until now, Cloud Speech-to-Text only supported streaming audio in one-minute increments, which was problematic for long-running transcription use cases like meetings, live video, and phone calls. Today, the session time limit has been raised to 5 minutes. Additionally, the API now allows developers to start a new streaming session from where the previous one left off—effectively making live automatic transcription infinite in length, and unlocking a number of new use cases involving long-running audio.MP3 file format support Beta in Cloud Speech-to-TextCloud Speech-to-Text has supported seven file formats up until now (list here). Up until now, processing MP3 files required first expanding them into the LINEAR16 format, which requires maintaining additional infrastructure. Cloud Speech-to-Text now natively supports MP3 so there are no additional conversions needed. Woolworths’ use of conversational AI to improve the contact center experienceWoolworths is the largest retailer in Australia with over 100,000 employees, and has been serving customers since 1924. “In partnership with Google, we’ve been building a new virtual agent solution based on Dialogflow and Google Cloud AI. We’ve seen market-leading performance right from the start,” says Nick Eshkenazi, Chief Digital Technology Officer for Woolworths. “We were especially impressed with accuracy of long sentences, recognition of brand names, and even understanding of the format of complex entities, such as ‘150g’ for 150 grams. “Auto Speech Adaptation provided a significant improvement on top of that and allowed us to properly answer even more customer queries,” says Eshkenazi. “In the past, it used to take us months to create a high quality IVR experience. Now we can build very powerful experiences in weeks and make adjustments within minutes.”“For example, we recently wanted to inform customers about a network outage impacting our customer hub and were able to add messaging to our virtual agent quickly. The new solution provides our customers with instant responses to questions with zero wait time and helps them connect instantly with the right people when speaking to a live agent is needed.”Looking forwardWe’re excited to see how these improvements to speech recognition improve the customer experience for contact centers of all shapes and sizes—whether you’re working with one of our partners to deploy the Contact Center AI solution, or taking a DIY approach using our conversational AI suite. Learn more about both approaches via these links:Contact Center AI solutionsDialogflowCloud Speech-to-TextCloud Text-to-Speech
Quelle: Google Cloud Platform

IoT sensors and wearables revolutionize patient care

When was the last time you or a loved one went to the doctor or hospital? Things have changed dramatically over the last few years, with kiosks to register, portals to track your health history, and texts reminding you about upcoming appointments.

These changes have made a difference in how we interact with our healthcare providers. But there are more changes, not on the horizon, but here today. It is estimated as many as 50 billion medical devices will connect to clinicians, health systems, patients, and to each other.

Cardiac patient monitoring improvements

Imagine that you or a family member have periodic symptoms of irregular heartbeats, an all too common medical disorder known as an arrhythmia. If persistent, an arrhythmia can cause blood to clot in the heart, significantly increasing the risk of a heart attack or stroke. If caught early, a clot or blockage can be contained or cleared away and stent can be put in to keep blood flowing normally. In the US, more than 1.8 million stents are implanted annually, along with countless other preventative cardiac procedures to treat the 28.2 million US adults with diagnosed heart disease. Following any cardiac related procedure, a patient is typically counseled about the importance of exercise and nutrition then sent home. Post procedure, it’s common to be concerned about another cardiac related event in the immediate days following discharge, but what if the patient could be proactive, as well as reactive, to cardiac disease? 

Peerbridge Health, a New York-based remote patient monitoring company has developed the Peerbridge Cor™ (Cor), an award-winning, multi-channel wearable electrocardiogram (ECG) to better assist physicians and their patients detect and treat irregular heart activity, expeditiously. Prescribed by a cardiologist, the Cor is an elegant wearable worn 24 hours a day for up to 7 days with the ability to record every single heartbeat. In the event of abnormal cardiac activity, the patient can transmit select ECG activity to the prescribing physician’s care team for analysis at the press of a button. This continuous recording with transmitted events provides an unparalleled “window” into the patient’s heart activity as they go about their daily activities. Finally, an ECG monitoring solution providing critical data transmission patient’s expect with modern medicine.

Frustrated by all the wires in the hospital, Peerbridge Health was founded by Dr. Angelo Acquista when he was caring for his father in the ECU in 2006. Instead of getting up and walking around, his father was covered in wires and sensors unable to move, like most cardiac patients. Shortly after this experience, Dr. Acquista started Peerbridge Health, determined to change how this chronic disease is managed. Today, Peerbridge is a leading-edge manufacturer of the Peerbridge Cor (pictured above), the smallest and lightest FDA-cleared, multi-channel, wireless ECG.

The Peerbridge team selected Microsoft’s Azure IoT platform for their cardiac monitor because they, “saw the Microsoft IoT platform as being a foundational ingredient to help them grow and scale.” Peerbridge CEO, Adrian Gilmore states, “Azure IoT not only provides the secure data stream that is needed to monitor patients, it also offers cloud tools enabling us to present data in formats physicians expect, making the entire system a real revolution in cardiac care.” He continued, “Our engagement at the Microsoft AI and IoT Insider Lab, was the perfect opportunity for us to sharpen our team’s digital strategy, ensuring we optimize the company’s cloud architecture, and take full advantage of the variety of data services Microsoft offers.”

Avoiding diabetic amputations

Another company, Sensoria Health, a Seattle-based company, has taken on the problem of diabetes-related amputations. Why diabetes? Well, the statistics from the American Podiatric Medical Association are staggering:

More than 400 million people have diabetes worldwide
32 million people in the US have diabetes, costing more than 327 billion dollars
In the world today, a lower limb is lost to diabetes every 20 seconds
Cost in the US is estimated to be about 20 billion dollars

The typical progression to the amputation of a toe, foot, or more, always begins with a foot ulcer. The team at Sensoria asked themselves, “What can be done to expedite the healing of foot wounds to avoid amputations?” In response, Sensoria joined forces Optima to develop the Motus Smart powered by Sensoria®. It combines Sensoria® Core technologies, together with the clinically-tested Optima Molliter Offloading System, to take the pressure off the area of ulceration to improve blood circulation which is a critical factor to improve chance of healing.

Originally unveiled at the Consumer Electronics Show in January 2018, where it won Innovation Honoree Award, the Motus Smart, leverages Sensoria® Core to monitor activity and compliance, and is a clinically-proven and viable alternative to a total contact cast, and non-removable cam boot. The Sensoria® sensors work with a real-time app and alert system and an Azure based dashboard to inform patients, caregivers, and clinicians of non-compliant patients, allowing for easy and immediate intervention. The expensive and uncomfortable cast finally has an IoT, viable, and clinically-proven alternative with Motus Smart.

Why did Sensoria choose Microsoft’s Azure IoT platform for their patient monitoring devices? Davide Vigano, co-founder and CEO of Sensoria, shares in this video the three reasons why they selected Azure:

The richness of the development tools and already knowing how to use them
The openness of the platform and ability to use open source
Microsoft’s understanding and command of the enterprise market segment

Furthermore, Sensoria is using the Microsoft cloud and the Azure IoT platform to build a connected medical device platform, as they continue to develop new patient monitoring devices, like their smart sock v2.0 and Sensoria® Core, that drive improved outcomes for a variety of conditions. 

Learn more

Want to learn more about Microsoft and our work in healthcare? Check out our healthcare microsite, detailing our approach to the cloud and security, as well as compelling customer stories from Ochsner Health, BD, and others.
Quelle: Azure

An OpenShift Administrator’s Guide to Onboarding Applications

Infrastructure teams managing Red Hat OpenShift often ask me how to effectively onboard applications in production. OpenShift embeds many functionalities in a single product and it is fair to imagine an OpenShift administrator struggling to figure out what sort of conversations his team must have with an application team before successfully running an application on […]
The post An OpenShift Administrator’s Guide to Onboarding Applications appeared first on Red Hat OpenShift Blog.
Quelle: OpenShift