I am using Greenplum Database.
Need to write query or may be function to read data from a URL.
Say a sharepoint URL is there, which contains some tabular data.
I need to write a query to fetch that Data from within the sql query or function.
I can get http_get, but its not helpful because the version is 8.2x.
I also tried python as pg language, it is also not working as it is listed as untrusted language. Hence looking for some alternative.
Have you tried using web external tables:
https://gpdb.docs.pivotal.io/5170/admin_guide/external/g-creating-and-using-web-external-tables.html
Related
Using PowerBI/PowerQuery I'm using the web connector to query a rest api which returns json. I'm converting that to a table and ending up with a single column of values (id's). Looks like this:
These ids now need to be used in subsequent web queries, one query for each id. This will then yield the 'real' data which I need to get to.
How can I iterate through those id's using each in a new web query?
I have a complete solution in Python and can just import the json files from the Python script into PBI, but I really want to be able to give the PBI report to a colleague who would not touch Python, so I'm keen to find a simple way to achieve this in PBI/PQ.
Would appreciate any pointers on how this could be achieved as simply as possible.
Basic Question: Does Google Data Studio allow calling a SQL User Defined Function (UDF) within a Custom Query data source?
My UDF works great in BigQuery. The exact same code (SQL call to a UDF) fails when creating a report to leverage this data source/code.
The following error is encountered:
Data Set Configuration Error Data Studio cannot connect to your data set.
Failed to fetch data from the underlying data set
Error ID: 53979666
+1 to the question, looking for a better solution, too.
My current walkaround is far from ideal, but perhaps could be good enough for someone:
scheduled query that executes and materialises data
datastudio on top of table created in step 1
Though you can't create a user-defined function in a Data Studio custom query, you can define a UDF in BigQuery and use it in the custom query.
Source: https://www.anvilinsights.com/video/user-defined-functions-udf-in-custom-query
We are currently working with a big laravel 5.2 project. For our query, we always try to use Eloquent ORM. But sometimes we need to use RAW queries.
We think in future, we have to write more RAW queries. So we need a separate place and a well-organised way to write RAW queries.We don’t want to write raw query in our controller and model.
Is there any other place where we can put raw queries. Or what is the best procedure to write raw queries(Write a separate file or repository etc.)
You could use scopes
For each group of related queries, I would create a file in scopes directory structured according to your models structure.
This will give you a central place where you could add or edit your raw queries.
I know that my overall problem is generally approached using two of the more common solutions such as a join data set or a sub-table, sub-report. I have looked at those and I am not sure this will work effectively.
Background:
JDBC data source has local data which includes a series of id's that reference a record in a master data repository interfaced via a web service. This is where the need for a scripted data source arises. The data can be filtered on either attributes within the local JDBC data and/or the extended data from the web service. The complication is that my only interface is the id argument to the webservice.
Ideal Solution:
Aside from creating a reporting table or other truly desirable scenarios I am looking to creating a unified data source through a single scripting data source that will handle all the complexities. This leaves the report generation and parameter creation a bit cleaner, hopefully. The idea is to leverage the JDBC query as well as the web service queries in the scripted data source do the filtering and joins and create that singular unified view.
I tried using the following code as a reference to use the existing JDBC connection in the BIRT report definition to execute the query. However if I think my breakdown on what should be in open vs fetch given this came from beforeFactory for a completely different purpose may be giving me errors...truth is I see no errors it just returns 0 records.
a link
I have also found a code snippet to dynamically load a JDBC connection but that seems a bit obtuse and a ton of overhead for what I am needing to do. a link
In short: How in all-that-is-holy do you simply run a query against a database within a scripted data source if you wanted to do. The merit of doing that is another issue, but technically how?
Thanks in Advance!
I want to store some user data in memory, like some in-memory noSQL database.
But later on I want to query that data with a dynamic query constructed from the user. That query is stored in a classic DB like a string, so when I need to query the data stored in memory I would like to parse that string and construct the desired query (by some known rules).
I looked at Redis and I figured out it isn't maintained for Windows anymore, I have also looked at RavenDB but it's main query language is LINQ, even though it can be created dynamic Lucene Query.
Can you suggest me another in memory DB that work with ASP.NET and can be queried with a dynamically created query? Maybe I haven't seen all the options.
I prefer name-value or JSON based noSQL so it's schema can be easyly modified without the constraints of the relation type of DBs
I would suggest to simply use sqlite. It can be easily used as an in-memory database (just open the database using ":memory:" instead of a file name).
You can use a simple 2 columns table with a primary key to emulate a key/value store.
Here are a few links you might find helpful:
http://www.sqlite.org/inmemorydb.html
How to create asp.net web application using sqlite