Welcome to new things

[Technical] [Electronic work] [Gadget] [Game] memo writing

Azure

How to use Microsoft SQL Server with JavaScript

This is a memo on how to use Microsoft SQL Server (MSSQL) with JavaScript. The library is tedious, which is also recommended by Microsoft. tedios is a callback style library, but it is written in async, await, and TypeScript in a modern st…

How to obtain and use an administrator-accessible, user-less token for the Microsoft Graph (Office365) API

A note on the Microsoft Graph (Office365) API for obtaining and using an admin token. impetus I tried to add and remove users and groups in Azure Active Directory using the API. The Azure Active Directory API has been integrated with the M…

What to do when you can't log in to an app with Azure Active Directory single sign-on (SSO)

I was interested in single sign-on (SSO) services and tried various services for a while. www.ekwbtblog.com I wanted to log in with my Office365 user as a key, so I ended up using Azure Active Directory SSO. As for the usage, I mainly use …

How to distinguish between files and directories in Google Cloud Storage

In Google Cloud Storage, I tried to get a list of files in a subdirectory and process those files. However, when I looked at the error message that the file was wrong, I found that the list of files retrieved included a subdirectory. Reaso…

How to get a subdirectory listing of Google Cloud Storage with Node.js

We previously used the GCP Pyhton library to get a list of Google Cloud Storage subdirectories, and this is the Node.js version of that. Python version is here www.ekwbtblog.com procedure The GCP Node.js SDK documentation is kind enough to…

Using the cloud means constant maintenance costs

I received an email from Google Cloud Platform. The Node.js version of the function I originally created for Gooble Cloud Functions was version 6, and this time the version 6 service was ending, so the email was a request for an upgrade. I…

How to get and update your Microsoft Graph (Office365) API token

One way to manipulate the Web version of Office365 is through the Microsoft Graph (Office365) API. For example, with the Microsoft Graph (Office365) API, you can use the Send email from OutLook Excel Online file editing SharePoint file ret…

How to add a read-only user to SQL Server (Azure SQL Database)

SQL Server data is read by BI tools to create graphs. In that case, we did not want to use a user with write permission because the data would only be read and various people would create graphs, so we created a read-only user for sharing.…

You should not write queries across databases in Azure SQL Database.

I did not know that SQL Server was the first time to use Azure SQL Database, but in SQL Server, queries across databases can be easily written by specifying the database, as shown below. SELECT * FROM [<db_name>].dbo.test_table However, when I try </db_name>…

Try different SSO (single sign-on) services

I am interested in SSO (Single Sign On) and have tried various SSO services. I am completely new to SSO, so here is a brief summary of what SSO is and how it works, and how easy it is to use. motive I use various web services, each of whic…

How to do monthly/weekly aggregation in SQL Server

To aggregate data by month/week, first find the beginning date of the month/week of the date and GROUP by that beginning date. If the DATE_TRUNC() function can be used to get the head date, such as Google BigQuery, you can aggregate the da…

How to upload files from Microsoft (Office365) Flow to Slack

When I received an email, I wanted to upload the email attachment to Slack and tried to use Microsoft (Office365) Flow to perform that task. Microsoft (Office365) Flow has a Slack connector, so I thought it would be easy to create one, Unf…

How to get the last record of a group in SQL

For example, "In a user's event log, I want to extract the last event the user performed." Sometimes you want to retrieve the last record of data divided by groups. The window function can be used to obtain the following WITH tbl AS ( SELE…

How to access Microsoft SQL Server (Azure SQL Database) from Spark (Google Dataproc)

How to access Microsoft SQL Server (Azure Database) from Spark (Google Dataproc). procedure Spark Configuration The following Spark settings will allow you to read and write SQL Server data from Spark. Download the MS SQL Server JDBC jar f…

How to create a calendar table in SQL Server

I wanted a calendar table in SQL Server (Azure SQL Database), so here is a memo on how to create one. I googled, and it seems to be created by creating a table with "WITH" and then making a recursive call from "UNION ALL" in the table defi…

Organize how to reference data in Microsoft (Office365) Flow

Microsoft Flow has data types such as basic types, arrays, and maps (objects), but because the operations are wrapped in a GUI, it is very difficult to understand how to get from the data to the desired element values. Often, after much tr…

How to catch errors in Microsoft (Office365) Flow

When using Microsoft Flow normally, if some error occurs in the middle of the process, the action stops there. For example, suppose you have a Flow that retrieves a list of users from SQL Server and sends a Slack to those users. If there i…

Talk about Azure Functions starting up too slowly the first time.

There is a service called Azure Functions, which is like an Azure version of AWS Lambda. I wanted to operate Azure from MS Flow, and since MS Flow has a connector for Azure Functions, I tried to write a Function to operate Azure with Azure…

How to pass parameters from Azure Node SDK to Azure Data Factory pipeline

This is a note of what I am trying to do with the Azure Node SDK, trying to parameterize and execute on the Azure Data Factory pipeline. Pipeline execution of Data Factory is performed by the "createRun" method of the "pipelines" member of…