Questions tagged [factory]

5

votes
0

answer
137

Views

FactoryBoy - nested factories / max depth?

I am writing tests for a large Django application, as part of this process I am gradually creating factories for all models of the different apps within the Django project. However, I've run into some confusing behavior with FactoryBoy where it almost seems like SubFactories have an max depth beyond...
Jasper
0

votes
1

answer
11

Views

Optimizing SSIS package for millions of rows with Order by / sort in SQL command and Merge Join for millions of rows

Hi i am currently trying to optimize an SSIS package when i do an Upsert/delete which handels about 93+ million rows from a table in a remote MariaDB source. The table also contains approximately 63 columns. Currently i'm using Sort and Merge Join in my package but as i've read some guides its recom...
John
1

votes
1

answer
969

Views

Azure Data Factory check rowcount of copied records

I am designing a ADF pipeline that copies rows from a SQL table to a folder in Azure Data Lake. After that the rows in SQL should be deleted. But for this delete action takes place I want to know if the number rows that are copied are the same as the number of rows that were I selected in the beginn...
jbazelmans
1

votes
3

answer
153

Views

Azure data factory not loading

I am not able to open Azure data factory in any browser, it just keep loading from past 1 hour. I have tried refreshing and using other browser, is there any specific reason why it happens? All other services on azure portal is working fine. Browsers which I have tried: Mozilla Firefox 65.0.2 Intern...
Zerotoinfinity
1

votes
4

answer
44

Views

How transform a column befory copy?

I would like to copy a table from sourceA to sourceB, but before I want to transform column values. How could I do it? I've tried to do it in the mapping trying to add dynamic content but I think I'm not doing it correctly. Thanks!
jnoguerm
1

votes
2

answer
28

Views

Kotlin generic factory dynamic cast

