python |
Pythonタグが付けられた新着投稿 - Qiita |
データエンジニア界隈で話題のdbt(data build tool)のまとめ |
https://qiita.com/manabian/items/67af7e4476d436aded77
|
シナリオ概要データ連携SQLとドキュメントの生成データ連携処理のSQLとドキュメントを生成。 |
2021-12-11 03:08:16 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
【ElementorPro】ハンバーガーメニューを「Lottie]でアニメーション化したい |
https://teratail.com/questions/373290?rss=all
|
ハンバーガーメニューを既存の≡から「LottieFiles」から無料ダウンロードできるアニメーション付きのハンバーガーメニューに変更したいと考えております。 |
2021-12-11 03:19:42 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
初歩的なクラスとインスタンスとメソッドの扱い方で沼った話 |
https://qiita.com/djen_tkgc/items/32e5aeb75c91cdf8bc80
|
先程のsayメソッドを呼び出す処理をメソッド化call別クラスからHumanクラスをインスタンス化callメソッドを呼び出すclassHumanbeforeputs今から喋りますsaydefsayputsこんにちはendafterdefcallputs今から喋りますsayenddefsayputsこんにちはendendclassMainhumanHumannewhumancallend以下実行結果rubyhumanrb今から喋りますこんにちはメソッド化する前は、sayメソッドを定義する前に同クラス内でsayメソッドを呼び出すとエラーになりました。 |
2021-12-11 03:17:37 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
改訂版・チェリー本発売記念企画のRubyプログラミング問題にチャレンジ! |
https://qiita.com/universato/items/b127d12d2a7494abcd0e
|
点字の情報はどのように持たせるかoooの文字列か、oooの配列か、の文字列か、の配列か、それとも進数bか色々な案を思い浮かべたものの、五十音ごとの点字のテーブルHashを作ることにしました。 |
2021-12-11 03:08:12 |
技術ブログ |
Developers.IO |
Log4jの脆弱性対策としてAWS WAFのマネージドルールに「Log4JRCE」が追加されました |
https://dev.classmethod.jp/articles/aws-waf-new-rule-log4jrce/
|
logjrce |
2021-12-10 18:32:00 |
海外TECH |
Ars Technica |
The Internet’s biggest players are all affected by critical Log4Shell 0-day |
https://arstechnica.com/?p=1819636
|
threat |
2021-12-10 18:44:13 |
海外TECH |
MakeUseOf |
6 Things You Should Never Post on LinkedIn |
https://www.makeuseof.com/things-to-never-post-on-linkedin/
|
certain |
2021-12-10 18:45:41 |
海外TECH |
MakeUseOf |
How to Use Nodes in DaVinci Resolve: A Tutorial for Beginners |
https://www.makeuseof.com/nodes-davinci-resolve-beginner-tutorial/
|
davinci |
2021-12-10 18:30:12 |
海外TECH |
MakeUseOf |
How to Turn Off Windows 11's Animation Effects to Improve Performance |
https://www.makeuseof.com/windows-11-turn-off-animation-effects/
|
How to Turn Off Windows x s Animation Effects to Improve PerformanceWindows s effects are really flashy but they can tank your performance on weaker PCs Here s how to disable Windows s animations |
2021-12-10 18:15:42 |
海外TECH |
DEV Community |
Fourth Hacktoberfest Contribution |
https://dev.to/derekjxy/fourth-hacktoberfest-contribution-3c8i
|
Fourth Hacktoberfest ContributionFor the last Hacktoberfest Contribution I have in here is about a program improvement IssueFor this program the issue that I interested in was helping the repository owner to add a Thai translation to the program My SolutionDue to the repository owner already provided a clear contribution instruction I just needed to follow the step they suggested However there was one thing the stopped me for a while And that was the language that I assigned was Thai which is a totally new language to me I don t speak Thai or understand Thai Therefore I need to get help from the Internet translation Because I would like use the global translation all the time I know that sometimes some translations just don t any sense to the original language speaker Then I just used two different translation application to help translate some English words to Thai words For each Thai translation I made I always compared two different results from two translation applications Moreover I used the words that translated from the translation applications to translate into my first language as well In this way I can make sure the Thai translation will make sense to any Thai people or people who speak Thai My FeelingsThis is an interesting experience for me Improving a program with the totally new language Thai is like an adventure to me Everything is new and I think this will be the same when it comes to the work in real life I have in the future Although this is not a complicated issue it gave me a new experience of working in a new state Link to the Repo I worked on pageliner |
2021-12-10 18:51:16 |
海外TECH |
DEV Community |
How to hydrate data from Stripe and Hubspot |
https://dev.to/canonic/how-to-hydrate-data-from-stripe-and-hubspot-1gf2
|
How to hydrate data from Stripe and HubspotWe often integrate our systems with external services to support some features Common example being using Stripe for handling payments using Hubspot as your CRM tool and the list can go on Naturally all of these services will have data points that you want to see at one place for better data visibility Let s see how we can connect with these external datasources and retrieve data from them in conjecture with your own platforms data We ll be building a simple dashboard to get and show your customers information from your Stripe and Hubspot accounts together with your own database s data Something like this So let s begin We ll be using React for building the frontend Bootstrap as our UI LibraryCanonic as a BackendGraphQL for fetching the data Step Create react appFirst thing first create a new react project using create react appnpx create react app customer informationYou ll have the basic project setup with the boilerplate code Step Add the dependencies Next go to your project folder on the terminal and add all the required dependencies yarn add react bootstrap bootstrap apollo client graphql We have the project setup and all the dependencies installed On the frontend our design will consist of A simple Header at the top A Table below displaying the data we are gonna get from our integrations A Footer at the bottom Step Build top level containersTo build the layout we defined above We ll use the following components from Bootstrap Navbar to build the top HeaderMiddle Container to hold our Table componentContainer to build the FooterGo to your App js file and remove the boilerplate code and add the following Import React and Bootstrap dependenciesimport React from react import Container Navbar from react bootstrap import bootstrap dist css bootstrap min css import App css function App return lt div className App gt Header lt Navbar className mb navbar custom variant dark sticky top gt lt Container gt lt Navbar Brand href home gt Customer Information lt Navbar Brand gt lt Container gt lt Navbar gt Middle Container to hold our Table lt Container gt Show Customer Information Here lt Container gt Footer lt Container className mt pb fw bolder gt Canonic Created by Canonic Inc lt Container gt lt div gt export default App Remove all the pre added css from your App css file and add the following code Changing the color of the Header navbar custom background color d After completion of the above steps when you run using yarn start the project should have something like this You can see we have our Header Middle Content and the Footer all in place Let s build our Table Component that will show the data from our backend and add it to our middle container ️ Step Setup Data StreamWe ll use some dummy data as a data source at first to feed into our table and then replace it with the actual data coming in from the API This way we ll be able to build our frontend properly and just have to replace the data coming into it without changing any of our frontend code This is how our data is gonna come in from the backend so we ll mock it Let s create a javascript file to hold it dummyData js at src export const dummyData customers hubspotCustomer properties email cras lorem aol ca company Thoughtbridge phone stripeCustomer address city Samos country ES line Ctra de Siles line postal code state LU balance name Lila Gonzalez hubspotCustomer properties email cras lorem aol ca company Thoughtbridge phone stripeCustomer address city Samos country ES line Ctra de Siles line postal code state LU balance name Lila Gonzalez We ll normalise this data in a way that we can feed into our Table To display any table you ll need two things Rows amp Columns Our columns will represent what type of information will be displayed For example Name Email Address etc Our rows will have the actual information for the respective columns For example John Doe johndoe gmail com etc Let s create a utility function that will normalise the above data Create a new file normaliseTableData js at src utils Gets all the columns that needs to be displayed along with the source from which they are being populated export const getColumns gt return name Stripe email Hubspot phone Hubspot company Hubspot address Stripe balance Stripe Maps in the data coming normalizes it and returns an array of rows according to the columns export const getRows customers gt return customers map customer gt const hubspotData customer hubspotCustomer properties const stripeData customer stripeCustomer return name stripeData name email hubspotData email phone hubspotData phone company hubspotData company address stripeData address line stripeData address city stripeData address country balance stripeData balance Step Create InformationTable ComponentWe ll create a component InformationTable at src components InformationTable Create the respective InformationTable js and index js files Your folder structure would look like this Add following code to your index js fileexport default from InformationTable Coming to our main InformationTable js file to build this component we ll be using the Table component from Bootstrap to quickly display the information we get We ll using the dummy data source set up to display and check if our UI is working properly before we integrate it with the backend lt thead gt element of bootstraps Table component sets up the columns We ll loop over the columns we are getting from our normalised data lt tbody gt element sets up the rows of the table So we ll loop over our rows here from our normalised data Import React and Bootstrap dependenciesimport React from react import Table from react bootstrap Import our util functionsimport getColumns getRows from utils normaliseTableData Dummy Data Sourceimport dummyData from dummyData const InformationTable gt const data dummyData const customers data const columns getColumns const rows getRows customers Getting class names according to the data source const className key gt return key Stripe bg primary bg warning text dark return Bootstraps Table Component lt Table responsive hover bordered gt lt thead gt lt tr gt lt th class align middle gt lt th gt Mapping over the columns and setting them up Object keys columns map keyName gt return lt th class text center align middle key keyName gt lt div gt keyName toUpperCase lt div gt Showing a bagde to see from where the data came from lt span className badge ml className columns keyName gt columns keyName lt span gt lt th gt lt tr gt lt thead gt lt tbody gt rows map customer index gt return lt tr key index gt lt td class align middle fw bolder font monospace gt index lt td gt Mapping over the rows and setting them up Object keys customer map keyName index gt return lt td class col align middle text center key index gt customer keyName N A lt td gt lt tr gt lt tbody gt lt Table gt export default InformationTable Our InformationTable component is ready let s add it to our layout s middle container to see how it looks Head back to App js import InformationTable amp update the lt Container gt element Import Information Tableimport InformationTable from components InformationTable InformationTable Middle Container to hold our Table lt Container gt lt InformationTable gt lt InformationTable gt lt Container gt Here s what it should look like after successful completion Step Setup BackendLet s head to Canonic and clone this template to get started It has same integrations for Stripe amp Hubspot added for you You can either Use this sample project to and continue orClone it replace the Stripe amp Hubspot credentials with yours and hit Deploy This will then use your data from the services to fetch You can see the GraphQL API Endpoint in the Docs Section of your project Step Configure GraphQLWe are using ApolloClient to connect with our backend through GraphQL Head to App js and Import the new dependenciesConfigure ApolloClientWrap our top component with ApolloProvider Import Apollo Dependenciesimport ApolloProvider InMemoryCache ApolloClient from apollo client import App css Connecting with the backend using apollo client const client new ApolloClient Make sure you update the URI here to point to your backend uri cache new InMemoryCache addTypename false Wrap our top component in ApolloProviderfunction App return lt ApolloProvider client client gt lt div className App gt lt div gt lt ApolloProvider gt Note Replace the uri with your GraphQL API Endpoint if you cloned and deployed your own project Step Configure Data QueryingAfter setting up our Client let s set up the query API Call that we are gonna make to our backend You can head to the docs section of your project and can copy it directly from there Let s create a javascript file to hold it queries js at src gql and add the following code to setup the query import gql from apollo client gql query to get customers information The query parameters we got straight from Canonic autogenerated documentation export const GET CUSTOMERS INFO gql query customers stripeCustomer address balance email name phone hubspotCustomer properties We stripped out the parameters whose information we don t need to display on our dashboard GraphQL let s you do that ️Step Let s Integrate Head to InformationTable js where we ll execute our above query to fetch data from the backend To do that Add the required dependencies that are needed to execute the queryExecute the query and replace the data coming from it with our dummyData Import Quering dependenciesimport useQuery from apollo client import GET CUSTOMERS INFO from gql queries const InformationTable gt const data dummyData const data loading useQuery GET CUSTOMERS INFO const customers data Here s what it should look like after successful completion We just replaced our dummyData with our actual data and the frontend worked like a charm Since the API Call is an asynchronous operation we show a loading indicator instead of our table at that time Let s add that and our project will be complete We ll be using the Spinner component from Bootstrap to show the loading indicator We ll show hide it on the basis of the loading variable that we get from our useQuery function It has the updated information wether the API call is still in the process or not Update the bootstrap dependenciesimport Table Spinner from react bootstrap const InformationTable gt const data loading useQuery GET CUSTOMERS INFO Show loading indicator is the API call is in progress if loading return lt div className d flex justify content center gt lt Spinner animation border gt lt div gt Here s what it should look like after when loading And with that we have successfully made the whole project end to end Congratulations Live LinkSample code on GitHub ConclusionHope this guide helped you gain better insight about creating a dashboard that fetches data from Stripe and Hubspot how you can structure it and how to quickly get a basic dashboard up and running You can also check out our other guides here Join us on discord to discuss or share with our community Write to us for any support requests at support canonic dev Check out our website to know more about Canonic |
2021-12-10 18:44:03 |
海外TECH |
DEV Community |
When to use multiple endpoints in GraphQL |
https://dev.to/logrocket/when-to-use-multiple-endpoints-in-graphql-5cl1
|
When to use multiple endpoints in GraphQLWritten by Leonardo Losoviz ️GraphQL is all about having a single endpoint to query the data but there are situations where it makes sense to instead have multiple endpoints where each custom endpoint exposes a customized schema This allows us to provide a distinct behavior for different users or applications by simply swapping the accessed endpoint Exposing multiple endpoints in GraphQL is not the same as implementing REST ーevery REST endpoint provides access to a predefined resource or set of resources But with multiple GraphQL endpoints each one will still provide access to all of the data from its schema enabling us to fetch exactly what we need This is still the normal GraphQL behavior but now gives us the ability to access the data from different schemas This capability is also different than schema stitching or federation which enable us to incorporate several sources of data into a single unified graph With multiple endpoints we are still dealing with multiple schemas Each schema can be accessed on its own and is independent of all others In contrast stitching and federation combine all the schemas into a bigger schema and the different schemas may need to be reconciled with one another e g by renaming types or fields in case of conflict Exposing different schemas can provide us access to multiple independent graphs GraphQL creator Lee Byron explains when this can be useful A good example of this might be if you ve company sic is centered around a product and has built a GraphQL API for that product and then decides to expand into a new business domain with a new product that doesn t relate to the original product It could be a burden for both of these unrelated products to share a single API and two separate endpoints with different schema may be more appropriate Another example is you may have a separate internal only endpoint that is a superset of your external GraphQL API Facebook uses this pattern and has two endpoints one internal and one external The internal one includes internal tools which can interact with product types In this article we will expand on each of these examples and explore several use cases where exposing multiple GraphQL endpoints makes sense How to expose multiple GraphQL endpointsBefore we explore the use cases let s review how the GraphQL server can expose multiple endpoints There are a few GraphQL servers that already ship with this feature PostGraphile s multiple schemas GraphQL NET s multi schema support GraphQL API for WordPress s custom endpointsIf the GraphQL server we are using doesn t provide multiple endpoints as an inbuilt feature we can attempt to code it in our application The idea is to define several GraphQL schemas and tell the server which one to use on runtime based on the requested endpoint When using a JavaScript server a convenient way to achieve this is with GraphQL Helix which decouples the handling of the HTTP request from the GraphQL server With Helix we can have the routing logic be handled by a Node js web framework such as Express js or Fastify and then ーdepending on the requested path i e the requested endpoint ーwe can provide the corresponding schema to the GraphQL server Let s convert Helix s basic example which is based on Express into a multi endpoint solution The following code handles the single endpoint graphql import express from express import schema from my awesome schema const app express app use express json app use graphql async res req gt app listen To handle multiple endpoints we can expose URLs with shape graphql customEndpoint and obtain the custom endpoint value via a route parameter Then based on the requested custom endpoint we identify the schema ーin this case from the endpoints graphql clients graphql providers and graphql internal import clientSchema from schemas clients import providerSchema from schemas providers import internalSchema from schemas internal app use graphql customEndpoint async res req gt let schema if req params customEndpoint clients schema clientSchema else if req params customEndpoint providers schema providerSchema else if req params customEndpoint internal schema internalSchema else throw new Error Non supported endpoint Once we have the schema we inject it into the GraphQL server as expected by Helix const request body req body headers req headers method req method query req query const query variables operationName getGraphQLParameters request const result await processRequest schema query variables operationName request if result type RESPONSE result headers forEach name value gt res setHeader name value res status result status res json result payload else Needless to say the different schemas can themselves share code so there is no need to duplicate logic when exposing common fields For instance graphql clients can expose a basic schema and export its elements File schemas clients tsexport const clientSchemaQueryFields export const clientSchema new GraphQLSchema query new GraphQLObjectType name Query fields clientSchemaQueryFields And these elements can be imported into the schema for graphql providers File schemas providers tsimport clientSchemaQueryFields from clients export const providerSchemaQueryFields export const providerSchema new GraphQLSchema query new GraphQLObjectType name Query fields clientSchemaQueryFields providerSchemaQueryFields Next let s explore the several use cases where multiple GraphQL endpoints can make sense We ll be looking at the following use cases Exposing the admin and public endpoints separately Restricting access to private information in a safer way Providing different behavior to different applications Generating a site in different languages Testing an upgraded schema before releasing for production Supporting the BfF approach Exposing the admin and public endpoints separatelyWhen we are using a single graph for all data in the company we can validate who has access to the different fields in our GraphQL schema by setting up access control policies For instance we can configure fields to be accessible only to logged in users via directive auth and to users with a certain role via an additional directive protect role EDITOR However this mechanism may be unsafe if the software has bugs or if the team is not always careful For instance if the developer forgets to add the directive to the field or adds it only for the DEV environment but not for PROD then the field will be accessible to everyone presenting a security risk If the field contains sensitive or confidential information ーespecially the kind that should under no circumstance be accessible to unintended actors ーthen we d rather not expose this field in a public schema in first place only in a private schema to which only the team has access This strategy will protect our private data from bugs and carelessness Hence we can create two separate schemas the Admin and Public schemas and expose them under endpoints graphql admin and graphql respectively Restricting access to private information in a safer wayThough we ll be looking at the example I described above this section can also be read as a generalization of it this can be regarded as applicable not just in public vs admin scenarios but in any situation in which a set of users must absolutely not be able to access information from another set of users For instance whenever we need to create customized schemas for our different clients we can expose a custom endpoint for each of them graphql some client graphql another client etc which can be safer than giving them access to the same unified schema and validating them via access control This is because we can easily validate access to these endpoints by IP address The code below expands on the previous example using Helix and Express to validate that the endpoint graphql star client can only be accessed from the client s specific IP address import starClientSchema from schemas star client Define the client s IPconst starClientIP app use graphql customEndpoint async res req gt let schema const ip req ip req headers x forwarded for req connection remoteAddress req socket remoteAddress req connection socket remoteAddress if req params customEndpoint star client if ip starClientIP throw new Error Invalid IP schema starClientSchema For your clients knowing that they can only access the endpoint with their data from their own IP address also gives them the reassurance that their data is well protected Providing different behavior to different applicationsWe can grant different behavior to the different applications that access the same data source For instance I ve noticed that Reddit produces different responses when accessed from a desktop browser than it does when accessed from a mobile browser From the desktop browser whether we are logged in or not we can directly visualize the content Accessing from mobile though we must be logged in to access the content and we re encouraged to use the app instead This different behavior could be provided by creating two schemas such as the Desktop and Mobile schemas and expose them under graphql desktop and graphql mobile respectively Generating a site in different languagesLet s say that we want to generate the same site in different languages If GraphQL is being used as the unique source of data such as when creating a static site with Gatsby then we can translate the data while it s in transit between the data source and the application As a matter of fact we do not really need multiple endpoints to achieve this goal For instance we can retrieve the language code from an environment variable LANGUAGE CODE inject this value into GraphQL variable lang and then translate the post s title and content fields via the field argument translateTo query GetTranslatedPost lang String post id title translateTo lang content translateTo lang However translation is a cross cutting concern for which using a directive may be more appropriate By using schema type directives the query can be oblivious that it will be translated post id title content Then the translation logic is applied on the schema via a translate directive added to the fields in the SDL directive translate translateTo String on FIELDtype Post title translate translateTo fr content translate translateTo fr Note that the directive argument translateTo is non mandatory so that when not provided it uses the default value set via environment variable LANGUAGE CODE Now that the language is injected into the schema we can create different schemas for different languages such as graphql en for English and graphql fr for French Finally we point to each of these endpoints in the application to produce the site in one language or another Testing an upgraded schema before releasing for productionIf we want to upgrade our GraphQL schema and have a set of users test it in advance we can expose this new schema via a graphql upcoming endpoint Even more we could also expose a graphql bleeding edge endpoint that keeps deploying the schema from DEV Supporting the BfF approachBackend for Frontends BfF for short is an approach for producing different APIs for different clients where each client owns its own API which allows it to produce the most optimal version based on its own requirements In this model a custom BfF is the middleman between backend services and its client This model can be satisfied in GraphQL by implementing all BfFs in a single GraphQL server with multiple endpoints with each endpoint tackling a specific BfF client such as graphql mobile and graphql web ConclusionGraphQL was born as an alternative to REST focused on retrieving data with no under or overfetching making it extremely efficient The way to accomplish this goal is by exposing a single endpoint to which we provide the query to fetch the data Exposing a single endpoint works well in most cases but may fall short whenever we need to produce completely different schemas that are customized to different clients or applications In this case exposing multiple endpoints at one endpoint per schema could be more appropriate In this article we explored different examples of when this makes sense and how to implement it Monitor failed and slow GraphQL requests in productionWhile GraphQL has some features for debugging requests and responses making sure GraphQL reliably serves resources to your production app is where things get tougher If you re interested in ensuring network requests to the backend or third party services are successful try LogRocket LogRocket is like a DVR for web apps recording literally everything that happens on your site Instead of guessing why problems happen you can aggregate and report on problematic GraphQL requests to quickly understand the root cause In addition you can track Apollo client state and inspect GraphQL queries key value pairs LogRocket instruments your app to record baseline performance timings such as page load time time to first byte slow network requests and also logs Redux NgRx and Vuex actions state Start monitoring for free |
2021-12-10 18:27:22 |
海外TECH |
DEV Community |
Five Free Resources to learn Blockchain in 2022 like a pro🚀 |
https://dev.to/vishal576/five-free-resources-to-learn-blockchain-in-2022-like-a-pro-1kmd
|
Five Free Resources to learn Blockchain in like a proEveryone is talking about blockchain web and Ethereum now days Blockchain is one the booming technology in and the market of blockchain is expected to grow by till this is the right time to learn blockchain and develop a very powerful and a modern skill There are many resources to learn blockchain on the internet but as a beginner we often get confused where to learn and what to learn So I have made your work easy by curating the best resources to learn blockchain and web in MIT OpenCourseWare Blockchain Playlist If your are person who like to know about blockchain in depth how it work what is the idea behind hashing and how blockchain is going to affect the economy I would highly recommend this playlist if u want to have a good in depth knowledge FreeCodeCamp Beginner to Expert Blockchain CourseThis is one of the best practical blockchain courses out there on YouTube The author of the course has very good teaching skills and its a pure to hero course This course is covered in Python best thing about this course is that if you are a complete beginner in programming you can take this course BuildSpaceBuildSpace is an online platform where you learn blockchain by actually making project and if you complete your project succesfully you will be rewarded in NFTs Its a must try DApp University DApp university is a YouTube channel which talks about NFT Blockchain in a very good manner They have several good videos on how to make your first Smart Contract and NFT All these Videos are beginner friendly The Owner of this channel do daily live stream on YouTube it can help you learn faster Moralis WebMoralis Web is a very creative YouTube channel they have done some really good project related to BlockChain If you are kind of person who like to do project based learning then this channel is highly recommended |
2021-12-10 18:15:37 |
海外TECH |
DEV Community |
How I built 4 blogs in 15 minutes |
https://dev.to/awwsmm/how-i-built-4-blogs-in-15-minutes-j8m
|
How I built blogs in minutes Static Site Generators SSGs are a quick and easy way to get a simple blog up and running in just a few minutes I ve been wanting to add some blogging functionality to my homepage awwsmm com for a while now but I ve been dragging my feet because it seems like a lot of work write blog posts in Markdownwrite some JavaScript to parse that markdown and render HTMLstyle everything etc Fortunately SSGs make things much simpler After some extensive research googling markdown javascript blog I discovered Jekyll and SSGs in general and decided to take a whack at getting a simple blog up and running using a few of the bigger ones Here are my initial thoughts Next jsNext js is a JavaScript framework built on top of React a JavaScript library for building user interfaces Next js can be used for building simple static sites as well as single page applications SPAs I followed this guide from the JetBrains team who make IntelliJ and PyCharm and was able to get the example app running in essentially a single command after updating npm npx create next app nextjs mdx blogHere is the result okay it s not too exciting but it works Next js had in my opinion the simplest and most straightforward setup of any of these four SSGs GatsbyGatsby is another React based SSG which also integrates GraphQL and Netlify as a CMS If any of that is confusing to you don t worry about it because that s all I ll say about it for now Gatsby claims to be able to give you super fast build times but this is probably a non issue for your static blog with a few dozen posts I followed Gatsby s own tutorial for getting a simple site set up and was able to get this beauty up and running in just a few minutesThe only major difference here was that I had to first install the Gatsby CLI via npm Certainly not a show stopper but it was an extra step relative to the Next js setup HugoHugo is different from the previous two SSGs in that it s not React based but written in Go Like Gatsby Hugo plays nicely with Netlify and also claims to be the fastest tool of its kind able to build pages in lt ms Hugo also have a how to guide on their website which was easy to follow and resulted in the following little blog in only a few commandsHugo also requires installing a command line tool this time via brew on macOS rather than via npm and additionally requires you to select a theme it doesn t provide a default one That tiny extra step gave me some errors because my brain is fried by the Internet and I literally cannot read two sentences ahead hugo server DStart building sites …hugo v extended darwin amd BuildDate unknownWARN found no layout file for HTML for kind section You should create a template file which matches Hugo Layouts Lookup Rules for this combination WARN found no layout file for HTML for kind home You should create a template file which matches Hugo Layouts Lookup Rules for this combination WARN found no layout file for HTML for kind taxonomy You should create a template file which matches Hugo Layouts Lookup Rules for this combination WARN found no layout file for HTML for kind page You should create a template file which matches Hugo Layouts Lookup Rules for this combination After I read those instructions though everything worked as expected JekyllFinally we get to Jekyll which started this whole adventure Jekyll is a Ruby based SSG and is the engine behind GitHub pages I had high hopes for Jekyll and started following their step by step tutorial here at the same time I was looking at the other SSGs above in parallel But Jekyll was the only SSG I had to google an error message for when getting started and it took about minutes longer than the others to get up and running mostly because of Ruby If you want to use Jekyll the first command you ll be given is a Ruby gem command gem install jekyll bundlerBefore you do that though make sure you re using Ruby and not Ruby ruby v badruby p revision fbdcadc x darwin ruby vruby p revision universal x darwin Why Jekyll chokes on Ruby with a cryptic error message bundle exec jekyll serveConfiguration file none Source Users andrew Git SSGs jekyll Destination Users andrew Git SSGs jekyll site Incremental build disabled Enable with incremental Generating done in seconds Auto regeneration enabled for Users andrew Git SSGs jekyll Jekyll Please append trace to the serve command for any additional information or backtrace usr local lib ruby gems gems jekyll lib jekyll commands serve servlet rb in require cannot load such file webrick LoadError from usr local lib ruby gems gems jekyll lib jekyll commands serve servlet rb in lt top required gt from usr local lib ruby gems gems jekyll lib jekyll commands serve rb in require relative from usr local lib ruby gems gems jekyll lib jekyll commands serve rb in setup But suppose we re on the correct version of Ruby Here s what I experienced next ruby vruby p revision universal x darwin bundle exec jekyll serveTraceback most recent call last from usr bin bundle in lt main gt from System Library Frameworks Ruby framework Versions usr lib ruby rubygems rb in activate bin path System Library Frameworks Ruby framework Versions usr lib ruby rubygems rb in find spec for exe Could not find bundler required by your Users andrew Git SSGs jekyll Gemfile lock Gem GemNotFoundException To update to the latest version installed on your system run bundle update bundler To install the missing version run gem install bundler Okay it looks like we need to update the bundler whatever that is bundle update bundlerYou must use Bundler or greater with this lockfile Okay Maybe it s missing gem install bundler Fetching bundler gemERROR While executing gem Gem FilePermissionError You don t have write permissions for the Library Ruby Gems directory Guh yeah sudo fine sudo gem install bundler Password Fetching bundler gemSuccessfully installed bundler Parsing documentation for bundler Installing ri documentation for bundler Done installing documentation for bundler after seconds gem installedNow can I update bundle update bundlerFetching gem metadata from Using bundler Following files may not be writable so sudo is needed Library Ruby Gems Library Ruby Gems build info Library Ruby Gems cache Library Ruby Gems doc Library Ruby Gems extensions Library Ruby Gems gems Library Ruby Gems specificationsFetching public suffix Fetching colorator Fetching concurrent ruby Fetching eventmachine Your user account isn t allowed to install to the system RubyGems You can cancel this installation and run bundle config set local path vendor bundle bundle install to install the gems into vendor bundle or you can enter your password and install the bundled gems to RubyGems using sudo Password Installing colorator Installing public suffix Installing eventmachine with native extensionsInstalling concurrent ruby Fetching http parser rb Installing http parser rb with native extensionsFetching ffi Installing ffi with native extensionsFetching forwardable extended Installing forwardable extended Fetching rb fsevent Installing rb fsevent Fetching rexml Installing rexml Fetching liquid Installing liquid Fetching mercenary Installing mercenary Fetching rouge Installing rouge Fetching safe yaml Installing safe yaml Fetching unicode display width Installing unicode display width Fetching addressable Installing addressable Fetching in Installing in Fetching pathutil Installing pathutil Fetching kramdown Installing kramdown Fetching terminal table Installing terminal table Fetching kramdown parser gfm Installing kramdown parser gfm Fetching sassc Fetching rb inotify Installing rb inotify Installing sassc with native extensionsFetching listen Installing listen Fetching jekyll watch Installing jekyll watch Fetching em websocket Installing em websocket Fetching jekyll sass converter Installing jekyll sass converter Fetching jekyll Installing jekyll Bundle updated Ten minutes later I can finally start my Jekyll site bundle exec jekyll serveConfiguration file none Source Users andrew Git SSGs jekyll Destination Users andrew Git SSGs jekyll site Incremental build disabled Enable with incremental Generating done in seconds Auto regeneration enabled for Users andrew Git SSGs jekyll Server address Server running press ctrl c to stop And here it is Sad trumpet noise doesn t really do this justice Oh and also ERROR favicon ico not found Cool ConclusionIn about minutes I was able to go from knowing absolutely nothing about these four static site generators to having four different blogs running on my local machine Of course there s much more work to be done in incorporating one of these into my site I m leaning toward Hugo or Next js at the moment and actually you know writing blog posts but those are for another day s of which was due to Jekyll aloneNote to the Jekyll team make this process a bit less bumpy for newbies |
2021-12-10 18:01:13 |
Apple |
AppleInsider - Frontpage News |
Best Buy's Flash Sale knocks up to $500 off Macs, OLED TVs, headphones, more |
https://appleinsider.com/articles/21/12/10/best-buys-flash-sale-knocks-up-to-500-off-macs-oled-tvs-headphones-more?utm_medium=rss
|
Best Buy x s Flash Sale knocks up to off Macs OLED TVs headphones moreGrabbing a last minute holiday gift is a cinch at Best Buy thanks to flash deals on Apple hardware TVs video games and more Many items are ready in one hour with store or curbside pickup Best Buy hour saleFrom the latest Macs to OLED TVs there are plenty of holiday deals to choose from during the hour Flash Sale We ve included a few top picks below but the entire selection of markdowns can be found here Read more |
2021-12-10 18:44:54 |
Apple |
AppleInsider - Frontpage News |
Apple issues second Release Candidate betas for macOS 12.1 & iOS 15.2 |
https://appleinsider.com/articles/21/12/10/apple-issues-second-release-candidate-betas-for-macos-121-ios-152?utm_medium=rss
|
Apple issues second Release Candidate betas for macOS amp iOS Apple has made available second macOS and iOS Release Candidate betas for developers and public testers Release Candidate for macOS now availableThe newest builds can be downloaded via the Apple Developer Center for those enrolled in the test program or via an over the air update on devices running the beta software The public version of these releases are also available via the Apple Beta Software Program website Read more |
2021-12-10 18:38:56 |
Apple |
AppleInsider - Frontpage News |
Apple TV+ commits to investing millions to make French shows |
https://appleinsider.com/articles/21/12/10/apple-tv-commits-to-investing-millions-to-make-french-shows?utm_medium=rss
|
Apple TV commits to investing millions to make French showsApple TV Netflix Amazon and Disney have together committed up to million per year to make shows in France ーand so comply with EU law The four streaming companies have signed an agreement with CSA the French broadcasting authority which will see each committing of their local annual revenues on French produced content It does not come from any rise in French television production but rather from a previously proposed requirement to meet a European Union requirement According to Variety Netflix alone is estimated to have agreed to invest million per annum The remaining amount up to million is coming from Apple TV Amazon and Disney Read more |
2021-12-10 18:32:22 |
Cisco |
Cisco Blog |
Kaleido Intelligence Recognizes Cisco’s Innovations in IoT Connectivity Management with #1 Champion Award |
https://blogs.cisco.com/sp/kaleido-intelligence-recognizes-ciscos-innovations-in-iot-connectivity-management-with-1-champion-award
|
Kaleido Intelligence Recognizes Cisco s Innovations in IoT Connectivity Management with Champion AwardKaleido Intelligence recently recognized Cisco s innovations and industry leadership in IoT Connectivity Management naming us the Champion in the market Read more about the IoT Connectivity market and Cisco s innovations with IoT Control Center including access to Kaleido s recent report |
2021-12-10 18:51:13 |
海外科学 |
NYT > Science |
What Happened When Philadelphia Mandated Covid Vaccines for Health Workers |
https://www.nytimes.com/2021/12/10/health/philadelphia-vaccine-mandate.html
|
What Happened When Philadelphia Mandated Covid Vaccines for Health WorkersFederal officials point to the city s mandate as a success story and a shield against new Covid outbreaks at hospitals and nursing homes |
2021-12-10 18:38:32 |
ニュース |
BBC News - Home |
PM's press chief Jack Doyle offered to quit over party, source say |
https://www.bbc.co.uk/news/uk-politics-59614235?at_medium=RSS&at_campaign=KARANGA
|
december |
2021-12-10 18:05:03 |
ニュース |
BBC News - Home |
The Monkees star Michael Nesmith dies at 78 |
https://www.bbc.co.uk/news/entertainment-arts-59606993?at_medium=RSS&at_campaign=KARANGA
|
sitcom |
2021-12-10 18:18:36 |
ニュース |
BBC News - Home |
Christmas: Downing Street lights accidentally switched on by MP |
https://www.bbc.co.uk/news/uk-wales-59615114?at_medium=RSS&at_campaign=KARANGA
|
christmas |
2021-12-10 18:45:17 |
ニュース |
BBC News - Home |
Heineken Champions Cup - all you need to know |
https://www.bbc.co.uk/sport/rugby-union/59610400?at_medium=RSS&at_campaign=KARANGA
|
competition |
2021-12-10 18:06:09 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
トイレに飾るだけで 運気が突然アップする開運絵馬 - 1日1分見るだけで願いが叶う!ふくふく開運絵馬 |
https://diamond.jp/articles/-/287113
|
トイレに飾るだけで運気が突然アップする開運絵馬日分見るだけで願いが叶うふくふく開運絵馬Amazonランキング第位祭祀・楽天ブックスランキング第位民俗・。 |
2021-12-11 03:52:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
なぜ、人は、ポルシェやロレックスを買うのか? 本能にぶっ刺さる17項目。 - コピーライティング技術大全 |
https://diamond.jp/articles/-/288650
|
なぜ、人は、ポルシェやロレックスを買うのか本能にぶっ刺さる項目。 |
2021-12-11 03:50:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
上司が積極的に自分の失敗を話すことで、 若手が自ら「やりたいです」と言えるようになる - 若手育成の教科書 |
https://diamond.jp/articles/-/289650
|
曽山哲人 |
2021-12-11 03:48:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
【9割の若手ビジネスマンが知らない】明日から試せるパワハラ上司への対抗策 - 真の「安定」を手に入れるシン・サラリーマン |
https://diamond.jp/articles/-/289023
|
【割の若手ビジネスマンが知らない】明日から試せるパワハラ上司への対抗策真の「安定」を手に入れるシン・サラリーマン異例の発売前重版仕事がデキない、忙しすぎる、上司のパワハラ、転職したい、夢がない、貯金がない、老後が不安…サラリーマンの悩み、この一冊ですべて解決これからのリーマンに必要なもの、結論、出世より「つの武器」リーマン力副業力マネー力。 |
2021-12-11 03:46:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「1億円が当たっても貧乏になる人」の脳内では何が起きている? - チームが自然に生まれ変わる |
https://diamond.jp/articles/-/288258
|
「億円が当たっても貧乏になる人」の脳内では何が起きているチームが自然に生まれ変わるリモートワーク、残業規制、パワハラ、多様性…リーダーの悩みは尽きない。 |
2021-12-11 03:44:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「買うべき株、買ってはいけない株」決定的な差 - 株トレ |
https://diamond.jp/articles/-/287449
|
買ってはいけない |
2021-12-11 03:42:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
左利きの「すごい直感」を磨くコツ - すごい左利き |
https://diamond.jp/articles/-/290245
|
『万人の脳を見た名医が教えるすごい左利き』では、数多くの脳を診断した世界で最初の脳内科医で、自身も左利きの加藤俊徳氏が、脳科学の視点からその才能のすべてを解き明かします。 |
2021-12-11 03:40:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
どんな人との約束も、違和感があればドタキャンしていい - 孤独からはじめよう |
https://diamond.jp/articles/-/290131
|
違和感 |
2021-12-11 03:38:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
話し手の心を開く会話のアイスブレイク、何がいい? - 行列のできるインタビュアーの聞く技術 |
https://diamond.jp/articles/-/289158
|
話し手 |
2021-12-11 03:36:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
就職したことがないのに株式投資で4.5億円! お金の価値が下がるのは宿命のようなもの - 賢明なる個人投資家への道 |
https://diamond.jp/articles/-/289290
|
就職したことがないのに株式投資で億円お金の価値が下がるのは宿命のようなもの賢明なる個人投資家への道中学年から株ひと筋で、株式投資歴年以上のベテラン専業投資家、かぶが『賢明なる個人投資家への道』を著した。 |
2021-12-11 03:34:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
お金持ちが決してやらないボーナス2つの使い道 - だから、この本。 |
https://diamond.jp/articles/-/289949
|
「一生、お金に困らない生活をするにはどうすれば良いのだろう」と。 |
2021-12-11 03:32:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「意思決定」が高速化する4大習慣【ジェフ・ベゾスが教える】 - Invent & Wander |
https://diamond.jp/articles/-/288477
|
inventampampwander |
2021-12-11 03:30:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
誰もが陥る「歴史の終わり錯覚」とは? 人生に役立つ「人間心理」の話 - サイコロジー・オブ・マネー |
https://diamond.jp/articles/-/288501
|
歴史の終わり |
2021-12-11 03:28:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「想い」は現実化する! - 精神科医Tomyが教える 1秒で悩みが吹き飛ぶ言葉 |
https://diamond.jp/articles/-/288517
|
voicy |
2021-12-11 03:26:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「苦しみから逃れるための考え方」ブッダのすごい教え - 人生の土台となる読書 |
https://diamond.jp/articles/-/290023
|
「苦しみから逃れるための考え方」ブッダのすごい教え人生の土台となる読書人間を苦しませるのは、自分が勝手に作り出した意味や物語だ。 |
2021-12-11 03:24:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
税務調査の嫌な質問「故人の最期を教えて」、その残酷な狙いとは? - ぶっちゃけ相続「手続大全」 |
https://diamond.jp/articles/-/290312
|
税務調査 |
2021-12-11 03:22:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「3日坊主」を繰り返すことで いつの間にか成功する 新発想のダイエットとは? - 3か月で自然に痩せていく仕組み |
https://diamond.jp/articles/-/289804
|
会食三昧なのに、このメソッドでキロも痩せた精神科医の樺沢紫苑先生が、「ストレスフリー我慢不要アウトプットレコーディングで痩せられる、脳科学的にも正しいメソッドです」と推薦する話題の書、「か月で自然に痩せていく仕組み意志力ゼロで体が変わる勤休ダイエットプログラム」野上浩一郎著から、そのコツや実践法を紹介していきます。 |
2021-12-11 03:20:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
直観力やひらめきの力が高まる 見えないものを見る力の伸ばし方 - どんな運も、思いのまま! 李家幽竹の風水大全 |
https://diamond.jp/articles/-/289276
|
直観力やひらめきの力が高まる見えないものを見る力の伸ばし方どんな運も、思いのまま李家幽竹の風水大全「どんな人でも運がよくなれる」、それが風水の持つ力です。 |
2021-12-11 03:18:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
脳機能を維持したい人に 認知症専門医がすすめる 「手のひら日光浴」とは? - 脳の毒を出す食事 |
https://diamond.jp/articles/-/289470
|
脳機能を維持したい人に認知症専門医がすすめる「手のひら日光浴」とは脳の毒を出す食事現代人の脳には“毒が溜まっている無意識に溜まった脳の“毒を出して脳がみるみる若返る食事法を紹介する脳の若返りと認知症治療の専門医・白澤卓二医師が提案する衝撃の最新刊『脳の毒を出す食事』では、現代人の脳に溜まった毒を出し、脳の機能を上げる食事法を紹介している。 |
2021-12-11 03:16:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
【強運な人は知っている】あなたの成功を邪魔する「最強の敵」と「成功への最短の道」の驚くほど意外な正解とは? - 龍神とつながる強運人生 |
https://diamond.jp/articles/-/289171
|
龍神 |
2021-12-11 03:14:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「がんばらなくていい時代がやってきている」。人気星読みヒーラーが語る、その理由とは? - 大丈夫じゃないのに大丈夫なふりをした |
https://diamond.jp/articles/-/289321
|
話題 |
2021-12-11 03:12:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
キャリア30年以上の精神科医が教える!「失敗を引きずってしまうとき」の対処法とは? - 「しなくていいこと」を決めると、人生が一気にラクになる |
https://diamond.jp/articles/-/290307
|
思い込み |
2021-12-11 03:10:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
文章がうまい人は「この言葉」を使わない - 短いは正義 |
https://diamond.jp/articles/-/289576
|
言葉 |
2021-12-11 03:08:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「自分は誰にも必要とされていない」病に効く特効薬 - 40歳からの予防医学 |
https://diamond.jp/articles/-/290325
|
予防医学 |
2021-12-11 03:06:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
カリスマ保育士てぃ先生の 子どもを怒鳴ってしまっても 自分を責めなくていい理由 - カリスマ保育士てぃ先生の子育て〇×図鑑 |
https://diamond.jp/articles/-/289568
|
カリスマ保育士てぃ先生の子どもを怒鳴ってしまっても自分を責めなくていい理由カリスマ保育士てぃ先生の子育て〇×図鑑【Twitterフォロワー数万人、YouTubeチャンネル登録数万人】と、今どきのママパパに圧倒的に支持されているカリスマ保育士・てぃ先生の子育てアドバイス本第弾『子どもが伸びるスゴ技大全カリスマ保育士てぃ先生の子育て×図鑑』ができました子育ての悩みは、決して親の能力や愛情の深さの問題ではなく、子ども特有の気持ちやものごとのとらえ方、体の状態を知るだけでうまくいくことが多いと、てぃ先生は教えてくれます。 |
2021-12-11 03:04:00 |
GCP |
Cloud Blog |
Google Cloud Spanner Dialect for SQLAlchemy |
https://cloud.google.com/blog/topics/developers-practitioners/google-cloud-spanner-dialect-sqlalchemy/
|
Google Cloud Spanner Dialect for SQLAlchemyWe re very excited to announce the general availability of the Google Cloud Spanner dialect that enables SQLAlchemy applications to take advantage of Cloud Spanner s scale strong consistency and up to availability SQLAlchemy is a Python SQL toolkit and Object Relational Mapper giving application developers the full power and flexibility of SQL Its object relational mapper ORM allows the object model and database schema to be developed in a cleanly decoupled way while also being transparent to the user about the underlying SQL and object relational details Here we ll show how you can get started with using the dialect and also highlight the supported Spanner specific features Set up the DialectTo set up the Cloud Spanner dialect for SQLAlchemy in your application install the package that is available through PyPI You may also install the dialect from source Set up Cloud SpannerBefore you begin using Cloud Spanner Follow the Set Up guide to configure a Cloud Project authentication and authorization Then create a Cloud Spanner instance and database following the Quickstart using the Cloud Console Quickstart applicationCreate an EngineFirst we create an Engine that can then be used to make a connection to a Cloud Spanner database We provide the Database URL as an input which has the format of spanner projects lt project id gt instances lt instance id gt databases lt database id gt Create tablesWe then create a MetaData object bound to the engine that can hold a collection of Table objects and their schemas We declare three tables representing Singers Albums and Tracks then call MetaData create all to create the tables Notice that we use two different approaches to defining relationships between tables Albums reference Singers using a foreign key constraint by including the SingerId in the Albums table This ensures that each Album references an existing Singer record and that a Singer cannot be deleted without also deleting all Albums of that Singer Tracks reference Albums by being interleaved in the parent Albums table configured with the spanner interleave in keyword argument This ensures that all Track records are stored physically together with the parent Album which makes accessing them together more efficient Setting spanner interleave on delete cascade ensures that when an Album is deleted the interleaved Tracks are also deleted We also call Table add is dependent on to ensure that the Albums table is created before the Tracks table Insert dataData can be inserted into the created tables by calling the Table insert method through Connection execute We use the uuid module to generate primary key fields to avoid creating monotonically increasing keys that may result in hotspots Query dataWe can then query the inserted data by running a select statement through Connection execute Migrate an existing databaseThe Cloud Spanner dialect for SQLAlchemy supports migrations through Alembic Note that a migration script can produce a lot of DDL statements and if each statement is executed separately the migration will be slow Therefore it is highly recommended that you use the Alembic batch context feature to pack DDL statements into groups of statements Best practicesFor optimal performance use explicit connections and reuse the connection across multiple queries It s also possible to use an implicit connection but this is not recommended as the dialect will then need to establish a new connection to the database for every Connection execute call Therefore avoid calls like the following FeaturesTransaction supportBy default a connection executes all transactions in ReadWrite mode But if the read only execution option is provided when creating a connection as in the following example then transactions can be executed in ReadOnly mode Isolation levelsThe dialect supports SERIALIZABLE and AUTOCOMMIT isolation levels SERIALIZABLE is the default isolation level and transactions need to be committed explicitly If the AUTOCOMMIT isolation level is selected then each statement will be committed automatically The isolation level can be set as follows Cloud Spanner featuresBesides interleaved tables and generated columns mentioned above the provider also supports the following Cloud Spanner features Query HintsCloud Spanner supports various statement hints and table hints which can be configured in the dialect through Query with hint This example shows how to set a table hint Stale ReadsCloud Spanner provides two read types By default all read only transactions will default to performing strong reads You can opt into performing a stale read when querying data by using an explicit timestamp bound as shown in this example Note that the connection must be a read only connection to perform a stale read Differences and limitationsUnique ConstraintsCloud Spanner doesn t support direct UNIQUE constraints creation In order to achieve column values uniqueness UNIQUE indexes should be used as shown in this example DDL in TransactionsCloud Spanner doesn t allow DDL statements to be executed in a transaction Therefore DDL statements will not be rolled back on transaction rollback Spanner MutationsThe dialect and the underlying DB API driver doesn t support mutations Therefore only DML statements can be used for executing updates Other Limitations WITH RECURSIVE statements and named schemas are not supported since Spanner doesn t support these features CREATE TEMPORARY TABLE is not supported since Spanner doesn t support this feature The scale and precision for numeric types are fixed as Spanner doesn t support arbitrary scale or precision in numeric types Getting involvedThe Cloud Spanner dialect for SQLAlchemy is an open source project on GitHub and we welcome contributions in the form of feedback or pull requests We would like to thank Skylar Pottinger Ilya Gurov Hemang Chothani Alex Vaksman and Knut Olav Løite for their work on this integration See AlsoCloud Spanner Python client library documentationCloud Spanner product documentationSQLAlchemy documentation |
2021-12-10 19:00:00 |
コメント
コメントを投稿