The next version of the Water Data Exchange (WaDE) program. An agreed upon metadata standard and information system for sharing water budget data in the US. Water budgets data include site specific and aggregated water rights, water supplies, use, return flows, and transfers at geospatial areas.
- Why WaDE 2.0?, use cases, and the conceptual design
- WaDE 2.0 draft star schema for OLAP system
- WaDE 2.0 blank database copies for RDBMS
- Sample input data for WaDE 2.0
- Use cases and SQL queries to test the design
How to import data into the database, locally?
(For a more detailed step by step process go here: https://github.com/WSWCWaterDataExchange/WaDE2.0/tree/develop/source)
-
Head to the source repo and clone it with the VS.
- Under the repository name, click Clone or download.
- In the Clone with HTTPs section, click the copy icon to copy the clone URL for the repository.
- Open Git Bash.
- Change the current working directory to the location where you want the cloned directory to be made.
- Type git clone, and then paste the URL you copied.
- Press Enter. Your local clone will be created.
-
Download and install Microsoft Azure Storage Explorer.
-
Download and install Microsoft Azure Storage Emulator.
-
In the Microsoft Azure Storage Explorer window, head to the Storage Accounts/local-1 (key)/Blob Containers/normalizedimports and then the folder which is related to the import data.
-
Make sure that the Csv file fields are in a good format.
- Check if the Csv file fields order, matches the order of the fields in the related type table.
- To check this, open the Microsoft SQL Server Management Studio, head to the Databases/WaDE2/programmability/Types/User-Defined Table Types and check the related table type.
- Make sure that the foreign key relationships are holding (if a value which is a foreign key, is going to be inserted, make sure it exists in the reference table as well).
- If you want to add a new Csv file, you can upload it through the Explorer window.
- Load the startup section of VS with WaDEImportFunctions and run it.
- Open a browser tab.
- Type http://localhost:7071/api/LoadWaterAllocationData?runid=
- After the equal sign, type the name of the folder which the csv file exists inside, in the explorer window.
- press enter.
- The import function should run successfully.
How to setup the SQL DB?
- Download WaDE2.0.bacpac from the Google Drive.
- Open the Microsoft SQL Server Management Studio.
- After conncting to the SQL Server, right click on the DataBases and choose Import Data-tier Application.
- Click on Next button, browse the bacpac file.
- You can change the database name and other settings if required, if not, keep clicking on Next button and the database will be imported.
How to update CV data in QA and Production?
CV data updates automatically every night at 02:00 UTC. To manually trigger an update mid-day:
- Go to the Azure Portal and select the "AutoUpdateCvData" logic app in either the QA or Production resource group.
- At the top of the Overview page, click "Run Trigger" followed by "Recurrence".
- The update will start within a couple minutes.