foundry | model factory library | Web Framework library
kandi X-RAY | foundry Summary
kandi X-RAY | foundry Summary
Foundry makes creating fixtures data fun again, via an expressive, auto-completable, on-demand fixtures system with Symfony and Doctrine:. The factories can be used inside DoctrineFixturesBundle to load fixtures or inside your tests, where it has even more features. Want to watch a screencast about it? Check out
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Returns the configuration tree builder .
- Generate entity class .
- Normalize attribute value .
- Creates a new factory .
- Get the attribute name for a given parameter .
- Load configuration .
- Returns the object .
- Adds a new object .
- Get a range of random objects .
- Load a story .
foundry Key Features
foundry Examples and Code Snippets
Community Discussions
Trending Discussions on foundry
QUESTION
If I'm using Python Transforms in Palantir Foundry and I'm trying to run an algorithm which uses in-memory/non-spark libraries, and I want it automatically scale and work in Spark (not pandas). If I'm having a hard time writing the code and want to test and develop it locally, yet use the same code in pyspark later, how do I do this?
For a concrete example, I want to calculate the area of a geojson column which contains a polygon. Since I would need to use some libraries which arn't native to Spark (shapely
and pyproj
). I know that the best way (performance wise) is to use a pandas_udf (otherwise known as streaming udfs or vectorized udfs). But after reading a couple of guides, specifically Introducing Pandas UDF for PySpark, pandas user-defined functions
and Modeling at Scale with Pandas UDFs w/code examples, it's still challenging to debug and get working, and it seems like I can't use break statements and there isn't a first class way to log/print.
The actual dataframe would have millions of rows (relating to millions of polygons), but for simplicity I wanted to test locally with a simple dataframe, and it scale to larger dataset later:
...ANSWER
Answered 2022-Mar-22 at 19:01The way you can think about pandas_udfs is that you are writing your logic to be applied to a pandas series. This means that you would be applying an operation and it would automatically apply to every row.
If you want to develop this locally, you can actually take a much smaller sample of your data (like you did), and have it stored in a pandas series, and get it working there:
QUESTION
The final result is sorted on column 'timestamp'. I have two scripts which only differ in one value provided to the column 'record_status' ('old' vs. 'older'). As data is sorted on column 'timestamp', the resulting order should be identic. However, the order is different. It looks like, in the first case, the sort is performed before the union, while it's placed after it.
Using orderBy
instead of sort
doesn't make any difference.
Why is it happening and how to prevent it? (I use Spark 3.0.2)
Script1 (full) - result after 4 runs (builds):
...ANSWER
Answered 2022-Mar-16 at 09:15As it turns out, this behavior is not caused by @incremental
. It can be observed in a regular transformation too:
QUESTION
In my Workshop application, I would like to have a bar chart with a changeable x-axis. A dropdown widget would be used to select the desired x-axis.
For this I am writing a TypeScript function, that will return the data that will feed the chart widget.
I have wrote the following function:
...ANSWER
Answered 2022-Mar-03 at 10:44Some of the more powerful parts of Typescript's type-system allow us to specify a type-safe version of this aggregation function. I detail one approach to this in Part 1 below.
When exposing this type-safe aggregation function, we need to perform some additional checks because Functions doesn't currently support union types (see 'Functions API: Input and output types' in your Palantir documentation). I list my code for this in Part 2 below.
Part 1: A type-safe aggregationFirst, we list all the property API names that we'd like to group-by as a new union type of literal types. These should be the API names you'd normally use to access these properties in a Function.
QUESTION
There are times when an incremental pipeline in Palantir Foundry has to be built as a snapshot. If the data size is large, the resources to run the build are increased to reduce run time and then the configuration is removed after first snapshot run. Is there a way to set conditional configuration? Like if pipeline is running on Incremental Mode, use default configuration of resource allocation and if not the specified set of resources.
Example: If pipeline runs as snapshot transaction, below configuration has to be applied
...ANSWER
Answered 2022-Mar-02 at 17:09The @configure
and @incremental
are set during the CI execution, while the actual code inside the function annotated by @transform_df
or `@transform happens at build time.
This means that you can't programatically switch between them after the CI has passed. What you can do however is have a constant or configuration within your repo, and switch at code level whenever you want to switch these. Please make sure you understand how semantic versioning works before attempting this I.e.:
QUESTION
We keep getting the following error on a Foundry Code Repo transform. It works in preview mode, but fails in build mode.
...ANSWER
Answered 2022-Feb-28 at 19:59The sub-folder of this x-form file was missing in the pipeline.py
. I added the missing x-form sub-folder and it worked.
And just so other devs don't have to update this file every time they add a new sub-folder, I moved all the sub folders to /transforms
and changed pipeline.py
to what I have below & it works too!
QUESTION
I would like to integrate Foundry with the central API gateway of our organisation.
Access of the gateway should be granted via OAuth2 via the "Third Party Applications" functionality of Foundry.
Now I am facing the problem, that our API Gateway only supports the Client Credential Flow in which no Authorization Token is used but only the Access Token. Is there a possibility to make Foundry follow the simplified flow w/o Auth token?
...ANSWER
Answered 2022-Feb-24 at 16:40Foundry supports the OAuth2 Authorization Code grant which provides delegated access to Foundry resources and services.
Support for the OAuth2 Client Credentials grant, which allows service user access, is under limited release with a few customers. If it’s not available for you please reach out through your internal support channels. A general release is expected early this spring, I'll try and update here if that timeframe slips.
QUESTION
I want to test the "Third-party applications" access using Postman.
When trying to obtain an OAuth token I am receiving a '404 Not Found' from Foundry. I suspect that I've configured the wrong URLs for the OAuth2 endpoints.
From reading the documentation
https:///workspace/documentation/product/foundry-backend/security-api#oauth2-api-endpoints
I put together the following 2 endpoints:
- Auth URL:
https:///api/oauth2/authorize
- Access Token URL:
https:///api/oauth2/token
Are those correct or am I missing something?
...ANSWER
Answered 2022-Feb-21 at 23:21You're on the right track with the service context path - in this case it's multipass
- which is Foundry's authentication service.
Try this:
QUESTION
One of my builds is currently OOMing. In order to better identify next steps for optimisation, I need to identify whether the executor or the driver is OOMing.
What is the best way to determine whether the executor or the driver is OOMing within Foundry?
...ANSWER
Answered 2022-Feb-22 at 18:36Whether the executor / driver is OOMing can often be determined through inspecting the build.
When it is likely that the executor is OOMing, the build should show the following error:
When it is likely that the driver is OOMing, the build should show the following error:
Outside of this, a couple of rules that can generally be applied are as follows:
- If the shuffle output location is missing, it is likely that the executor is OOMing.
- If the executor is lost, it is likely that the executor is OOMing.
- If the module is unreachable, it is likely that the driver is OOMing
QUESTION
I've looked into my job and have identified that I do indeed have a skewed task. How do I determine what the actual value is inside this task that is causing the skew?
My Python Transforms code looks like this:
...ANSWER
Answered 2022-Feb-20 at 19:48Skew problems originate from anything that causes an exchange in your job. Things that cause exchanges include but are not limited to: join
s, window
s, groupBy
s.
These operations result in data movement across your Executors based upon the found values inside the DataFrames used. This means that when a used DataFrame has many repeated values on the column dictating the exchange, those rows all end up in the same task, thus increasing its size.
ExampleLet's consider the following example distribution of data for your join:
QUESTION
The instructions for setting up an Angular application project are straightforward. I have had no issue with setting up and running Stryker on an application project using default settings for Karma. I am having trouble getting it to work correctly when it is a Library project instead, however.
I have looked through the configuration documentation for Stryker and I have tried adjusting the paths to the relevant files (for mutation and the karma.config)
stryker.conf.json
...ANSWER
Answered 2022-Feb-18 at 18:19With help from nicojs, I was able to get basic Stryker functionality working on my library project.
As it turns out I was missing some critical configuration.
I was able to set the testRunner as karma. I added karma.ngConfig.testArguments.project and disableTypeChecks values in stryker.conf.json
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install foundry
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page