teleren/devto huggingface dataset:
How to import json to SQL
Tags: json, sql, import, openjson
Published: 2022-10-31 21:24:57

---
title: How to import json to SQL
published: true
description: How to import json to SQL
tags: 'json, sql, import, openjson'
cover_image: 'https://raw.githubusercontent.com/campelo/documentation/master/posts/sql/assets/cover.png'
canonical_url: null
id: 1237631
---

###### :postbox: Contact :brazil: :us: :fr:

[Twitter](https://twitter.com/campelo87)
[LinkedIn](https://www.linkedin.com/in/flavio-campelo/?locale=en_US)

---

## Declaring a variable with json content

Json content:
```json
[
  {
    "name": "Flavio",
    "code": "FLA-1",
    "isDeleted": false
  },
  {
    "name": "Contoso",
    "code": "CON-1",
    "isDeleted": true
  }
]
```

```sql
-- SET JSON CONTENT TO A VARIABLE (@JSON)...
DECLARE @json NVARCHAR(max) = N'[
    {
      "name": "Flavio",
      "code": "FLA-1",
      "isDeleted": false
    },
    {
      "name": "Contoso",
      "code": "CON-1",
      "isDeleted": true
    }
  ]';
```

## Fill a temp table with json content

```sql
-- FILL #TEMP TABLE WITH JSON CONTENT...
SELECT firstName, code, IIF(isDeleted = 1, 0, 1) as active 
	INTO #temp
	FROM OPENJSON(@json)
WITH  (
        firstName	VARCHAR(50) '$.name', 
        code		VARCHAR(10) '$.code',
		isDeleted	BIT			'$.isDeleted'
    );
```

## Show items from temp table

```sql
-- SHOW ITEMS FROM #TEMP TABLE
SELECT * FROM #temp;
```

![img1](https://raw.githubusercontent.com/campelo/documentation/master/posts/sql/how-to-import-json-to-sql/assets/img1.png)

## If you need to drop temp table

```sql
-- REMOVE A #TEMP TABLE...
DROP TABLE #temp;
```

## Typos or suggestions?

If you've found a typo, a sentence that could be improved or anything else that should be updated on this blog post, you can access it through a git repository and make a pull request. If you feel comfortable with github, instead of posting a comment, please go directly to https://github.com/campelo/documentation and open a new pull request with your changes.
which were a strange blue, like that of toothpaste or laundry detergent?
Tags: javascript, react, devops, html
Published: 2022-11-01 08:26:35

As I explored farther, I began to see the glacier's arteries and veins, which were a strange blue, like that of toothpaste or laundry detergent. Water from [drift hunters](https://drifthunters2.io) sapphire ponds was bottled and it was icy and minerally. For a little while, the winds died down within this cocoon. When we returned over the lake and back down into the steppe, though, they sprang back to life with a roar.

El Calafate, where I was staying, and El Chaltén are the only two cities in this region of Argentine Patagonia (where I was headed). The resort town of El Calafate has been there for quite some time, perched on the edge of the small harbor of Bahia Redonda on Lago Argentino. There are chocolate manufacturers, barbeque restaurants, and gift stores selling bittersweet jams produced from the berries of the town's namesake plant that line its pine-shaded avenues, providing a welcome splash of green on the otherwise parched steppe.

To get to El Chaltén, the neighboring village, I had to drive four hours north over green plains mowed by skittish guanacos, the wild relatives of the llama. Only one roadhouse, La Leona, was found along the journey. It was located off of National Route 40. The American criminals Butch Cassidy and the Sundance Kid are said to have crashed there in 1905 after stealing a bank there. Over the next decades, La Leona was frequented by hikers looking to begin their ascents of the gnarled peaks seen in the distance, including Mount Fitz Roy. It wasn't until 2021 that El Chaltén, "Argentina's newest town," which had been a popular destination for hikers and climbers since the 1980s, could host a public cemetery.
Video: An Intro to AI Builder on Power Automate
Tags: development, video, aibuilder, flow
Published: 2022-11-10 20:07:14

---
title: Video: An Intro to AI Builder on Power Automate
published: true
date: 2022-11-01 14:30:00 UTC
tags: Development,Video,AIBuilder,flow
canonical_url: https://barretblake.dev/2022/11/video-an-intro-to-ai-builder-on-power-automate/?utm_source=rss&utm_medium=rss&utm_campaign=video-an-intro-to-ai-builder-on-power-automate
---

A new video this week. Bringing a quick introduction to the AI Builder feature on Power Automate.

<iframe title="A Quick Introduction to AI Builder On Power Automate" width="1200" height="675" src="https://www.youtube.com/embed/0b8nfyR0AKY?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

The post [Video: An Intro to AI Builder on Power Automate](https://barretblake.dev/2022/11/video-an-intro-to-ai-builder-on-power-automate/) first appeared on [Barret Codes](https://barretblake.dev).
Bitcoin Blockchain Bullshit?
Tags: watercooler, healthydebate, blockchain, bitcoin
Published: 2022-11-01 15:54:56

American Chopper Senior and Junior have strong opinions about BBB - Bitcoin, Blockchain and the Bullshit around it.

## Is Bitcoin a real currency?

_Image is too small to be readable? Click on it_

![](https://i.imgflip.com/6z403x.jpg)

*Background: people don't wake up every morning wondering if the euro or the dollar are up or down. Instead they try to produce things of value, and use a currency to exchange it against something else. The currency itself is not the end goal.*


## Blockchain over-engineering? 

_Image is too small to be readable? Click on it_

![bbb blockchain](https://user-images.githubusercontent.com/459464/199279500-79d3c4b2-b02a-4bf0-9dc7-a3a7e6cb1610.jpg)

See:

* [Merkle tree - Wikipedia](https://en.wikipedia.org/wiki/Merkle_tree)
* [Consensus (computer science) - Wikipedia](https://en.wikipedia.org/wiki/Consensus_(computer_science))

## Bad Central Banks?

![](https://i.imgflip.com/6z41a7.jpg)

See [Crypto-anarchism - Wikipedia](https://en.wikipedia.org/wiki/Crypto-anarchism)

## Burning precious limited resources?

![](https://i.imgflip.com/6z41lm.jpg)

* [Bitcoin energy consumption 2022 | Statista](https://www.statista.com/statistics/881541/bitcoin-energy-consumption-transaction-comparison-visa/)
* [Resource depletion - Wikipedia](https://en.wikipedia.org/wiki/Resource_depletion)
* [Climate change - Wikipedia](https://en.wikipedia.org/wiki/Climate_change)


## Bigger images please?

I'm a backend developer so I don't understand CSS and why the images are so small currently.

Here they are in full resolution

* [Bitcoin is not a real currency](https://imgflip.com/i/6z403x)
* [Why do you want to put everything on the blockchain?](https://imgflip.com/i/6z40gr)
* [Bad Central Banks?](https://imgflip.com/i/6z41a7)
* [The planet is burning](https://imgflip.com/i/6z40uw)
Monthly Challenge #1: Palindrome 🔤
Tags: python, challenge, beginners, codedex
Published: 2022-11-01 16:39:08

Welcome to Codédex's first ever Monthly Twitter Challenge! This one is created by our SWE Intern, @asiqurrahman. 🙌

{% embed https://twitter.com/codedex_io/status/1587072993448058883 %}

**Palindrome:** 

A word, sentence, or number that reads the same forward or backward (e.g., _racecar_, _civic_, and _121_).

**Challenge:**

Create a Python function that:

1. Takes in a string as a parameter.
2. Checks if it's a palindrome.
3. Returns `True` if it is or `False` if it's not.

**Requirements:**

- 📦 Don’t use any packages.
- 💬 Make sure to comment the code.

Post your program screenshot in the [Twitter thread](https://twitter.com/codedex_io/status/1587072993448058883). 

And we will pick a random winner by noon this Friday. The prize is a free [Codédex tee](https://codedex.myshopify.com) and bragging rights! 🏆

---

_**Update:**_

We have a winner to the Codédex Monthly Challenge: Palindrome! 🥁...

Congrats to Michael Gonzalez! 🇪🇨 

The reasons being:

- Solution covers string & number
- Good comments
- Good breakdown of the functions
- First to post bonus

Here's the solution: 

{% embed https://twitter.com/mgonzalez14291/status/1587105952607703040 %}
Port 5000 is already in use macOS Monterey
Tags: macos, docker
Published: 2022-11-01 20:10:32

<!-- wp:paragraph -->
<p>After an update on my laptop, I got an issue. I have started the Docker container, but it fails. The port 5000 is already in use. Hmm, maybe another container took it. Ah, Airplay took it... Did you get the same issue? Let's fix it. </p>
<!-- /wp:paragraph -->

<!-- wp:more -->
<!--more-->
<!-- /wp:more -->

<!-- wp:paragraph -->
<p>A long time ago, I started using 5000 ports for my projects. Usually, it is a web service. This is useful because you can't run many services on port 80. With port 5000, I can run containers with a web server, for example, on 5000, 5001, 5002, etc. This is easy to remember a thing. I started using it after some Flask (Python Framework) experience. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>So, I started another container and got an error "Port 5000 is already in use". I checked my compose file and open ports and didn't understand the issue. After some research, I remembered about OS updates. Okay, catch you! </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In macOS Monterey, Apple added the ability to use your Mac as an AirPlay device. For example, you can stream something from your iPhone to your MacBook. </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Solution</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Solution #1: This is stupid, but you could use a lot of other ports. For example, not I am using 6000 and other similar ports instead of 5000. Pros of this way are that you get AirPlay enabled on your Mac. There are a lot of open ports, but 5000 was like a habit (not a hobbit). </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Solution #2: You could disable AirPlay. Go to System Preferences - Sharing. At the bottom, you will see the checkbox AirPlay Receiver. Disable it to make the port open.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":2619,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://jakeroid.com/wp-content/uploads/2022/06/image-1024x844.png" alt="Port 5000 is already in use in macOS Monterey" class="wp-image-2619"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>I prefer the first way because using AirPlay on my MacBook could be useful. Anyway, it's good to have a choice. I hope this small note was helpful to you. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>By the way, I made a small note about <a href="https://jakeroid.com/blog/how-to-remove-skype-icon-from-menu-bar/">how to remove the Skype icon from menubar on macOS</a>. Would you like to check it? </p>
<!-- /wp:paragraph -->
CSS: Color Values
Tags: tutorial, beginners, css, webdev
Published: 2020-04-25 20:43:27

Colour is an integral part of designing a website. Proper colour usage makes a user's experience grow!

## Named colours

CSS has provided us with named colours. There are plenty of these and they can be used by simply using their names.

```css
div {
  color: red;
  background-color: violet;
  border-color: black;
}
```

Here's a list of them: [CSS Named Colours](http://www.colors.commutercreative.com/grid/)

# Hex Values

Hex values are probably the most common colour format you've seen. The hex value starts off with a hash symbol (`#`) followed by 6 characters each ranging from `0` to `F`. Each pair corresponds to the intensity of red, green, or blue.

![Color Hex Value structure](https://dev-to-uploads.s3.amazonaws.com/i/m274zhj87xk6vabjcw1l.png)

```css
div {
  color: #FF0000; /* Red */
  background-color: #FF00FF; /* Violet */
  border-color: #000000; /* Black */
}
```

# `rgb`

The RGB value is similar to hex values. Where you specify the intensity of the red, green, and blue to create a colour. The main difference, aside from structure, is it goes from `0` to `255`.

![Color RGB Value example](https://dev-to-uploads.s3.amazonaws.com/i/bfx93jfwwupyvxlt5vux.png)

```css
div {
  color: rgb(255, 0, 0); /* Red */
  background-color: rgb(255, 0, 255); /* Violet */
  border-color: rgb(0, 0, 0); /* Black */
}
```

# `rgba`

RGBA is exactly the same as RGB but you can now specify the opacity of the colour where `0` is transparent and `1` is fully opaque.

![Color RGBA Value example](https://dev-to-uploads.s3.amazonaws.com/i/tedbpzuax25kgr3uwu31.png)

```css
div {
  color: rgba(255, 0, 0, 1); /* Red fully opaque */
  background-color: rgba(255, 0, 255, 0.5); /* Violet 50% transparent */
  border-color: rgba(0, 0, 0, 0); /* Black fully transparent */
}
```

# `hsl`

HSL stands for hue, saturation and lightness. This is typically the least popular way to add colour as it's difficult to understand.

**Hue**[`0-360`]: The angle of where your target colour is in a colour wheel.
**Saturation**[`0%-100%`]: The amount of saturation
**Lightness**[`0%-100%`]: The amount of brightness

![Color HSL Value example](https://dev-to-uploads.s3.amazonaws.com/i/f99as2bsyh9fr9fxhsjm.png)

```css
div {
  color: hsl(300, 100%, 50%); /* Red */
  background-color: hsl(354, 100%, 50%); /* Violet */
  border-color: hsl(0, 0%, 0%); /* Black */
}
```

# `hsla`

HSLA now adds opacity to the regular HSL where `0` is fully transparent and `1` is fully opaque.

![Color HSLA Value example](https://dev-to-uploads.s3.amazonaws.com/i/xh5gap5elflk3mo3opdf.png)

```css
div {
  color: hsla(300, 100%, 50%, 1); /* Red fully opaque */
  background-color: hsla(354, 100%, 50%, 0.5); /* Violet 50% transparent */
  border-color: hsl(0, 0%, 0%, 0); /* Black fully transparent */
}
```
03.01 - State & Props - Send counter data to child component (class components)
Tags: webdev, javascript, react, tutorial
Published: 2022-11-04 22:29:06

App preview:
![The way the app will look like](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3cezuqd3stgc8ox4vb1f.gif)


Project files:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/atdz8zex1dworkrocb3k.png)



<hr/>
src/App.js
```react
import React from "react";
import './App.css';
import ParentComponent from "./components/ParentComponent";

class App extends React.Component{

  render(){
    return(
      <div className="App">
        <h1>App.js</h1>
        <ParentComponent/>
      </div>
    )
  }
}

export default App;
```
<hr/>
src/App.css
```css
.App{
  background-color: lightskyblue;
  padding: 15px 10px;
}

h1, h2, h3{
  margin-top: 0px; 
  margin-bottom: 6px;
  padding-top: 0px;
  padding-bottom: 0px;

}
```
<hr/>
<hr/>
src/components/ParentComponent.jsx
```react
import React from "react";
import ChildComponent from "./ChildComponent"
import "./ParentComponent.css"

class ParentComponent extends React.Component{
    constructor(){
        super();
        this.state = {
            count: 0
        }
    }

    handleClick = () => {
        this.setState((prevState)=>({count: prevState.count+1}))
    }

    render(){
        return(
            <div className="ParentComponent">
                <h2>ParentComponent.jsx</h2>
                <button onClick={()=>{this.handleClick()}}>Click me</button>
                <br/><br/>
                <ChildComponent count={this.state.count}/>
            </div>
        )
    }
}

export default ParentComponent;
```
<hr/>
src/components/ParentComponent.css
```css
.ParentComponent{
    background-color: lightcoral;
    padding: 15px 10px;
  }
```
<hr/>
<hr/>
src/components/ChildComponent.jsx
```react
import React from "react";
import "./ChildComponent.css"

class ChildComponent extends React.Component{
    render(){
        const {count} = this.props;

        return(
            <div className="ChildComponent">
                <h3>ChildComponent.jsx</h3>
                <p>The value of count is {count}.</p>
            </div>
        )
    }
}

export default ChildComponent;
```
<hr/>
src/components/ChildComponent.css
```css
.ChildComponent {
    background-color: lightgreen;
    padding: 15px 10px;
}
```
Simple steps to start a $5,000/month YouTube channel - Adam_DelDuca
Tags: productivity, youtube, career
Published: 2022-11-08 10:55:28

####   Original Tweet From  [@Adam_DelDuca](https://twitter.com/Adam_DelDuca)
{% embed https://twitter.com/Adam_DelDuca/status/1585962781945495552 %}



###1|. Pick the right niche

The right niche on YouTube leads to:
- Fast growth
- High income

The wrong niche on YouTube leads to:
- Frustration
- Financial struggles

How do you pick the right niche?

Let me explain… 
AdSpace Here!!
Your niche requires two elements:
1. Your interest
2. Viewer interest

When both parties are engaged, views and growth will be inevitable

Here are some in-demand niches for 2023: ![Twitter Image 0](https://pbs.twimg.com/media/FgJ4KhRX0AA9WZJ.png) 

###2|. Emulate success

There are two ways to generate video ideas on YouTube:
1. Make content you think will work
2. Make content you know will work

Choosing the second option is the faster path to success
AdSpace Here!!
Let’s get into two ways to use this approach… 

1|. Sort creators videos by most popular and re-create them

Add in your own personal takes

2|. Find “crack” videos where views &gt; subscribers

Cracks are videos that outperformed the creators subscriber base

They make for great videos to emulate and here’s an example: ![Twitter Image 1](https://pbs.twimg.com/media/FgJ4ag7XkAYfexB.png) 

###3|. Structure your videos

Your videos should have the following structure:
1. Hook
2. Intro
3. Body
4. Conclusion

Pro Tip: Transition viewers from one videos to another in the end screens to drive up session and watch time 

###4|. Maximize clicks

The only way your channel will grow is by getting views

To get views, you need to maximize your clickthrough rate (CTR)

This comes from mastering titling and thumbnails

Next are a few tips that can get you more views right away… 

Titles:
- Keep them short (&lt;50 characters)
- Prompt intrigue
- Sell an outcome

Thumbnails:
- Use contrasting colors
- Complement title

Pro tip: use colors in thumbnails different than those you see on the side bar to stand out 
AdSpace Here!!
###5|. Monetize efficiently

Most YouTube channels make next to no money

Why?

Because they solely rely on ad revenue

This is a mistake…

Let me share the stark difference between poor and strong monetization… 

Ad revenue:
10,000 monthly views x $10 RPM = $100

Affiliate offer:
10,000 monthly views x 2% conversion x $10 commission = $2,000

Same traffic but 20x the income

Do not make this mistake on your channel… 

Start building your own $5,000/mo YouTube channel
AdSpace Here!!
Get my guide Tube Ignite (25% off next 5 copies ONLY):  [https://adamdelduca.gumroad.com/l/tubeignite/25off](https://adamdelduca.gumroad.com/l/tubeignite/25off)

If you enjoyed this thread, please RT the first tweet
AdSpace Here!!
Follow me for more YouTube wisdom: 
[@Adam_DelDuca](https://twitter.com/Adam_DelDuca) 



Click [Here](https://www.knowledge-twitter.com/?utm_source=dev.to)  For More Posts Like This [https://www.knowledge-twitter.com](https://www.knowledge-twitter.com/?utm_source=dev.to)
why AWS is best in 2022 ?
Tags: aws, cloud, beginners, devops
Published: 2022-11-04 07:56:05

AWS is the leading provider for cloud computing. It provides a set of services that allow users to store, manage, and analyze data in several geographically distributed locations.

AWS was first launched in 2006 as an alternative to Microsoft's Windows Azure. AWS has grown rapidly since then, and now serves as an important part of many businesses' IT architecture.

The main benefits of using AWS are:

* Scalability: AWS offers a large number of servers that are ready to be used by customers. This allows you to scale up or down according to your needs without having to worry about how many servers you will need at any given time.

* Flexibility: You can choose from different types of software like Linux and Windows so that you can run whatever application you want on your infrastructure without worrying about compatibility issues between different platforms.

* Cost-effectiveness: The cost per hour is much lower than other options available on the market today such as Microsoft Azure, Google Cloud Platform (GCP), and IBM Bluemix which offer similar features but at higher prices per hour basis compared with AWS pricing scheme which makes it an attractive choice for businesses who want lower costs while still retaining some flexibility in terms.
New era: The Official Site
Tags: showdev, webdev, web3, career
Published: 2022-11-04 14:30:44

Finally, the fabled day has come. The genesis of a new world order. One were platforms are linked, communication is efficient and everything is connected. 

I have finally completed my portfolio site. Follow the link to check it out. Please and Thank you

https://lithimgwebi.vercel.app/
What was your win this week?
Tags: discuss, weeklyretro
Published: 2022-11-04 16:16:05

Hey folks! 👋

Hope everybody is having a fantastic Friday and that you all have wonderful weekends!

Looking back on this past week, what was something you were proud of accomplishing?

All wins count — big or small 🎉

Examples of 'wins' include:

- Starting a new project
- Fixing a tricky bug
- Raking the lawn 🍂

---

Time to dive into the weekend! 

![slow motion shot of a golden retriever jumping into a pile of leaves](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3hy65tm1hmw65uj2qwtj.gif)
Day 01 - 100DayOfCode Challenge
Tags: 100daysofcode, highnitin, webdev, javascript
Published: 2022-11-04 16:25:00

Shit!!! 👻

I recently started the #100DaysofCode challenge. Every few days I take a piece of code and write about it to improve my programming skills and to assess my knowledge. 😀

And Jayesh, thanks for sharing your story and preaching about learning on a daily basis, and that's why I commit to #100DaysofArticleReading + #100DaysofNewsletterReading. 📑

I just read two amazing articles that I can't help but share with my connections all right away. In this post I will briefly explain what these two articles are about. 📑

Article 1 is about - 11 Amazing New JavaScript Features in ES13, which includes:
1. Class Field Declarations,
2. Private Methods and Fields
3. await Operator at the Top Level
4. Static Class Fields and Static Private Methods
5. Class Static Block
6. Ergonomic Brand Checks for Private Fields
7. at() Method for Indexing
8. RegExp Match Indices
9. Object.hasOwn() Method
10. Error Cause
11. Array Find from Last

Article 2 is about - How to design good APIs? which includes:
1. What is API?
2. API Design Goals
3. API Design in Practice
4. Side Effects
5. Handling Large Response
6. Consistency v/s Availability

So we have looked at the latest features that ECMAScript 2022 i.e. ES13 brings to JavaScript. Please use them to increase your productivity as a developer and write cleaner code with more brevity and clarity.

I want to learn and share with you folks ;) I want to get updates from you and also support your challenges daily. Any feedback is always appreciated.

Buckle up! We have a full year of coding ahead of us. See you on the next post :)

For Video explanation - https://www.youtube.com/watch?v=ri-OtBDcq44

------------------------------------------------------------------

Article Link:

1. https://medium.com/@interviewready/how-to-design-good-apis-ccd875590599

2. https://javascript.plainenglish.io/es13-javascript-features-eed7ed2f1497

------------------------------------------------------------------

Cheers,
HighNitin
Alternative Data
Tags: data, nubela
Published: 2022-11-04 17:11:46

Hey,
Recently I visited [Proxycurl](https://nubela.co/blog/the-ultimate-guide-to-alternative-data-what-is-it-really/) and got some information about Alternative Data. 
There's a lot of talk these days about "big data" and the insights that can be gleaned from large data sets. But what about "alternative data"?
I blogged about that here [https://hulkhack.blogspot.com/2022/11/alternative-data.html](https://hulkhack.blogspot.com/2022/11/alternative-data.html)
Found that [ProxyCurl](https://nubela.co/proxycurl/solutions/alternative-data-for-investment-firms) is the best place for alternative data.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cv5e5y1mfb0qgc5pr7yn.png)