query XML file in a sql script - hana

In HANA, I need information on calculation view like cross client or not, commentary on node, cardinality...
Those information are in XML file of the calculation view. Is it possible to extract it with a procedure?
During my research I found this : https://archive.sap.com/discussions/thread/3600091
I hoped that now it would be possible.
If you have any idea, please share with me,
Thanks in advance

I'm replying to the question on getting the metadata or attributes from a view. You can probably find these in tables like _sys_bi.bimc_* (e.g. BIMC_PROPERTIES in the _SYS_BI schema), SYS.VIEWS, SYS.VIEW_COLUMNS, SYS.cs_view_parameters (has the client as a parameter) or sys.view_columns.
I think it's easier to extract this information from the automatic documentation file in PDF format from HANA Studio, though, but it depends on what you are trying to do.

Related

SQL Server: Read data from URL Text File

I am looking for a way to read a data from URL and store it in a Table or a variable in SQL Server.
http://10.10.1.10/data/data.txt
The data in this URL will be like this 746473
The URL will have only one data at any point of time
Is it possible to capture this and store it against a variable or to a table. For guidance please.
It's possible but do you really want to open database in a such way?
Just read the data using another language like node.js or C# and call the T-SQL code then.
You can use use SSIS for such task or use some kind of CLR component. It's more complicated for sure then reading the data with node.js and inserting into a database.
I am advising to reconsider.

Is it possible to pass a query as parameter in BIRT report?

I want to ask the user to input a query then the BIRT will generate a report based on user's query.
So far, what I do is pass the parameter to this.queryText but I can't think of a way on how will BIRT display the results.
Is this possible?
You can achieve this by following below steps :-
Create report parameters if required, which can be passed by user.
In SQL dataset beforeOpen() event build and assign dynamic query:-
example- this.queryText = "Select * from " + params["parmtable"].value;
If you have any other requirement, could you please elaborate it. I will surely try to help you with a sample rptdesign file.
This is not directly possible.
However, with a little help from outside (e.g. getting the description of the cursor from the DB, it is possible to generate (and save, if you like) and finally run an rptdesign file by calling the DE API from Javascript. I've done this, but it is very cumbersome. Furthermore, what if the user wants to supply parameters?
From a security point of view, the whole approach is not recommended.
IMHO BIRT is not the right tool for this, because this task requires more low level programming. If you are free to choose, I'd recommend Python with the ReportLab toolkit (a library to generate PDF) together with cx_Oracle (depending on your DB) or Java with iText and JDBC.
I don't have any other option aside from this.
First. (I use java btw) My program accepts and execute the query. Then using the ResultSetMetaData, I get the column names. (to be use as reference to my data source)
Then. I passed the full query and the list of columns to the method buildReport() (Please refer to How to Build Dynamic Table (BIRT) sample code)

Store PDF or image in SQL Server database with navicat or sql management studio

This one's going back to the basics but I haven't been able to find a simple explanation anywhere. I just started working with databases and I'm using a SQL Server database managed mostly with navicat (but I have SQL Server Management Studio as well) and I need to store a PDF or image in the database.
I'm using Entity Framework to interface the database with the C# app I am building. A simple explanation assuming little knowledge of database management would be much appreciated.
Thanks for the help.
The database size will grow exponentially if you start storing images and PDF's.
A better approach would probably be to store the path of the file in the database and then load the item by referencing the proper path.
EDIT:
It's going to depend on the file structure of your application really. A simple version of retrieving a PDF could be the following:
Example Path:
/PDF/username.PDF
You store the path of the PDF in the DB, maybe under pdfPath. Then when you retrieve the path from the database direct the user to the correct link using the path you got from the query.

Where to find the 'views' settings from crm 2013 sql

I am having troubles finding the views settings section using sql server. What filtered views would I query to find these settings. I was told briefly to try looking in FilteredUserQuery but did not find all of the columns I am looking for. I have attached a screenshot for more clarification on which settings I am looking for.
I am interested in these columns while using sql server. Please let me know if you have any questions or confusions with my questions.
Here is a link to all of the different filtered views I have access to http://msdn.microsoft.com/en-us/library/dn531182.aspx
Thanks for the assitance!
You need to look into FilteredSavedQuery, the entity SavedQuery holds the system views.

Visual Basic data file location

I would like to know if there is a place to save a file that contains some data (that is used internally by the application - like a very tiny db). I don't want to save it to C:\file.txt. Is there a place where visual basic can hold these kind of files, like bin or something?
Thank you.
You can use the path in the VB object My.Computer.FileSystem.SpecialDirectories.AllUsersApplicationData or My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData to store what you want.
It is not clear what kind of data you are talking about (type, size and usage), but an embedded database may be just what you are looking for.
SQL Server Compact Edition or SQLite may do the trick.
You have a few choices.
You can store data in Arrays, XML files, A SQL Database (Access, SQL Server, etc).
You can use your local user locations that are user specific.
IT all depends on how much data.