投稿時間:2021-06-12 06:22:10 RSSフィード2021-06-12 06:00 分まとめ(27件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
TECH Engadget Japanese 2014年6月12日、工事現場向けデジカメ「STYLUS TG-3 工一郎」が発売されました:今日は何の日? https://japanese.engadget.com/today-203012592.html stylustg 2021-06-11 20:30:12
海外TECH Ars Technica CD Project Red does an about-face, says ransomware crooks are leaking data https://arstechnica.com/?p=1772586 february 2021-06-11 20:20:51
海外TECH DEV Community Let's Dive into React (Pt. 4) https://dev.to/shafspecs/let-s-dive-into-react-pt-4-jhf Let x s Dive into React Pt Let s continue from where we stopped in the last article wherein we created a component and returned our first HTML element using JSX Our goal is to build a counter and a thing to note is a component can range from a HTML tag to an entire webpage Let s try and think of the components or different parts of our counter app First we have the background and that s where everything will be located Secondly we have a counter that shows the current count we are on Thirdly we have a button to increase the count of the number displayed by one Lastly another button to decrease the count number by one That s a simple breakdown of our counter app that we will be making Let s begin Our App component will be our main component for this project remember we have a header at the top then the numbers then the buttons Let s start with the header import React from react const App gt return lt div gt lt header gt Counter App lt header gt lt div gt export default AppWe have our header created in the div let s create the count component Remember we can add an HTML tag some JavaScript and keep writing but let s make it another component to keep our code clean and short Let s create a folder called components to store all our other components Inside we create the file Counter jsxLet s create a function called Counter after importing React and return a divimport React from react const Counter gt return lt div gt lt div gt export default CounterLet s just add a lt h gt tag with as its value we will come back to add functionality But we must first import it into our App jsx to render it on the page import React from react import Counter from components Counter const App gt return lt div gt lt header gt Counter App lt header gt lt Counter gt lt div gt export default AppLet s add a button component the same way we added the counter except instead of lt h gt tag we will use lt button gt tag And import it into our App jsx component Our App jsx import React from react import Counter from components Counter import Button from components Button const App gt return lt div gt lt header gt Counter App lt header gt lt Counter gt lt Button gt lt div gt export default Appand our page OK we have done quite a lot we have added our components rendered them through index jsx and will now explain how to control the update of our counter number Note React elements are immutable Once you create an element you can t change its children or attributes An element is like a single frame in a movie it represents the UI at a certain point in time This is a problem it means if we want to change counter each time we click we re render the page That would be very inconvenient cause that means for example if we have a form with verification we will refresh the page every time a value is inputted That s where states come in A state is a JavaScript object that is managed within a component similar to variables declared within a function and influences the output of a component There is no need for re rendering at all it s just like a variable that changes value within a function that can change value while the function is running without need to re call the function How do we create a state and change it First we import the non default function useState from the react module in the App jsx Make sure it is written between curly braces Next we use array destructuring to initialize our state This is the general syntax of useState const nameOfVariable functionToUpdateVariable useState defaultValueOfVariable The useState is always written outside the return methodNote The default value of a state can be a string number array boolean or even object Let s create ours and call it count and the function to update setCount const count setCount useState Let s now set the Counter component to be count and the default value to be the useState default But the count variable and the Counter are in different files How will we connect them The answer is Component Properties or called props for short In short props are objects that transfer data between a parent component and it s child component and vice versa What is a parent and child component A parent component is the one that imports a component while the child component is the one being exported Let s transfer the count to the Counter component The way props are moved between a parent and it s child is Parent componentfunction Parent const name John const age return lt Child nameProp name ageProp age gt Child Componentfunction Child props return lt h gt My name is props nameProp lt h gt lt h gt His age is props ageProp lt h gt Let s dissect what s above we have to variables name and age Props can be any data and datatype not just states And we want to display them in our child component In our parent component we give them a custom name any name literally and set it to the data we want to pass Notice the variables written in curly braces Note Any JavaScript written in JSX s HTML is written between curly braces i e written in the return function In the child component we accept the props argument Recall we called props an object and the values of the object are what we set in the parent component So we get each prop we passed and using the rule above wrote the props in curly braces Let s see how that will look in our own code App jsx lt Counter count count gt Counter jsx const Counter props gt return lt h gt props count lt h gt We passed count to Counter above with the name count name it whatever you like This is your own project accepted it and displayed it Now if you change the default value of the state and save it will automatically change in the browser In the next article we will learn how to use the button to change numbers and make the way we write our props shorter See you in the next article 2021-06-11 20:31:25
海外TECH DEV Community My Completely Biased Reasons for Choosing Angular https://dev.to/johnbwoodruff/my-completely-biased-reasons-for-choosing-angular-1hbg My Completely Biased Reasons for Choosing AngularI wanted the title to be painfully obvious Just in case that didn t make it obvious enough let me be even more clear This is my completely biased opinion You possibly vehemently disagree with me on this and that s okay This is not a post to try to claim Angular is better than React or Vue or Svelt or whatever other framework you re in love with It s literally a post talking about why I John Woodruff choose to use Angular in personal projects small and large Honestly I m not even trying to convince you to use Angular In fact my honest advice for picking a framework for a project is to pick the one you know the best so you can be as productive as possible So let s get all that out of the way up front and dive into my heavily biased reasons for choosing Angular for personal projects Keep in mind when I make a statement it s an entirely opinion based statement so take it with a grain of salt Opinionated FrameworkLet s talk about one of the hottest topics up front Angular is an opinionated framework If you re not sure what that means basically it s that the Angular framework defines how you should build applications and they provide all of the essential tools you need to be able to build your applications They provide solutions for routing data fetching internal data flow and more all bundled in the framework itself Contrast this with something less opinionated like React which specifically does not define how you should build applications it s simply a library to build components You can then pick and choose any number of libraries for all the pieces you need to build your application specifically the same things I mentioned above So why is that a hot topic Well opinionated or less opinionated frameworks or libraries elicit all sorts of responses from the developers who use them Many developers are very against opinionated frameworks where many other developers love opinionated frameworks So naturally many of the arguments both in favor of and against Angular are based on the fact that it s a highly opinionated framework They have rigid structure for how Angular apps should be built and many tools included out of the box Well here we come to my first of several biased opinions I love Angular because it s an opinionated framework I love that I don t have to pick and choose from a million libraries to put together a complex app of what I need is already included in the Angular framework I also don t need to decide how I want to build my applications because Angular has a detailed style guide for building applications and I m able to focus entirely on the actual implementation of my application This is also why I love Angular for large complex apps within work environments When working on teams there is often friction due to different teams or team members doing things differently With Angular you eliminate a lot of that because there are defined ways of doing things and so it s far easier to scale across an organization Having worked on large complex applications in work environments using both Angular and React it s been infinitely easier to work within Angular applications due to the lack of a lot of the friction we had with the large React applications It came down to Angular being opinionated so there was far less mental overhead Angular CLIAh the Angular CLI This goes right along with the previous point of Angular being opinionated The Angular CLI is the best way to build Angular applications due to it tightly following the Angular style guide It generates a fully scaffolded Angular project for you and has numerous generator commands for adding new components services modules etc has automated testing all set up for you out of the box and more It also completely controls your build process which means they fully manage the building and optimizing of your application So all of your production builds make use of optimizations such as ahead of time compilation source code minification tree shaking style auto prefixing and more This is all stuff that you would have to figure out and do yourself using a build tool and numerous libraries and plugins Instead of wasting time on all that I can enjoy knowing that the Angular CLI is generating the best possible production build for me and I can focus on building awesome features Version UpdatesOne of the best features of Angular CLI if not the best feature is the ng update command Ever since Angular was released the Angular CLI has included this command It takes basically all the work out of doing version upgrades and the Angular team did an absolutely phenomenal job of making this command work exceptionally well They even have a super helpful Update Guide which gives detailed instructions but almost all of them say that the changes should be automated by the ng update command Normally when you have a major version update you would have to manually go through your app updating dependencies delving into changelogs changing code in your app in numerous places to get rid of deprecated or removed features and then painstakingly testing to make sure you haven t broken anything This command however automates essentially all of that including running code migrations that automatically migrate you to the latest recommended syntax There have only been a handful of times where the changes required manual intervention in the code and usually they were exceptionally quick to resolve All the rest is fully automated by Angular CLI Ever since this command was released I have spent approximately minutes updating to the latest each time a new major version is released Contrast this with major version upgrades that can sometimes take hours or even days to update your large complex applications to the latest versions It even allows library authors to define their own schematics to automatically update their libraries and that s awesome for users of the framework to not have to worry about manually keeping those up to date when they can just automate it This has saved me countless hours every single time a major version is released and I am completely spoiled when using other frameworks that don t provide this incredible functionality that s actually another upside to opinionated frameworks it allows features like this that are otherwise unrealistic with unopinionated frameworks The Angular team absolutely knocked it out of the park with this feature Angular CDKAlongside Angular Material is a super awesome little package called Angular CDK CDK stands for Component Dev Kit and it is an incredibly handy package for helping you develop some of the more complex components an application requires They re marketed as behavior primitives that you can use to build your own branded components Building buttons and input fields and such are fairly straightforward for people building component libraries but there are other components that are much more complex such as modals accordions data tables drag and drop trees and more Rather than building all this yourself or relying on libraries that style these components how they want Angular CDK gives you ways to very easily build your own complex behavioral components that you can style easily to fit your company or project s branding Not only that but these components are often much more accessible than components you would build yourself As has been the theme with this post Angular CDK helps you save a ton of time by having these abstractions built out for you so you can worry about the look feel and implementation of your components rather than the more complex details such as positioning scroll behaviors etc It has saved me an enormous amount of time and complexity when building my components If you re building with Angular even if you don t use Angular Material you should absolutely use Angular CDK Dependency InjectionThis is a hot topic for some reason but Dependency Injection is another huge reason why I love to use Angular It allows me to not have to worry about defining my own patterns for singleton vs factories Instead Angular s Dependency Injection tooling makes it exceptionally easy for me to provide the dependencies I need anywhere I need them and to do it in an easy manner Rather than have to instantiate a service in a component I can simply inject my service and Angular s Dependency Injection will ensure I am given the correctly instantiated service like so Some service I ve defined Injectable export class MyService Some component in my app Component export class MyComponent constructor private service MyService The other huge benefit to Dependency Injection is for better testability Automated tests are something that I consider absolutely vital to the success or failure of a product and the team that builds it Dependency Injection in Angular makes it incredibly easy to test mock out and handle dependencies external to the unit of code I m testing at the moment Consider the above component To mock a method I simply need to inject the correct dependency and then utilize Jasmine s spies to mock out the method describe MyComponent gt let service MyService beforeEach async gt Initialize Angular TestBed await TestBed configureTestingModule declarations MyComponent compileComponents Inject MyService for mocking service TestBed inject MyService Mock out sayHello method spyOn service sayHello and returnValue Hello World It makes working in large complex codebases much more trivial and makes testing vastly more simple Are there downsides to Dependency Injection Absolutely No matter what pattern you choose there are always going to be tradeoffs It comes down to what tradeoffs you re willing to make in exchange for the benefits you consider most valuable For me Angular s Dependency Injection is one of the main reasons I choose it over other frameworks ConclusionIn case you ve forgotten by this point I ll reiterate one more time that this post is incredibly biased and entirely opinion based I absolutely love to use Angular it s my framework of choice for side projects and I believe it s an excellent choice for many of you as well That being said I absolutely would argue that it s not a good choice for many others When it comes down to it you need to weigh the pros and cons of each framework decide what tradeoffs you re willing to make and choose based on what you decide For many of you that s going to be React or Vue or Svelt or Stencil or Ember or heck maybe even Backbone And that s absolutely okay I wanted to write this article to provide perspective to why I personally choose Angular over another framework Not to provide more fodder for the framework wars or to bash on another person s choice I will always say that the best framework choice for a project is the one you or your team is the most familiar with that will help you be the most productive and provide the fewest tradeoffs for what you want In fact I love to read other peoples completely biased articles on why they choose their framework or library or text editor or whatever and I enjoy celebrating their success and happiness over what they ve chosen while I enjoy what I ve chosen If there s anyone else out there like me who chooses Angular for their side projects I d love to chat in the comments about what your reasons are And if you want to bash Angular or another framework for it not being as good as Framework X or Y I humbly request you save those comments for the posts that encourage it 2021-06-11 20:14:48
海外TECH DEV Community Set up a free PostgreSQL database on Supabase to use with Prisma https://dev.to/prisma/set-up-a-free-postgresql-database-on-supabase-to-use-with-prisma-3pk6 Set up a free PostgreSQL database on Supabase to use with PrismaSupabase is a backend as a service built on top of open source technologies It gives you a database authentication a REST API real time subscriptions and storage It offers a free plan which includes a hosted PostgreSQL database This can be useful if you re getting started with a new project This guide explains how to quickly connect the Postgres database provided by Supabase to a Prisma project There are other services out there that provide hosted PostgreSQL databases like Heroku or Digital Ocean Prisma is an open source next generation ORM It consists of the following parts Prisma Client Auto generated and type safe query builder for Node js amp TypeScript Prisma Migrate Migration system Prisma Studio GUI to view and edit data in your database Step Log into SupabaseNavigate your browser to and log in with GitHub Step Create a new projectYou ll find that an organization has been created for you under the same GitHub username you used when logging in Go ahead and create a new project by clicking on new project and then pick the organization You ll then need to provide a name and set a password for your database we ll need it later Finally click on create new project After creating the project you ll need to wait for minutes for Supabase to finish creating the database Step Get the connection string from the project settingsGo to the settings page from the sidebar and navigate to the Database tab You ll find the database s connection string with a placeholder for the password you provided when creating the project Step Testing the connectionTo make sure that everything works correctly let s try the connection string in a Prisma project If you already have one all you need to do is set the DATABASE URL to the connection string including the password in your env file and you re good to go In case you don t have a Prisma project or this is your first time working with Prisma you re going to use with the repo from the quickstart guide Cloning the starter projectNavigate into a directory of your choice and run the following command in your terminal if you re on a Windows machine curl L o quickstart master tar gz amp amp tar zxvf quickstart master tar gz quickstart master typescript starter amp amp move quickstart master typescript starter starter amp amp rmdir S Q quickstart master amp amp del Q quickstart master tar gzAnd if you re using Mac OS or Linux run the following command curl L tar xz strip quickstart master typescript starterYou can now navigate into the directory and install the project s dependencies cd starter amp amp npm install A look at the project s structureThis project comes with TypeScript configured and has the following structure A prisma directory which contains A env file Contains the DATABASE URL variable which Prisma will use A dev db file This is a SQLite database A schema prisma file Where we define the different database models and relations between them A script ts file where we will run some queries using Prisma Client This starter also comes with the following packages installed prisma client An auto generated and type safe query builder that s tailored to your data prisma Prisma s command line interface CLI It allows you to initialize new project assets generate Prisma Client and analyze existing database structures through introspection to automatically create your application models Note Prisma works with both JavaScript and TypeScript However to get the best possible development experience using TypeScript is highly recommended Configuring the project to use PostgreSQLGo ahead and delete the prisma dev db file because we will be switching to PostgreSQL Next inside the prisma env file update the value of the DATABASE URL variable to the connection string you got in step The URL might look as follows prisma envpostgres postgres YOUR PASSWORD db vdbnhqozmlzdsaejdxwr supabase co postgresFinally inside your schema prisma file change the provider from sqlite to postgresql This is what your schema prisma file should look like datasource db provider postgresql url env DATABASE URL generator client provider prisma client js model Post id Int id default autoincrement title String content String published Boolean default false author User relation fields authorId references id authorId Int model User id Int id default autoincrement email String unique name String posts Post To test that everything works correctly run the following command prisma migrate dev name initYou can optionally give your migration a name depending on the changes you made Since this is the project s first migration you re setting the name flag to init If everything works correctly you should get the following message in your terminal Your database is now in sync with your schema Generated Prisma Client x x to node modules prisma client in msThis will create a prisma migrations folder inside your prisma directory and synchronize your Prisma schema with your database schema Note if you want to skip the process of creating a migration history you can use the db push command instead of migrate dev If you go to your Supabase project in the table editor you should see that two tables have been created a Post and a User table That s it You have now successfully connected a Prisma project to a PostgreSQL database hosted on Supabase and ran your first migration Connection pooling with SupabaseIf you re working in a serverless environment for example Node js functions hosted on AWS Lambda Vercel or Netlify Functions you need to set up connection pooling using a tool like PgBouncer That s because every function invocation may result in a new connection to the database Fortunately Supabase projects support connection management using PgBouncer and are enabled by default Go to the Database page from the sidebar and navigate to connection pool settingsWhen running migrations you need to use the non pooled connection URL like the one we used in step However when deploying your app you ll use the pooled connection URL and add the pgbouncer true flag to the PostgreSQL connection URL The URL might look as follows prisma envpostgres postgres YOUR PASSWORD db vdbnhqozmlzdsaejdxwr supabase co postgres pgbouncer truePrisma Migrate uses database transactions to check out the current state of the database and the migrations table However the Migration Engine is designed to use a single connection to the database and does not support connection pooling with PgBouncer If you attempt to run Prisma Migrate commands in any environment that uses PgBouncer for connection pooling you might see the following error Error undefined Database errorError querying the database db error ERROR prepared statement s already existsThis is a known issue and it is being worked on you can follow the progress on this GitHub issue If you want to learn more about Prisma check out the docs Also in case you have any questions or run into any issue feel free to start a discussion in the repo s discussions section 2021-06-11 20:13:04
Apple AppleInsider - Frontpage News Federal Circuit affirms decision to toss iPhone dual-camera patent lawsuit https://appleinsider.com/articles/21/06/11/federal-circuit-affirms-decision-to-toss-iphone-dual-camera-patent-lawsuit?utm_medium=rss Federal Circuit affirms decision to toss iPhone dual camera patent lawsuitThe U S Court of Appeals for the Federal Circuit on Friday affirmed a lower court decision to dismiss a lawsuit alleging that the dual camera setup of certain iPhone models infringed on existing patents Credit AppleInsiderThe lawsuit was filed in the U S District Court for the Northern District of California in and targeted both Apple and Samsung It named plaintiffs Yanbin Yu and Zhongxuan Zhang who alleged that Apple s dual camera iPhone solution infringed on an invention they developed in Read more 2021-06-11 20:53:10
Apple AppleInsider - Frontpage News 'iPad mini 6' renders show off slim bezels & lack of home button https://appleinsider.com/articles/21/06/11/ipad-mini-6-renders-show-off-slim-bezels-lack-of-home-button?utm_medium=rss x iPad mini x renders show off slim bezels amp lack of home buttonApple s next iPad mini has been rumored for some time to get a major redesign and one prominent leaker has created a set of renders based on alleged schematics and images of the device Credit FrontPageTechThe so called iPad mini will be overhauled to bring its design more in line with Apple s other square edged tablets On Friday FrontPageTech published renders of what the next mini Apple tablet could look like Read more 2021-06-11 20:12:51
Apple AppleInsider - Frontpage News Beats Studio Buds will launch on July 21, says leaker https://appleinsider.com/articles/21/06/11/beats-studio-buds-will-launch-on-july-21-says-leaker?utm_medium=rss Beats Studio Buds will launch on July says leakerApple s often leaked Beats Studio Buds are set to launch on July according to Jon Prosser Beats Studio Buds coming July The Beats Studio Buds have been seen in several athletes ears despite not being announced by Apple The new earbuds from Beats by Dre take on a tiny in ear design that lack a stem Read more 2021-06-11 20:22:32
Apple AppleInsider - Frontpage News Deals: $299 iPad, $599 M1 Mac mini are back https://appleinsider.com/articles/21/06/07/deals-299-ipad-599-m1-mac-mini-are-back-for-wwdc-2021?utm_medium=rss Deals iPad M Mac mini are backOn the heels of an exciting WWDC week Amazon has reissued some of its fan favorite Apple deals including the budget friendly inch iPad for and off the current M Mac mini Weekend Apple dealsAmazon s latest deals on current hardware are still in effect as WWDC closes Read more 2021-06-11 20:30:43
海外TECH Engadget House introduces five antitrust bills targeting Apple, Google, Facebook and Amazon https://www.engadget.com/house-five-antitrust-bills-apple-google-facebook-amazon-205114170.html?src=rss_b2c House introduces five antitrust bills targeting Apple Google Facebook and AmazonHouse lawmakers have introduced five new bills that would place significant limits on major tech companies including Apple Google Facebook and Amazon 2021-06-11 20:51:14
海外TECH Network World NetApp makes big hybrid-cloud push https://www.networkworld.com/article/3621739/netapp-makes-big-hybrid-cloud-push.html#tk.rss_all NetApp makes big hybrid cloud push NetApp is making a major effort to support hybrid cloud with a batch of software announcements around storage products converged infrastructure and cloud management services The main news was the release of the latest version of its flagship ONTAP software as well as updates to other products designed to help organizations build a better hybrid cloud strategies ONTAP is the operating system for NetApp s FAS hybrid flash disk and AFF all flash storage arrays The latest version adds automatic backup and tiering of on premises data to NetApp s StorageGRID object storage as well as to public clouds It enhances multilevel file security and remote access management supports continuous data availability for two times larger MetroCluster configurations and more replication options for backup and disaster recovery for large data containers for NAS workloads It can attain up to four times the performance for single LUN applications such as VMware datastores To read this article in full please click here 2021-06-11 20:12:00
海外科学 NYT > Science Biden Plans to Restore Protections to Tongass National Forest in Alaska https://www.nytimes.com/2021/06/11/climate/tongass-biden-climate.html forest 2021-06-11 20:48:01
ニュース BBC News - Home G7: Boris Johnson kicks off summit with plea to tackle inequality https://www.bbc.co.uk/news/uk-politics-57445184 joins 2021-06-11 20:05:41
ニュース BBC News - Home The Queen: ‘Are you supposed to be looking as if you’re enjoying yourself?’ https://www.bbc.co.uk/news/uk-57447066 family 2021-06-11 20:30:29
ニュース BBC News - Home Teen who filmed George Floyd murder given journalism award https://www.bbc.co.uk/news/world-us-canada-57449229 board 2021-06-11 20:45:45
ニュース BBC News - Home Turkey 0-3 Italy: The Azzurri start Euro 2020 with impressive win over Turkey https://www.bbc.co.uk/sport/football/51135482 Turkey Italy The Azzurri start Euro with impressive win over TurkeyEuro opens in spectacular fashion as Italy get their campaign off to a flying start in front of their own fans against Turkey 2021-06-11 20:52:31
ニュース BBC News - Home Euro 2020: Rate the players - Turkey v Italy https://www.bbc.co.uk/sport/football/51197437 italy 2021-06-11 20:02:49
ニュース BBC News - Home Euro 2020: Merih Demiral's own goal gives Italy the lead against Turkey https://www.bbc.co.uk/sport/av/football/57448567 olympico 2021-06-11 20:29:39
ビジネス ダイヤモンド・オンライン - 新着記事 定期保険&収入保障保険ランキング、「健康割引付き」商品がトップを独占 - 保険商品ランキング ベスト&ワースト https://diamond.jp/articles/-/272966 定期保険 2021-06-12 05:25:00
ビジネス ダイヤモンド・オンライン - 新着記事 日本女子プロゴルフ協会会長が女子ツアー「中央集権化」を熱烈に訴える理由 - ゴルフ大全 ビジネス×人脈×カネ https://diamond.jp/articles/-/272992 中央集権 2021-06-12 05:20:00
ビジネス ダイヤモンド・オンライン - 新着記事 部下の士気を上げたいリーダーが知っておくべき、「ストローク」とは? - 小宮一慶の週末経営塾 https://diamond.jp/articles/-/273775 小宮一慶 2021-06-12 05:15:00
ビジネス ダイヤモンド・オンライン - 新着記事 自動車保険ランキング、年齢・車種・免責金額別で主要商品を試算&徹底比較 - 保険商品ランキング ベスト&ワースト https://diamond.jp/articles/-/272965 損害保険 2021-06-12 05:12:00
ビジネス ダイヤモンド・オンライン - 新着記事 明治の菓子事業が「おうち時間増加」でも6%超減収した2つの理由 - ダイヤモンド 決算報 https://diamond.jp/articles/-/273774 上場企業 2021-06-12 05:10:00
ビジネス ダイヤモンド・オンライン - 新着記事 アラフォーおじさんがハマるスマホゲーム、ドラクエに通ずる醍醐味とは - 井の中の宴 武藤弘樹 https://diamond.jp/articles/-/273773 少年時代 2021-06-12 05:05:00
北海道 北海道新聞 黒人暴行死撮影の少女に特別賞 ピュリツァー賞、NYタイムズも https://www.hokkaido-np.co.jp/article/554705/ 黒人 2021-06-12 05:11:00
ビジネス 東洋経済オンライン 米韓首脳会談、韓国大統領の「自画自賛」は本物か 神田外語大・阪田恭代教授に聞く米中韓の今後 | 韓国・北朝鮮 | 東洋経済オンライン https://toyokeizai.net/articles/-/433677?utm_source=rss&utm_medium=http&utm_campaign=link_back 東洋経済オンライン 2021-06-12 05:30:00
GCP Cloud Blog Monitoring BigQuery reservations and slot utilization with INFORMATION_SCHEMA https://cloud.google.com/blog/topics/developers-practitioners/monitoring-bigquery-reservations-and-slot-utilization-information_schema/ Monitoring BigQuery reservations and slot utilization with INFORMATION SCHEMABigQuery Reservations help manage your BigQuery workloads With flat rate pricing you can purchase BigQuery slot commitments in slot increments in either flex monthly or yearly plans instead of paying for queries on demand You can then create manage buckets of slots called reservations and assign projects folders or organizations to use the slots in these reservations By default queries running in a reservation automatically use idle slots from other reservations In this way organizations have greater control over workload management in a way that ensures high priority jobs always have access to the resources they need without contention Currently two ways to monitor these reservations and slots are via the BigQuery Reservations UI or Cloud Monitoring But how does an organization know how many slots to delegate to a reservation Or if a reservation is being over or underutilized Or what the overall slot utilization is across all reservations In this blog post we will discuss how we used BigQuery s INFORMATION SCHEMA system tables to create the System Tables Reports Dashboard and answer these questions Using INFORMATION SCHEMA tablesThe INFORMATION SCHEMA metadata tables contain relevant granular information about jobs reservations capacity commitments and assignments Using the data from these tables users can create custom dashboards to report on the metrics they are interested in in ways that inform their decision making While there are several tables that make up INFORMATION SCHEMA there are a few that are specifically relevant to monitoring slot utilization across jobs and reservations The JOBS BY ORGANIZATION table is the primary table to extract job level data across all projects in the organization This information can be supplemented with data from the CAPACITY COMMITMENT CHANGES BY PROJECT RESERVATION CHANGES BY PROJECT and ASSIGNMENT CHANGES BY PROJECT tables to include details about specific capacity commitments reservations and assignments It s worth noting that the data retention period for INFORMATION SCHEMA is days and all timestamps are in UTC For information about the permissions required to query these tables follow the links above Monitoring with the System Tables Reports DashboardThe System Tables Reports Dashboard is a Data Studio dashboard that queries data from INFORMATION SCHEMA by using Data Studio s BigQuery connector Organizations can use this dashboard and or its underlying queries as is or as a starting point for more complex solutions in Data Studio or any other dashboarding tools Daily Utilization ReportThe Daily Utilization Report gives an overview of an organization s daily slot utilization measured in slot days The primary chart in the report is for overall slot utilization per day alongside the active capacity commitments for the organization This chart is ideal for gaining a high level understanding of how an organization s usage compares to the total number of slots it has committed to or purchased Click to enlargeThe query used to derive the average slot utilization is as follows Slot utilization is derived by dividing the total number of slot milliseconds total slot ms from INFORMATION SCHEMA JOBS BY ORGANIZATION consumed by all jobs on a given day by the number of milliseconds in a day This aggregate level computation provides the most accurate approximation of the overall slot utilization for a given day Note that this calculation is most accurate for organizations with consistent daily slot usage If an organization does not have consistent slot usage this number might be lower than expected For more information about calculating average slot utilization see our public documentation This report also includes charts that break down the utilization further by job type project id reservation id shown below user email and top usage click to enlargeHourly Utilization ReportThe Hourly Utilization Report is similar to the daily utilization report but gives an overview of an organization s hourly slot utilization measured in slot hours This report can help an organization understand their workloads at a more granular level in a way that helps with workload management Reservation Utilization ReportThe Reservation Utilization Report gives an overview of an organization s current assignments and reservation utilization in the last and days The current reservation assignments table displays details for the current assignments across an organization including the assignment type job type and reservation capacity Click to enlargeThe reservation utilization tables display information about the utilization of a given reservation in the last or days This includes average weekly or monthly slot utilization average reservation capacity current reservation capacity and average reservation utilization Average weekly and monthly utilization is derived using the same calculation as daily utilization but adjusted for a week or month accordingly  click to enlargeThese tables are great for understanding if an organization is making the most of its allocated reservations Reservations that are severely over or under utilized are colored in red while reservations that are close to utilization are colored in green That said because idle slot capacity is shared across reservations by default underutilized reservations do not necessarily indicate that slots are being wasted Instead the jobs in that reservation simply do not need as many slots reserved and those slots could be allocated to a different reservation Job Execution ReportThe Job Execution Report provides a per job breakdown of slot utilization among other job statistics The purpose of this report is to allow users to drill down into individual jobs or understand trends in a specific group of jobs Click to enlargeIn this report the average slot utilization is displayed on a per job level instead of an aggregate level This is calculated by dividing total slot ms for that job by the job s duration in milliseconds this can be computed by subtracting creation time from end time as seen in the following query Job Error ReportThe Job Error Report provides an overview of the types of errors encountered by jobs in the organization aggregated by project and error reason among other fields The INFORMATION SCHEMA tables provide detailed information about job level errors so depending on an organization s use case this report can be customized with more specific error reporting information Click to enlargeWhat s next To learn more about INFORMATION SCHEMA and the System Tables Reports Dashboard check out the videos in our Modernizing Data Lakes and Data Warehouses with GCP course on Coursera For more detailed information about each report the queries used and how to copy the dashboard for your own organization visit our Github Repository 2021-06-11 20:30:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)