{"id":384,"date":"2024-03-01T08:55:00","date_gmt":"2024-03-01T13:55:00","guid":{"rendered":"https:\/\/www.sqltabletalk.com\/?p=384"},"modified":"2024-02-27T22:48:17","modified_gmt":"2024-02-28T03:48:17","slug":"automate-sql-server-data-insertion-powershell","status":"publish","type":"post","link":"https:\/\/www.sqltabletalk.com\/?p=384","title":{"rendered":"Automating Data Insertion into SQL Server with PowerShell"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>As we have seen in previous posts, PowerShell is a powerful scripting language that can automate a wide range of tasks, including database operations. In this post, we&#8217;ll demonstrate how to create a DataTable in PowerShell, populate it with random data, and then save that data into a table in SQL Server using SqlBulkCopy. We will first look at what is required for this task and then we\u2019ll script it out.<\/p>\n<h2>Steps for Data Manipulation and Insertion Using PowerShell<\/h2>\n<p>In the process of automating the task of data insertion into SQL Server using PowerShell, we will follow a structured approach. Here is a brief overview of the steps we will perform:<\/p>\n<ol>\n<li>Load the .NET Assembly: We will start by loading the necessary .NET assembly that provides us with the required classes for database operations.<\/li>\n<li>Create a DataTable Object: A DataTable object will be instantiated to mimic the structure of the SQL Server table where the data will be inserted.<\/li>\n<li>Define the Schema: We&#8217;ll define the columns of our DataTable, which should match the schema of the target SQL Server table.<\/li>\n<li>Generate Random Data: We&#8217;ll programmatically generate random data to populate our DataTable with rows that simulate the actual data.<\/li>\n<li>Establish a Database Connection: A connection to the SQL Server database will be established using the necessary credentials and connection string.<\/li>\n<li>Prepare for Bulk Insert: We will prepare a SqlBulkCopy object, which is optimized for bulk data operations and will handle the insertion of data from our DataTable to the SQL Server table.<\/li>\n<li>Execute the Bulk Insert: Finally, we will execute the bulk insert operation, transferring all the data from the DataTable to the SQL Server table in an efficient manner.<\/li>\n<\/ol>\n<p>Following this overview, we will dive into each step with detailed explanations and PowerShell commands, ensuring that you can replicate the process in your environment or adapt it according to your needs.<\/p>\n<h2>Step 1: Loading the ADO.NET Assembly<\/h2>\n<p>First, we need to load the necessary .NET assembly which allows us to work with databases:<\/p>\n<pre><code>Add-Type -AssemblyName \"System.Data\"\n<\/code><\/pre>\n<p>Add-Type is a PowerShell cmdlet used to load .NET assemblies into your session, which is necessary for accessing classes that interact with SQL Server.<\/p>\n<h2>Step 2: Creating the DataTable<\/h2>\n<p>With the assembly loaded, we can now create a DataTable object:<\/p>\n<pre><code>$dataTable = New-Object System.Data.DataTable\n<\/code><\/pre>\n<p>The New-Object cmdlet is used here to create an instance of the DataTable class. DataTable is an in-memory representation of a single database table.<\/p>\n<p>We then define the columns that our DataTable will have:<\/p>\n<pre><code>$dataTable.Columns.Add((New-Object System.Data.DataColumn 'ID',([int])))\n$dataTable.Columns.Add((New-Object System.Data.DataColumn 'Value',([string])))\n<\/code><\/pre>\n<p>Each DataColumn object represents a column in the table, where &#8216;ID&#8217; is of type int and &#8216;Value&#8217; is of type string.<\/p>\n<h2>Step 3: Populating the DataTable<\/h2>\n<p>Next, we populate the DataTable with random data:<\/p>\n<pre><code>$random = New-Object System.Random\nfor ($i = 1; $i -le 10; $i++) {\n    $row = $dataTable.NewRow()\n    $row['ID'] = $i\n    $row['Value'] = \"RandomValue_\" + $random.Next(1, 100)\n    $dataTable.Rows.Add($row)\n}\n<\/code><\/pre>\n<p>Here we&#8217;re using a for loop to create 10 rows of data. NewRow creates a new row that matches the schema of the DataTable. We fill the &#8216;ID&#8217; column with a sequential number and the &#8216;Value&#8217; column with a random number prefixed by a string.<\/p>\n<h2>Step 4: Establishing a SQL Server Connection<\/h2>\n<p>Now, we&#8217;ll establish a connection to the SQL Server:<\/p>\n<pre><code>$connectionString = \"Server=myServerName;Database=myDatabaseName;Integrated Security=True;\"\n$sqlConnection = New-Object System.Data.SqlClient.SqlConnection $connectionString\n<\/code><\/pre>\n<p>The connection string contains the information needed to connect to the database. Integrated Security=True is used for Windows Authentication. Replace myServerName and myDatabaseName with your server and database name.<\/p>\n<h2>Step 5: Using SqlBulkCopy to Insert Data<\/h2>\n<p>Finally, we use SqlBulkCopy to insert the data from our DataTable into the SQL Server table:<\/p>\n<pre><code>$sqlBulkCopy = New-Object System.Data.SqlClient.SqlBulkCopy($sqlConnection)\n$sqlBulkCopy.DestinationTableName = \"myTableName\"\n<\/code><\/pre>\n<p>SqlBulkCopy is a class that allows for efficient bulk operations. We specify the destination table name with $sqlBulkCopy.DestinationTableName.<\/p>\n<p>To execute the bulk copy:<\/p>\n<pre><code>try {\n    $sqlConnection.Open()\n    $sqlBulkCopy.WriteToServer($dataTable)\n    Write-Host \"Data has been successfully exported to SQL Server table.\"\n} catch {\n    Write-Host \"Error: $_\"\n} finally {\n    $sqlConnection.Close()\n}\n<\/code><\/pre>\n<p>We wrap our operations in a try\/catch\/finally block to handle any exceptions and ensure the connection is closed properly, whether the operation succeeds or fails.<\/p>\n<p>Before we execute the script we need to make sure our destination table exists. Here is how you&#8217;d create our sample table using TSQL:<\/p>\n<pre><code>CREATE TABLE myTableName (\n    ID int NOT NULL PRIMARY KEY,\n    Value nvarchar(255) NOT NULL\n)<\/code><\/pre>\n<p>The script is provided in its entirety below for your convenience:<\/p>\n<pre><code># Load ADO.NET assembly\nAdd-Type -AssemblyName \"System.Data\"\n\n# Create a DataTable\n$dataTable = New-Object System.Data.DataTable\n$dataTable.Columns.Add((New-Object System.Data.DataColumn 'ID',([int])))\n$dataTable.Columns.Add((New-Object System.Data.DataColumn 'Value',([string])))\n\n# Populate DataTable with random data\n$random = New-Object System.Random\nfor ($i = 1; $i -le 10; $i++) {\n    $row = $dataTable.NewRow()\n    $row['ID'] = $i\n    $row['Value'] = \"RandomValue_\" + $random.Next(1, 100)\n    $dataTable.Rows.Add($row)\n}\n\n# SQL Server connection string\n$connectionString = \"Server=myServerName;Database=myDatabaseName;Integrated Security=True;\"\n\n# Establish SQL Server connection\n$sqlConnection = New-Object System.Data.SqlClient.SqlConnection $connectionString\n\n# SQL Bulk Copy to insert data into the table\n$sqlBulkCopy = New-Object System.Data.SqlClient.SqlBulkCopy($sqlConnection)\n$sqlBulkCopy.DestinationTableName = \"myTableName\"\n\ntry {\n    # Open SQL Server connection\n    $sqlConnection.Open()\n\n    # Write from the source to the destination\n    $sqlBulkCopy.WriteToServer($dataTable)\n    Write-Host \"Data has been successfully exported to SQL Server table.\"\n}\ncatch {\n    Write-Host \"Error: $_\"\n}\nfinally {\n    # Close the SQL Server connection\n    $sqlConnection.Close()\n}<\/code><\/pre>\n<h2>Cmdlets and Classes Used<\/h2>\n<ul>\n<li><strong>Add-Type<\/strong>: Loads a .NET assembly into the PowerShell session.<\/li>\n<li><strong>New-Object<\/strong>: Instantiates a .NET class. Used to create the DataTable, DataColumn, SqlConnection, and SqlBulkCopy objects.<\/li>\n<li><strong>System.Data.DataTable<\/strong>: Represents one table of in-memory data.<\/li>\n<li><strong>System.Data.DataColumn<\/strong>: Defines the schema of a column in a DataTable.<\/li>\n<li><strong>System.Random<\/strong>: A .NET class that generates random numbers.<\/li>\n<li><strong>System.Data.SqlClient.SqlConnection<\/strong>: Establishes a connection to SQL Server.<\/li>\n<li><strong>System.Data.SqlClient.SqlBulkCopy<\/strong>: Allows for the bulk transfer of data into SQL Server.<\/li>\n<\/ul>\n<p>By understanding these concepts and cmdlets, you can manipulate data structures in PowerShell and interact with SQL Server to perform a variety of data operations, making your scripting tasks more efficient and powerful.<\/p>\n<h2>Conclusion<\/h2>\n<p>And that&#8217;s it! You&#8217;ve now learned how to create a DataTable in PowerShell, populate it with data, and insert that data into a SQL Server table with SqlBulkCopy. This process is particularly useful for automating the insertion of large volumes of data into a database, making your data processing tasks more efficient. We hope it also helps extend your understanding of PowerShell as well.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PowerShell is a powerful scripting language that can automate a wide range of tasks, including database operations. In this post, we&#8217;ll demonstrate how to create a DataTable in PowerShell, populate it with random data, and then save that data into a table in SQL Server using SqlBulkCopy. We will first look at what is required for this task and then we\u2019ll script it out.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[55,53,84,21],"tags":[93,57],"class_list":["post-384","post","type-post","status-publish","format-standard","hentry","category-automation","category-powershell","category-sql-developer","category-tutorial","tag-ado-net","tag-scripting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Automate SQL Server Data Insertion Effortlessly with PowerShell<\/title>\n<meta name=\"description\" content=\"Discover how to streamline your database workflows by automating data insertion into SQL Server using PowerShell. This guide covers creating DataTables, populating them with data, and utilizing SqlBulkCopy for efficient database updates.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqltabletalk.com\/?p=384\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Automate SQL Server Data Insertion Effortlessly with PowerShell\" \/>\n<meta property=\"og:description\" content=\"Discover how to streamline your database workflows by automating data insertion into SQL Server using PowerShell. This guide covers creating DataTables, populating them with data, and utilizing SqlBulkCopy for efficient database updates.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqltabletalk.com\/?p=384\" \/>\n<meta property=\"og:site_name\" content=\"SQL Table Talk\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-01T13:55:00+00:00\" \/>\n<meta name=\"author\" content=\"Stephen Planck\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Stephen Planck\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.sqltabletalk.com\/?p=384#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqltabletalk.com\/?p=384\"},\"author\":{\"name\":\"Stephen Planck\",\"@id\":\"https:\/\/www.sqltabletalk.com\/#\/schema\/person\/1947e42a9438bccd91691d8b791888e0\"},\"headline\":\"Automating Data Insertion into SQL Server with PowerShell\",\"datePublished\":\"2024-03-01T13:55:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.sqltabletalk.com\/?p=384\"},\"wordCount\":827,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.sqltabletalk.com\/#\/schema\/person\/1947e42a9438bccd91691d8b791888e0\"},\"keywords\":[\"ADO.NET\",\"scripting\"],\"articleSection\":[\"Automation\",\"PowerShell\",\"SQL Developer\",\"Tutorial\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.sqltabletalk.com\/?p=384#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqltabletalk.com\/?p=384\",\"url\":\"https:\/\/www.sqltabletalk.com\/?p=384\",\"name\":\"Automate SQL Server Data Insertion Effortlessly with PowerShell\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqltabletalk.com\/#website\"},\"datePublished\":\"2024-03-01T13:55:00+00:00\",\"description\":\"Discover how to streamline your database workflows by automating data insertion into SQL Server using PowerShell. This guide covers creating DataTables, populating them with data, and utilizing SqlBulkCopy for efficient database updates.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.sqltabletalk.com\/?p=384#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqltabletalk.com\/?p=384\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqltabletalk.com\/?p=384#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqltabletalk.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Automating Data Insertion into SQL Server with PowerShell\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqltabletalk.com\/#website\",\"url\":\"https:\/\/www.sqltabletalk.com\/\",\"name\":\"SQL Table Talk\",\"description\":\"Breaking Down SQL Server, One Post at a Time.\",\"publisher\":{\"@id\":\"https:\/\/www.sqltabletalk.com\/#\/schema\/person\/1947e42a9438bccd91691d8b791888e0\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqltabletalk.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.sqltabletalk.com\/#\/schema\/person\/1947e42a9438bccd91691d8b791888e0\",\"name\":\"Stephen Planck\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqltabletalk.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/64181114edc3de3d99072c049bcec024f025c9536dc89fc8ff1bac58976ca81e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/64181114edc3de3d99072c049bcec024f025c9536dc89fc8ff1bac58976ca81e?s=96&d=mm&r=g\",\"caption\":\"Stephen Planck\"},\"logo\":{\"@id\":\"https:\/\/www.sqltabletalk.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/dexterwiki.com\",\"https:\/\/www.linkedin.com\/in\/stephen-planck-4611b692?trk=people-guest_people_search-card&challengeId=AQErf8gbBmcVMwAAAYsyIsxO-0UvU8z7cHrBpZoo_n3xt9qEKpRN5B_jd_LmAMu-OfeArkQ7GDjobJ2uRoQQV35EQdh_rR6kxA&submissionId=09de7067-c335-8e17-40b8-8dc32b60ed6c&challengeSource=AgEcUCw35zpPmAAAAYsyI4vAWhJTV7Nt4vZYKc3V1qiDBpCkKgUvtlOBgYXcE84&challegeType=AgE_wZiTT09IAQAAAYsyI4vDmNvbZIYe6XHju5V2bXVvM3IVxnJslgY&memberId=AgESFTkUShzs_gAAAYsyI4vGYk0Gic1uc5kB6cKOABA26Gw&recognizeDevice=AgHdSZyUSI5CEwAAAYsyI4vKd_koF9JgpsCJShT8QfbK1QMiv8SI\",\"https:\/\/www.youtube.com\/linuxmate\"],\"url\":\"https:\/\/www.sqltabletalk.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Automate SQL Server Data Insertion Effortlessly with PowerShell","description":"Discover how to streamline your database workflows by automating data insertion into SQL Server using PowerShell. This guide covers creating DataTables, populating them with data, and utilizing SqlBulkCopy for efficient database updates.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqltabletalk.com\/?p=384","og_locale":"en_US","og_type":"article","og_title":"Automate SQL Server Data Insertion Effortlessly with PowerShell","og_description":"Discover how to streamline your database workflows by automating data insertion into SQL Server using PowerShell. This guide covers creating DataTables, populating them with data, and utilizing SqlBulkCopy for efficient database updates.","og_url":"https:\/\/www.sqltabletalk.com\/?p=384","og_site_name":"SQL Table Talk","article_published_time":"2024-03-01T13:55:00+00:00","author":"Stephen Planck","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Stephen Planck","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sqltabletalk.com\/?p=384#article","isPartOf":{"@id":"https:\/\/www.sqltabletalk.com\/?p=384"},"author":{"name":"Stephen Planck","@id":"https:\/\/www.sqltabletalk.com\/#\/schema\/person\/1947e42a9438bccd91691d8b791888e0"},"headline":"Automating Data Insertion into SQL Server with PowerShell","datePublished":"2024-03-01T13:55:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sqltabletalk.com\/?p=384"},"wordCount":827,"commentCount":0,"publisher":{"@id":"https:\/\/www.sqltabletalk.com\/#\/schema\/person\/1947e42a9438bccd91691d8b791888e0"},"keywords":["ADO.NET","scripting"],"articleSection":["Automation","PowerShell","SQL Developer","Tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.sqltabletalk.com\/?p=384#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.sqltabletalk.com\/?p=384","url":"https:\/\/www.sqltabletalk.com\/?p=384","name":"Automate SQL Server Data Insertion Effortlessly with PowerShell","isPartOf":{"@id":"https:\/\/www.sqltabletalk.com\/#website"},"datePublished":"2024-03-01T13:55:00+00:00","description":"Discover how to streamline your database workflows by automating data insertion into SQL Server using PowerShell. This guide covers creating DataTables, populating them with data, and utilizing SqlBulkCopy for efficient database updates.","breadcrumb":{"@id":"https:\/\/www.sqltabletalk.com\/?p=384#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqltabletalk.com\/?p=384"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqltabletalk.com\/?p=384#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqltabletalk.com\/"},{"@type":"ListItem","position":2,"name":"Automating Data Insertion into SQL Server with PowerShell"}]},{"@type":"WebSite","@id":"https:\/\/www.sqltabletalk.com\/#website","url":"https:\/\/www.sqltabletalk.com\/","name":"SQL Table Talk","description":"Breaking Down SQL Server, One Post at a Time.","publisher":{"@id":"https:\/\/www.sqltabletalk.com\/#\/schema\/person\/1947e42a9438bccd91691d8b791888e0"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqltabletalk.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.sqltabletalk.com\/#\/schema\/person\/1947e42a9438bccd91691d8b791888e0","name":"Stephen Planck","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqltabletalk.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/64181114edc3de3d99072c049bcec024f025c9536dc89fc8ff1bac58976ca81e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/64181114edc3de3d99072c049bcec024f025c9536dc89fc8ff1bac58976ca81e?s=96&d=mm&r=g","caption":"Stephen Planck"},"logo":{"@id":"https:\/\/www.sqltabletalk.com\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/dexterwiki.com","https:\/\/www.linkedin.com\/in\/stephen-planck-4611b692?trk=people-guest_people_search-card&challengeId=AQErf8gbBmcVMwAAAYsyIsxO-0UvU8z7cHrBpZoo_n3xt9qEKpRN5B_jd_LmAMu-OfeArkQ7GDjobJ2uRoQQV35EQdh_rR6kxA&submissionId=09de7067-c335-8e17-40b8-8dc32b60ed6c&challengeSource=AgEcUCw35zpPmAAAAYsyI4vAWhJTV7Nt4vZYKc3V1qiDBpCkKgUvtlOBgYXcE84&challegeType=AgE_wZiTT09IAQAAAYsyI4vDmNvbZIYe6XHju5V2bXVvM3IVxnJslgY&memberId=AgESFTkUShzs_gAAAYsyI4vGYk0Gic1uc5kB6cKOABA26Gw&recognizeDevice=AgHdSZyUSI5CEwAAAYsyI4vKd_koF9JgpsCJShT8QfbK1QMiv8SI","https:\/\/www.youtube.com\/linuxmate"],"url":"https:\/\/www.sqltabletalk.com\/?author=1"}]}},"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sqltabletalk.com\/index.php?rest_route=\/wp\/v2\/posts\/384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqltabletalk.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqltabletalk.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqltabletalk.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqltabletalk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=384"}],"version-history":[{"count":2,"href":"https:\/\/www.sqltabletalk.com\/index.php?rest_route=\/wp\/v2\/posts\/384\/revisions"}],"predecessor-version":[{"id":387,"href":"https:\/\/www.sqltabletalk.com\/index.php?rest_route=\/wp\/v2\/posts\/384\/revisions\/387"}],"wp:attachment":[{"href":"https:\/\/www.sqltabletalk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqltabletalk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqltabletalk.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}