Is there a way to check the schema of a table in QuestDB? - questdb

I know the UI has a schema browser that shows the columns and some info about caching, but I would like to be able to check this if I have the REST API disabled or do not have the port open to browse the web console of the server. How can I check this from SQL?

These queries return table schema
tables
-- or
select * from tables()
-- this to show columns by table name
show columns from <table>

Related

Create PowerBI Datamart from Azure Analysis Service

I am trying to create PowerBI Datamart from Azure Analyis service. There is a datamodel available in the Azure Analysis Service and I can connect using URL and Database Name. The datamodel has ~100 tables present in it and relationship also setup. So my question is, if I want to create a PowerBI datamart from the Azure Analyis service datamode, I need to do the Get Data option of PowerBI datamart and connect to Azure Analyis service, select table, select fields 100 time for getting all the tables of Azure Analyis service datamode into my PowerBI datamart? Is there any import function available where I can import all the tables in a single time?
Why do you want to copy data from AAS into a database?
The reason you find it difficult is that it's an odd thing to do. The query designer for AAS/SSAS generates MDX queries which are indented to run aggregate queries that return a handful of rows, and are wholly unsuitable for extracting whole tables. If you try, the queries will just run forever and fail.
It's possible to extract data from AAS/SSAS tabular models, but you must use DAX not MDX, and so you need to the Power Query or "Transform Data" window, and use the advanced editor.
Each query to load a table should look like this, eg to load the 'Customer' table:
let
Dax = "evaluate Customer",
Source = AnalysisServices.Database("asazure://southcentralus.asazure.windows.net/myserver", "mydatabase", [Query=Dax])
in
Source

How to select a query as datasource in Apache Superset?

I want to select a saved query as datasource in my charts but Superset only displays views and tables as data sources.
What is required to select a query as a datasource?
In SQL Lab, after you execute the query, you have an option to visualize the query, and then you are able to create a chart using the query, save it, and use it in a Dashboard once saved.
Not very intuitive, I had to look for it too ;-)
IDK if it is still relevant but you can query the dataset. This can be very useful when you're doing nested queries. You can do this with the help of jinja templating. make sure you have enabled them in the config file
select * from {{dataset(233)}}

Missing data fields from tables in Power BI

I am Using PowerBI Desktop Direct Query on SQL database
When the data is loaded into PowerBI Desktop I can see that there are certain fields missing from the table. When I view in SQL Server Manager Studio I can see the entire table.
Is there a known reason why all fields in the table would not be returned?
Check in the Query Editor window (hit Edit Queries) - steps can be added to any Query to remove columns, or specify a selected set of columns.
It could also be that the columns were added to the SQL table after the Power BI Query was built. For that scenario you just need to use Refresh Preview in the Query Editor window and they will flow through to the Power BI table.

I can not get Apache Lucenein queries to work in WSO2 DAS Data Explorer

I'm trying to query a DAS table with the Data Explorer but no matter what I put in for the query it returns nothing. If I leave it blank it returns all the rows. I'm using the default H2 database in my example.
My tables data
Query by attribute name
All fields that you want to query need to be indexed (via the Event Persistence Configuration configuration of the stream). See https://docs.wso2.com/display/DAS301/Configuring+Indexes for the details.

Sitecore Analytics reports - Is this only for Analytics database, can I use master database to generate reports?

I was trying to create a report from master database in analytics reports. (Stimulsoft Report Designer)
As it explains in the reports cookbook, I have created a "mrt file" (Report UI) and a report definition item in Engagement analytics.
I have configured the datasource item as query item
(/sitecore/system/Settings/Analytics/Reports SQL Queries/Visit Pages).
It worked.
But then I tried with a query using the master database, in the SQL query item I specifically mentioned the database as 'testProjectMaster' to point to master database. It did not work!
Then I figured out that in "/sitecore/system/Settings/Analytics/Reports SQL Queries/Visit Pages" item and other query items, it does not specify the database, that means by default sitecore queries the analytics database.
Is this a limitaion in sitecore, cant we query the master databse for reports? Are there any good resources to follow on creating reports?
I suggest taking the SQL from the Visit Pages report and running it in SQL Server Management Studio. There, you will be able to quickly see what's preventing your query from running. If I had to venture a guess, I would suspect that your SQL user account does not have db_datareader access to the master database.
The default SQL queries provided by Sitecore assume that the DMS is configured as the default database in the connection string. This, however, does not prevent you from querying other databases or doing cross-database joins like so:
SELECT TOP 100 * FROM Pages
INNER JOIN Sitecore_Master.dbo.Items AS MasterItems ON Pages.ItemId = MasterItems.ID
A word of caution.. from my experience, this can really slow down your reports as it does not take advantage of indexing and creating indexed views doesn't work across multiple databases.