Questions tagged [scenic]

Scenic adds methods to ActiveRecord::Migration to create and manage database views in Rails.

10 questions
6
votes
1 answer

Testing Materialized View in Rspec

Using the Scenic gem I've built an activerecord model backed by a materialized view class MatviewSales < ActiveRecord::Base self.table_name = 'matview_sales' self.primary_key = :id belongs_to :user belongs_to :account belongs_to…
2
votes
0 answers

Postgres query doesn't execute when has WITH statement

I'm applying scenic gem for creating database view for Postgres database. I have a order (ops_orders) table with 73k records and order line item (ops_order_line_items) that belongs to order with 170k records. The problem is that the query has WITH…
Leo Le
  • 91
  • 1
  • 7
1
vote
0 answers

Audio extracted using ffmpeg giving nan and very low/high (2.6283893e-37) values

I'm extracting raw audio from a .flac file(youtube link - https://youtu.be/--BfvyPmVMo , extracting 10sec from this) and storing it as np-array float32. Getting nan, and extremely low and high values = [-8.63468980e+30 -9.76911766e+34…
Shreya Gupta
  • 97
  • 2
  • 8
1
vote
1 answer

Can you create a database backed rails model without a table?

I have a complicated SQL query that aggregates columns using a group_by. IndividualOrder.select(SUM(...) as amount, other_fields).group_by("organization.id") The problem is: I get an ActiveRecord::Relation from IndividualOrder, which isn't really…
FullOnFlatWhite
  • 3,642
  • 2
  • 18
  • 23
1
vote
0 answers

Constructing Materialized View or use ActiveRecord for polymorphic Rails models

I'm working on an existing app which has the structure (simplified and) described below. One of our new queries is to find all activity in a company which is rather complicated and non-performant to build. It seems hard to write the query in…
geoboy
  • 1,172
  • 1
  • 11
  • 25
1
vote
0 answers

How to make rake db:migrate dump the right schema when we use Scenic to manage views

Every time a run rake db:migrate it generate as a result a useless db/schema.rb file which can't be loaded with rake db:schema:load simply because my views are being dumped incorrectly. I noticed the dump is coming with my views and a table with the…
intmarinoreturn0
  • 300
  • 1
  • 16
0
votes
1 answer

warning occured when running pyscenic

I am running PySCENIC using the protocols described in the paper titled "A scalable SCENIC workflow for single-cell gene regulatory network analysis". I have generated Loom files using the PBMC dataset downloaded from 10x Genomics, as suggested in…
lij
  • 1
0
votes
1 answer

Scenic dependencies on Windows?

Background I have been playing around with Scenic to make a desktop app across multiple environments. While the Install dependencies for Ubuntu are outdated and don;t work for the latest LTS (v20) I was still able to figure out the packages and…
Flame_Phoenix
  • 16,489
  • 37
  • 131
  • 266
0
votes
1 answer

Setting default values to model when using rails db views - Scenic gem

The Contact model has default values for the column is_pickup Contact.new => id: 2, email: nil, order_id: nil, is_pickup: true Now i am connecting the contact table to the rails db views using scenic gem class OrderContact < ApplicationRecord …
prajeesh
  • 2,202
  • 6
  • 34
  • 59
-1
votes
1 answer

Scenic view source code?

Where can i find the source code for the scenic view application of JavaFX. Is it even Open Source.? Unzipping the jar provides cryptic classes which are difficult to understand.
Anurag Upadhyaya
  • 301
  • 2
  • 6
  • 17