lorint / adventureworks-for-postgres Goto Github PK
View Code? Open in Web Editor NEWSet up the AdventureWorks sample database for use with Postgres
License: MIT License
Set up the AdventureWorks sample database for use with Postgres
License: MIT License
Not a bug, but a tip of the hat to @lorint :
I was looking for a sizeable database on Postgres when I ran into this
Pretty familiar with Adventureworks, having been on the same journey as you many moons ago.
The installation was flawless, instructions were clear, and overall, I loved the way this has been set up.
Thank you for this - on behalf of all the members who have used it (albeit silently)
Thank you for bringing this great data set to Postgres!
I created a docker image using your instructions, but it failed.
The fix was rather simple and is in the pull request I just created.
The docker image is also publicly available on Docker hub as:
heimirthor/adventureworksforpostgres_db
so anybody can pull it down
with something like:
docker pull heimirthor/adventureworksforpostgres_db
if they don't want to do any manual building.
I am unable to run install.sql through Query editor in PGAdmin III. its giving multiple error. Or can you pls suggest how else we can run this file.
PS: I am trying this in Windows 7 desktop.
Hi @lorint ,
Thanks for your code repo.
I am using OS as windows 10 - 64 bit and docker desktop .Below is my docker info details from PowerShell by decker version
Client:
Cloud integration: v1.0.35+desktop.4
Version: 24.0.6
API version: 1.43
Go version: go1.20.7
Git commit: ed223bc
Built: Mon Sep 4 12:32:48 2023
OS/Arch: windows/amd64
Context: default
Server: Docker Desktop 4.23.0 (120376)
Engine:
Version: 24.0.6
API version: 1.43 (minimum version 1.12)
Go version: go1.20.7
Git commit: 1a79695
Built: Mon Sep 4 12:32:16 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.22
GitCommit: 8165feabfdfe38c65b599c4993d227328c231fca
runc:
Version: 1.1.8
GitCommit: v1.1.8-0-g82f18fe
docker-init:
Version: 0.19.0
GitCommit: de40ad0
And Error as below at PowerShell
Please , help me to find what am I missing .
Thanks ,
Tutul
Hello,
I have used files and scripts to setup AdventureWorks for postgres localy but when i run psql -U postgres -d Adventureworks < D:/pgadmin/AdventureWorks-for-Postgres-master/install.sql it created database schema but every time whlie copying data there was an error "./Department.csv: No such file or directory" or "Product.csv: No such file or directory". Please help.
I am on a Mac. I have everything installed. From Terminal, when I run the psql commands, it asks for my password which I type in but it fails. The problem seems to be the it defaults to my username instead of the Postgres account which is in the database. Any suggestions how I can do this?
First of all thanks for creating this project!
I just ran the ruby and sql scripts, but found that the SQL script threw errors on the COPY commands of the following CSV files:
StateProvince
CountryRegion
Employee
ProductDescription
CountryRegionCurrency
Subsequent commands in the script will fail as well, since foreign keys were being violated.
The solution for me was to remove the empty rows in these CSV files and then the script ran through without an issue.
Hello, thank you for this sample database. I am hoping to use it for unit test cases in an open source project. Would you mind adding an MIT license to this repository so there are no licensing concerns?
Note that the Microsoft official sample source for the AdventureWorks database is MIT licensed so there should not be any concerns with incompatible licenses: https://github.com/microsoft/sql-server-samples/blob/master/license.txt
Thanks!
The following error appears when executing install.sql
ERROR: insert or update on table "productreview" violates foreign key constraint "FK_ProductReview_Product_ProductID"
DETAIL: Key (productid)=(709) is not present in table "product".
As instruction says all csv files, install.sql and update_csvs.rb files in same folder.
When ran "ruby update_csvs.rb" it only proceeded few files:
Processing ./BusinessEntity.csv
Processing ./JobCandidate.csv
Processing ./EmailAddress.csv
Processing ./ProductDescription.csv
Processing ./Person.csv
Processing ./BusinessEntityContact.csv
Processing ./Password.csv
Processing ./ProductModelorg.csv
Processing ./ProductPhoto.csv
Processing ./JobCandidate_TOREMOVE.csv
Processing ./PhoneNumberType.csv
Processing ./CountryRegion.csv
Processing ./StateProvince.csv
Processing ./BusinessEntityAddress.csv
Processing ./PersonPhone.csv
Processing ./Illustration.csv
Processing ./ProductModel.csv
Processing ./Document.csv
Processing ./CountryRegionCurrency.csv
Processing ./Store.csv
Processing ./Employee.csv
Then, when ran: "psql -d Adventureworks < install.sql"
All 68 tables are created, but all of them are empty, checked terminal and it shows notifications like this:
Document.csv: No such file or directory
Copying data into Production.ProductCategory
ProductCategory.csv: No such file or directory
Copying data into Production.ProductSubcategory
...
CountryRegionCurrency.csv: No such file or directory
Copying data into Sales.CreditCard
CreditCard.csv: No such file or directory
Copying data into Sales.Currency
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.