I want to create factory of objects with generic parameter: interface Foo { fun buzz(param: T) } I have two implementations for tests: class FooImpl1 : Foo { override fun buzz(param: String) { // implementation 1 } } class FooImpl2 : Foo { override fun buzz(param: Int) { // implementation 2 } } Now...
Lau
1

votes
2

answer
562

Views

How to create a factory method in C++ that allows one to polymorphically return different types?

I have a base type: class Foo{ public: int height; int weight; void jump(); } I have a descendant: class Bar : public Foo{ //Has a different implementation of jump(); } I have a factory that returns a kind of Foo; static Foo createTheRightThing(int type){ if (type == 0){ return Foo(); } else if (typ...
Kaizer Sozay
1

votes
0

answer
7

Views

Horizontal/Vertical scaling of self hosted integration runtime

We're looking for automated way to horizontally, vertically scale the pull of self hosted integration runtime virtual machines used in ADF. Reading Microsoft docs does not provide answer.
Alexey Melezhik
1

votes
2

answer
106

Views

How to continue execution after “NoSuchElementException” in Selenium (Java)?

I'm attempting to create an ArrayList of WebElements from this page: If all the elements are displayed, they're able to be added to the ArrayList just fine. ArrayList TodoArray = new ArrayList(); TodoArray.add(todo1); If I remove one of the elements from the web page(not code) I get this error when...
Few_Line
1

votes
3

answer
39

Views

In Java, How to implement the functions similar to using the template parameter to avoid creating Creator subclasses in C++?

Recently, when I was reading the book named 'Design Pattern-Elements of Reusable Object-Oriented Software', there was such a paragraph in the book: Using templates to avoid subclassing. As we've mentioned, another potential problem with factory methods is that they might force you to subclass just t...
xun yan
1

votes
0

answer
57

Views

How to pass slice formula when creating ADF from C#

The code below generates this error ADWStoredProcActivity failed: Error converting data type nvarchar to date. Code: Dictionary parameters = new Dictionary() { { 'DateToImportFor', new StoredProcedureParameter('$$Text.Format('{0:yyyy-MM-dd}', SliceStart)','string') } }; var pipelineName = 'Azure St...
NSS
1

votes
1

answer
255

Views

Data Factory waiting timeout for upstream dependencies

I'm currently using Data Factory V1. I have a pipeline with 2 chained activities: . The first activity is a Copy Activity that extracts a table from SQLDB into a .tsv file in Data Lake Store . The second activity is a Data Lake Analytics U-SQL activity that collects the data in the previously create...
Tomás Law
-1

votes
0

answer
11

Views

Sharing data between controllers in AngularJS 1.6.5

We are using AngularJS 1.6.5 in conjunction with PHP. I do not have a choice in this matter. Part of the reason that my organization chose Angular was the idea that we could use predefined services to conditionally share scoped data between controllers, and have interface elements react in real time...
Carl Hamlin
1

votes
0

answer
160

Views

How to describe this factory by UML class diagram?

In my work i have a lot of discrepancy of opinions about UMLing class diagram of this sample factory: class Program { private static TrainComponentsData _trainComponentsData; static void Main(string[] args) { InitTrainComponentsData(); string str = _trainComponentsData.ToString(); } private static v...
zzfima
1

votes
1

answer
242

Views

Fault tolerance in Copy Activity by skipping incompatible rows

I use Azure Fucntion with Azure SDK and Azure Data Factory, is there any way to get value of skippedRowCount of Activity Window when applying 'log the incompatible rows' in Copy Activity (Source: Blob Storage, Sink: SQL Data Warehouse)?
phương hà
1

votes
0

answer
79

Views

How do you implement a generic class factory in Swift?

I want to 'make' a number of class instances similar to a base class but different in underlying type. (Not quite the same as the typical 'Animal' class factory examples seen all over the net!) The code below is close to working but it requires the user to 'upcast' the make result, as in: var f1 =...
WholeCheese
1

votes
0

answer
34

Views

Factory Pattern: createABC vs getType(ABC)

I am trying to write code that filters a list of objects based on certain properties they have. There are many ways to filter these objects, so I can have multiple filters. I am not sure if this matters for this question, but these filter classes have different constructors. To control the creation...
bchen
1

votes
1

answer
124

Views

Factory for database view in factory_girl

I am using Rails 5.0.2 with factory_girl_rails and RSpec. I have 3 associative models like this: /app/models/ticket.rb class Ticket < ActiveRecord::Base has_many :ticket_snapshots, foreign_key: 'duckduck_ticket_id' end /app/models/ticket_snapshot.rb class TicketSnapshot < ActiveRecord::Base belongs_...
Bijan Hoomand
1

votes
0

answer
66

Views

How to scroll and find an element using pagefactory approach

I am using pagefactory model and used below code to find an element, it works perfectly when the element is visible on screen, however, it fails when it is not visible, I already tried the action method but that doesn't work for me. public class ChooseVenuePage extends AbstractPage { @FindBy(xpath =...
Lav Maheshwari
1

votes
0

answer
60

Views

Scala object from Java factory function

I have a Java factory function factoryFunction(String). In Scala I want to initialise a (singleton) object with the return from this function. The best I can manage is object outer { val inner = factoryFunction('SOME_CONSTANT') } But if I do this I will end up referring to outer.inner every time I...
Mohan
1

votes
1

answer
98

Views

Angular js - How to call directive after creating the directive dynamically?

So what I'm doing is adding a directive as an attribute to an element via a Factory. And I have a separate directive file that manipulates the DOM based on some event triggered on that element, the element being the one with newly added directive as an attribute. Now the thing that's happening is t...
gj2110
1

votes
1

answer
512

Views

Devise & Factorybot authentication for RSpec POST request

Setup using devise_token_auth, Factorygirl, and RSpec. Trying to sign in a user, and make a post request, but I am getting 401 unauthorized response. /spec/controllers/scripts_controller_spec.rb module Api::V1 RSpec.describe ScriptsController, type: :controller do let(:user) { FactoryBot.create(:use...
AakLak
1

votes
1

answer
46

Views

Azure Data factory copy activity having time lag while triggering

I am having several Copy activities in Azure Data Factory Pipeline from Azure SQL Source to Azure Data Lake Store for different tables independent of each other. I have scheduled it for every 15 mins. I am seeing a time lag of around 1 minute while triggering such as 12:00 AM jobs are triggering at...
VinothKumar
1

votes
2

answer
200

Views

Django Tests Pass with SQLite, Fail with Other DB's

My Django tests all pass when I use the built-in SQLite as my database. However, when I switch to the built-in MySQL and PostgreSQL, they fail. (All local database servers.) The connections to the DB are live enough -- the database is created and migrations applied. But the tests aren't even hitt...
emft
1

votes
1

answer
116

Views

Symfony 3.3 - Services.yml Argument (ResponseFactory) - Parameter Being Passed In As String Instead of Object

The Error Hello, I am getting the following error: Type error: Argument 2 passed to ApiExceptionBundle\EventListener\ApiExceptionSubscriber::__construct() must implement interface ApiExceptionBundle\Component\Factory\ResponseFactoryInterface, string given, called in C:\htdocs\projects\myproject\var\...
khgm13
1

votes
1

answer
427

Views

Bundler::GemRequireError: There was an error while trying to load the gem 'factory_bot_rails'

I just installed the factory_bot_rails gem and it's giving me a problem right from the start: $ bundle exec rspec spec/models/scan_spec.rb bundler: failed to load command: rspec (/Users/me/.rbenv/versions/2.4.3/bin/rspec) Bundler::GemRequireError: There was an error while trying to load the gem 'fac...
Godzilla74
1

votes
0

answer
72

Views

Pickling and Unpickling a dynamically generated class

I have a function that returns a customized class type which I then want to pickle and unpickle. I am trying to follow this answer and the __reduce__ documentation. I am using Python 2.7. The difference from that answer is that my function accepts an arbitrary class and returns a class derived from...
buzjwa
1

votes
1

answer
40

Views

How can I get attributes from one factory inside of another?

Here is what I am using in my specs: let(:family) { create :family } let(:picnic) { build :picnic, cook: family.dad, assistant: family.son } It works, however, I would prefer to move this logic into picnic_factory.rb and just use let(:picnic) { build :picnic } in my specs. There is a scope in Picn...
Timmy Von Heiss
1

votes
1

answer
227

Views

Execute SSIS package using storted procedure in ADF v2

I would like to execute a SSIS package in ADFv2. I created a pipeline and used a stored procedure for it as described here https://docs.microsoft.com/en-us/azure/data-factory/how-to-invoke-ssis-package-stored-procedure-activity. DECLARE @return_value INT, @exe_id BIGINT, @err_msg NVARCHAR(150)...
Ling
1

votes
1

answer
28

Views

Loader factory from allowed list of classes

I'd want to be able to dispatch the instantiation of a class depending of a parameter. This has been asked here and the following answer provides a good solution, but the use of the globals()[name]() seems a bit ugly to me. Also, I understand how it works if the file is the main one, but not sure w...
1

votes
0

answer
775

Views

Azure Data Factory v2 and data processing in custom activity

I am migrating (extract-load) a large dataset to a LOB service, and would like to use Azure Data Factory v2 (ADF v2). This would be the cloud version of the same kind of orchestration typically implemented in SSIS. My source database and dataset, as well as the target platform are on Azure. That lea...
Henrik
1

votes
1

answer
42

Views

Refer files from storage account in PowerShell

I have this following code where i need to refer my ADF codes stored in azure blob storage foreach($file in Get-ChildItem 'https://adfcicdazurestorage82.blob.core.windows.net/adfcicdazurestorage82' -filter '*LinkedService*') { New-AzureRmDataFactoryLinkedService -ResourceGroupName 'ADFAutomationReso...
Arunachalam
1

votes
2

answer
754

Views

Copying Data from SAP BW to Azure Data Lake Store using Azure Data Factory

I've been trying to copy some data from an on-premises SAP BW to a cloud Azure Data Lake Store. I've already configured the sink as the Data Lake Store but i'm having trouble to configure the source. Already downloaded the netweaver library and put the dlls in my system 32 folder and created the int...
Fabrício Bruno
1

votes
4

answer
80

Views

Share Variable between controllers of different routes - AngularJS

I'm new on Angularjs and I'm trying to build my first application. Let's say I have to routes that loads two different views: 127.0.0.1:8080/site 127.0.0.1:8080/site_details Maybe having two different routes is not the right procedure but that it is another problem. I have two controllers: Controlle...
Thomas
1

votes
1

answer
979

Views

An error occurred while loading ./spec/controllers/users_controller_spec.rb

I am creating factories to replace my fixtures and to generate Test Data. I've installed FactoryBot but I am getting an error when running 'rspec'. This is the outcome log I get: An error occurred while loading ./spec/controllers/users_controller_spec.rb. Failure/Error: @user = FactoryBot.create(:us...
Elena
1

votes
0

answer
201

Views

Why are my Azure Data Factory Stored Procedures Timing Out after 30 Minutes?

Why are my Azure Data Factory Stored Procedures Timing Out after 30 Minutes? Here is the Azure SQL Linked Service definition: { 'properties': { 'type': 'AzureSqlDatabase', 'typeProperties': { 'connectionString': { 'type': 'SecureString', 'value': 'Server=tcp:db1.database.windows.net,1433;Database=my...
Simon Kingaby
1

votes
1

answer
589

Views

How do I pass a parameter with Expression as value in ADFv2?

In Azure Data Factory v2 (ADFv2) I am having trouble passing a parameter whose value is an expression that needs evaluated at runtime. For example, I have a set of extracts I want to download daily from the same LinkedService/Connection. I want a pipeline with a Foreach to be able to input a JSON...
jatal
1

votes
2

answer
71

Views

Inherit Params from parent factory with factory_boy

I'd like for a child factory to extend the Params of its parent. I think extending params is preferable to duplicating them. I've tried by making the Params in the subclass literally inherit from the parent Params, like so: import factory class BaseFactory(factory.Factory): class Params: configura...
Max Shenfield
1

votes
0

answer
55

Views

Ruby 2.5 and FactoryBot raise TypeError

I'm in the process of upgrading a Rails (5.1) app from using Ruby 2.3.3 to Ruby 2.5.0. I have the following FactoryBot (4.8.2) factory FactoryBot.define do factory :training do transient do assigned_instructor { create(:user) } end description 'training description' instructor { assigned_instructor...
Sig
1

votes
1

answer
71

Views

How to create a HDInsightOnDemand LinkedService with a script action in Data Factory?

We are creating a DataFactory for running a pySpark job, that uses a HDInsight on demand cluster. The problem is that we need to use additional python dependencies for running this job, such as numpy, that are not installed. We believe that the way of doing so is configuring a Script Action for the...
Raphael Ottoni

View additional questions