Bigquery: How to See Preview of "View Schema" Without Querying - database

I am relatively new to Bigquery on Google Cloud Platform.
Table schema provides the user with three options "SCHEMA", "DETAILS", and "PREVIEW" where "PREVIEW" allows you to see a selection of rows from the data file.
However, "View schema" only provides the user with two options: "SCHEMA", and "DETAILS"
How can I "PREVIEW" a "View schema" without querying from the actual table?
Thank you

Related

Enterprise Architect Compare database

I am very new to EA and in general data engineering. I want to be able syncronize my MS SQL DB with the data model I created in EA. Using the help and tutorials, I learnt how to push my data model onto the MS SQL DB. What I fail to achieve is the syncronization. I have a feeling that is has to do with the schema. The database builder lists all the orginal tables and then again all tables from the ODBC connection with an additional 'dbo.'
Do i need to define this somwhere in the options of my data model or can I compare the data model with the server taking account of the schema?
You need to work in the “Database Builder” feature of Sparx EA.
This can be found on the "Develop" tab. (This will not work directly from the “Browser”)
Select the package having the “Database” as its stereotype. Use mouse button 2 and select “Manage DBMS Options”. The dialog will enable you to change the table(s) owner or even change the selected DBMS type. From the database builder you can then perform the "database compare" or "compare with options".
Note regarding terminology - the "dbo" in SQL Server is a the database owner.
(I have also posted this answer to the Sparx Forum.)
You can find the related documentation with screen images here: https://www.sparxsystems.com/enterprise_architect_user_guide/15.2/model_domains/import_schema_into_builder.html
I needed to add the owner tag dbo to all my tables. For some reson it was not enough to add it to the data model object. Thanks to this thread i found an option to change it for all tables at once.
How do you set the database schema, at the package level, in SPARX Enterprise Architect?
There were still some differences about the PK and FK ids when i tried to compare but I just aligned my local data model with that and now there are no differences between the data model and the data base.

pgAdmin4: How do I edit the SELECT query generated by "View/Edit Data > All Rows"?

I recently migrated from MariaDB and there was a useful shortcut to construct a query in MySQL Workbench - you would right click the table and select "Select rows - Limit 1000". pgAdmin4 has an identical shortcut however I cannot edit the query in the Query Editor after the query has run. The query is grayed out/disabled.
Is there a way to "unlock" the input and make it editable, so I can adjust the query and re-run it?
Any help would be appreciated. Thanks!
The View/Edit Data page is just a limited version of the Query Tool, according to pgAdmin's documentation1:
The Query Tool and View/Edit Data tools are actually different operating modes of the same tool. Some controls will be disabled in either mode. Please see The Query Tool Toolbar for a description of the available controls.
So use Query Tool (accessible from the same context menu) instead of using View/Edit Data. You can edit the query there.
You can use Scripts > SELECT Script which opens the Query Tool with a pre-filled script that does the same as View/Edit Data > All Rows

how to select a bunch of objects automatically in ssma(SQL Server Migration Assistant)

I'm using ssma to migrate from oracle to SQL Server with about 1000 tables.
And during the migration, about 100 tables went wrong (because of wrong type mapping) and I want to rerun only those tables.
Are there any way to select them automatically(by script or even some third-party tools) rather than click them one by one?
Answering my own question..
Turns out ssma has a built in function called "Advanced Object Selection" in the right click menu.
Advanced Object Selection
And then you can input tables(or other object names) in the "Set Selection".
Set Selection

Refreshing external data (from SQL Server) in org chart in Visio

I have linked SQL Server employee data to create an org chart in Visio, but I can't figure out how to refresh the data in the org chart - for example if a new employee is added for this to automatically appear in the org chart, or if there is a change in title for an existing employee for this to update automatically.
I have tried the "Refresh All" under "Data" this didn't work. It refreshes the "external data" that appears on the side (which is what is linked from the SQL Server), however not the data in the actual org chart image.
Any suggestions on how to get this to properly link would be much appreciated.
You can use Organization Chart Wizard in Visio, to create Organization chart using datasource.
File tab, point to New, click Organization Chart, choose Metric Units
or US Units and then click Create.
In the wizard, You can choose to create a organization chart from existing data source. You can create from excel file or any ODBC compliant source. Read more
When you refresh report, it only updates the existing shapes. If you
want to add/remove shapes, you have regenerate report.

DataGrip is not providing intellisense support

DataGrip from JetBrains is not providing Intellisense for Cross Database queries.
use mydb;
select * from otherdb.dbo.
using MSSQL
Leaving it for who seems to be struggling with this
1) while creating connection create without selecting DB.
2) In DB tree select click more Schemas and select DBs you want for cross querying.
3) Right click on those DBs and select synchronize
now cross DB should be working.
I came across this question in search of a solution to troubleshooting intellisense in DataGrip. The accepted answer didn't go quite far enough for my use case, see below for my solution:
A similar issue was posted to IntelliJ's community forms here.
This answer relates to DataGrip 2017.1.5 (is likely applicable to other versions as well):
After creating the initial connection to your server, open the Database tool window using:
(ALT + F1) or
(View -> Tool Windows -> Database).
Listed beneath your server connection you will see a "Schemas..." item, double click it. This will expand into a list of all DB schemas you have access to on that server.
Select the schemas you are interested in, and additionally expand each DB schema to select all child schemas for that DB.
Click the refresh button in the schema selection window to synchronize your settings (two arrows pointing at each other in a circle).
Image of Database Toolbar with DB/Schema selection

Resources