Cube.js unable to join table from different dataSources - cube.js

In my cube.js server I have 2 tables from different data sources(both of them are postgres). I'm trying to create a join on these tables but get the following error
Error: Joins across data sources aren't supported in community edition. Found data sources: dataSource_1, dataSource_2
I have student_details cube and test_results cube (both cubes from different data source).
I'm trying to achieve a join on student id (test_results cube) and id (student_details cube ) but get the above error in bold.
Any help or work around for this would be appreciated.
Thanks in advance

As error says this feature isn't part of open source Cube.js edition. As of now there's no way you can do it using open source Cube.js edition unless you implement it yourself.

Related

Power BI, I need a multi-layer map with Drilldown Choropleth... invalid json+not seeing fields to add data

Anyone have experience with Drilldown Choropleth recently? I have taken a step back to try ArcGIS, but want to have a multi-layer map built in Power BI with shading using this add-in. I am having issues with loading the json- one for States (USA), one for Metro Area (MSA, USA). Also, not seeing the fields to add data points. This info I researched on the app my info has a json file link that is going to a 404.
If anyone wants to provide tips to transfer over to a contained ArcGIS, I would accept that.
More on the app: https://appsource.microsoft.com/en-us/product/power-bi-visuals/wa104381044?tab=overview
I basically need one layer shading on drill down for geo with points, then add one layer for demographic stats, one layer for population stats. Help?
for topojsons that work:
https://github.com/deldersveld/topojson
I used the US Counties one, so that's all I can comment on working.

AWS GlueStudio 'datediff'

Has anyone tried using AWS GlueStudio and the custOm SQL queries? I am currently trying to find the difference in days between to dates like so..
select
datediff(currentDate, expire_date) as days_since_expire
But in the data preview window I get an
AnalysisException: cannot resolve 'currentDate' given input columns: []; line 3 pos 9; 'Project ['datediff('nz_eventdate, 'install_date) AS days_since_install#613] +- OneRowRelation
Does anyone know how to fix this solution or what causes it?
You don't write PostgreSQL/T/PL (or any other flavor) SQL, instead "you enter the Apache SparkSQL query". Read the following carefully:
Using a SQL query to transform data (in AWS Glue "SQL Query" transform task)
https://docs.aws.amazon.com/glue/latest/ug/transforms-sql.html
The functions you can write in AWS Glue "SQL Query" transform task to achieve desired transformation are here (follow correct syntax):
https://spark.apache.org/docs/latest/sql-ref-functions-builtin.html
BTW: The error you wrote is not correlating with your select statement for many potential reasons, but I am writing this answer anyway just for the sake of your question heading or other who may come here.

How to select the 1st or last Element of a LIST column in Cassandra CQL?

I have a Cassandra table of files, similar to the following (fake) structure:
CREATE TABLE files{
filename: text;
versions:LIST<{timestamp, filesize}>
}
I carefully always insert the latest version at the beginning of the LIST.
And I tried to run
select filename, versions[0] from files;
I met the following error:
SyntaxException:
I couldn't find a solution on StackOverflow and Internet. Just wonder whether this is possible in Cassandra CQL? Of course, if there is no such a solution, I will process data at client side.
Thank you in advance,
Ying
The functionality is not yet available CASSANDRA-7396.
As of now you will have to fetch the complete list and filter it at application level.

Rails 4 ActiveRecord Sql Server - Unable to save binary into image column

We are working to upgrade our application to a more current version of Ruby & Rails. Our app integrates with a legacy database (SQL Server 2008 R2) that has a table with a column of image data type (we are unable to change this column to varbinary(max)). Previously we were able to save a binary into the image column. However now we are getting conversion errors.
We are working to upgrade to the following (among others):
Rails 4.2.1
ActiveRecord_SQLServer_Adapter (4.2.4)
tiny_tds (0.6.3.rc1)
freeTDS (v0.91.112)
When we now attempt to save into the image column, we get errors similar to:
TinyTds::Error: Unclosed quotation mark after the character string
Researching various issues within tiny_tds & activerecord_sqlserver_adapter, we decided to create a second table that matched the first but change the data type from image to varbinary(max). We can save a binary into the column.
The code causing the challenge is in a background job where we grab images from s3, store them locally and then push the image into the database. Again, we don't control the legacy database and thus can't change the data type (or confront the issue of why we are storing the image in the db in the first place).
...
#d = Doc.new
...
open("#{Rails.root}/cache/pictures/image.png", "wb") do |file|
file << open(r.image.url).read
end
#d.document = File.binread("#{Rails.root}/cache/pictures/image.png")
#d.save!
Given the upgrade has broken our saving images, we are trying to figure out how best to determine a fix. We could obviously roll back until we find a version that works. However we hope to find a fix. Anyone have any ideas?
Update:
We added the following configuration as we had triggers on the table being inserted: ActiveRecord::ConnectionAdapters::SQLServerAdapter.use_output_inserted = true
When we remove this configuration we get the following error:
TinyTds::Error: The target table 'doc' of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause.
Note: We are unable to make any modifications to the triggers.
Per feedback on the ActiveRecord_SQLServer_Adapter site, we rolled back to 4.1.11 and we are now able to save into the image column.
We also had to add this snippet to overcome the issue with the triggers.

Data truncated error via ODBC

i'm trying to query a table with c++ odbc using 'sql driver'.
While i'm trying to open the table using my query i get 'Data truncated.' error. I checked it out, the data i'm passing for that query is no longer than 255 in length, i think it is a bug.
did some one solved that issue? any suggestions?
windows 7, sql server 2008, vs 2010.
Thanks in advance.
the fix up
check not only the parameter you pass during open but also the fields that are being transferred during DoFieldExchange() function, in my case that was another record field that was transferred to me from the sql and messed things up.
refer the link for the fix up.