Notepad - initialize object properties in Table row generator - palantir-foundry

In the new Notepad app, what is the process for initializing an object's properties in the Table row generator's columns?
I'm trying to create a Notepad document template that dynamically creates tables from specified objects via the Table row generator. I've been able to create a document template, select the Table row generator, and select a variable (object) to pass into the table, but I can't figure out how to initialize the object's property values into the table's columns, i.e. replacing "Column Header" with the object's titles:
I have tried naming the template input parameters to $GENERATOR_OBJECT but receive an error.
What is the correct procedure here? I've reviewed the Notepad documentation but have not been successful in identifying the right steps.
Foundry Notepad Docs

The docs have not fully caught up with the latest changes on Notepad yet. Sorry about that.
To connect an embedded section's input parameter with its surrounding Section or Table Row Generator, you need to set the parameter to $GENERATOR_OBJECT. This parameter will be automatically selectable for widgets inside generators that accept object template inputs.
Your table has two rows: a normal one (pre-filled with Column Header) and a generator row below (recognizable by the blue dashed line). The $GENERATOR_OBJECT parameter will only be automatically available in the generator row.
The figure below shows an example for an Object Property inside a table row generator.

Related

Is it possible to pass row id to error output in SSIS?

I have a flat file where rows have ids in form of guid. What I need is to redirect error output to table which will have error row id, error column and error code. The problem is that I can map only "Flat File Source Error Output Column" which is some sort of other columns concatenation. Is there a way I can get the ID column value of the error row? The best solution I could find is to add counter which will give the row number, but that's not exactly what I need, as ids are strings in my case.
Nope. You get 3* columns from the Flat File Source Component's: Flat File Source Error Output Column, ErrorCode, ErrorColumn.
A Source component defines the columns that all row buffers "downstream" of that point will contain. It is responsible for adding rows and then filling the columns in that new row buffer.
The Flat File Source component has a contract that describes how it should consume the source data - this many columns, this delimiter (or this many characters) etc.
What happens though when something overflows a length, or the data type is incompatible or not all of the delimiters are present? The design decision is to either put incomplete rows into the pipeline (but then how do you determine which columns get populated - fill left to right? what about type mismatch?) or treat it as an error. Normally, this blows up the data flow but if you add an Error output path, then you can see what row failed.
And the row is the atomic unit the flat file is using as input.
Read line -> Parse -> Write to Output [or Error] buffer {loop}
You could then use a Script Task to try and parse out the GUID from "Flat File Source Error Output Column" but then you have to hope that the value is in the row. It could be that a column has an embedded delimiter that wasn't escaped, someone transferred the file using the wrong encoding/line endings, etc.
*The Flat File Source Component does expose a property in the advanced editor, Component Properties tab for FileNameColumnName and that too will show up in the Error output path but that is the only source component I am aware of with this behaviour.

How can I reference a JSON source for a derived column action in Azure Data Factory

I'm new to Azure Data Factory. I've been able to generate a set of JSON files from a REST API source using a Pipeline. Each file consists of one top level JSON object with an array of up to 100 child objects. The output is saved to an Azure Blob Storage container.
I now want to use a Mapping Data Flow to modify the JSON before I write it to Azure SQL, however I'm struggling with the syntax. I've configured the source to point to the directory containing the JSON files. The Source Projection tab displays the correct schema. I can preview the data and I see a row for each file and I can expand the child objects to see the full structure.
However, when I add a Derived Column action, the Input Schema is blank in the Expression Builder. I can refer to the top level elements in the source using the byName and byPosition functions, but I don't know how I can reference the child elements.
The examples that I have been able to find online use a SQL table or CSV file as a source. I can't find any examples that use hierarchical data as the source for a derived column.
Am I missing something? Is this scenario supported?
I found a way to achieve what I want. This may not be the best approach, but it works.
It seems that it is difficult to deal with JSON that has multiple hierarchies as a source for copy data activities. You can choose one level of repeating data to map to a table structure (the Collection Reference property on the Mapping tab).
In my scenario, there was additional repeating data within the data I was mapping to my table. I updated the mapping to write the child JSON data to a text field in my SQL table. To do this, I needed to use the Azure Data Factory JSON editor for my pipeline. You can access this from the "Code" link in the top right corner of the pipeline visual editor.
I added the following line after the closing bracket for the "mappings" array for my copy activity:
"mapComplexValuesToString": true
The full path to the mapping array in the activity definition is typeProperties - translator - mappings. Make sure your commas are correct after you add the new element.
With this approach, I had a row in my SQL table for each array item in my Collection Reference. The scalar child elements in the array items are mapped to table columns and the child JSON element is written to a data column in the same table.
To extract the values I need within the child JSON, I created a SQL view that uses the CROSS APPLY OPENJSON syntax. This allows me to treat the JSON in the data field similar to a related table. You can specify the structure that your JSON is in. If you have nested data in your JSON, you can apply the same approach for each level.
The OPENJSON command is only supported by more recent versions of SQL Server. I'm using Azure SQL, so that works for me.

SSIS package - How to rename pivoted columns

I'm new to SSIS and just created a simple package taking input from a source file then pivot it and insert into the database. It works well for me.
I am aware that I can provide an alias name for each column under Pivot > Advance Editor > Input and Output Properties > Pivot Default Output > Output Columns > Set the "Name" property to whatever I want. I want to ask if there is away to rename the pivoted column programmatically? I have about 100 columns and thought it is more effective to do this in code but not sure how. I tried to add a script component but not able to get to the "Name" property... My end goal is to remove the "C_" from the auto generated pivot column names. This way when I'm inserting the record to the db, it can auto map for me.
Your goal "rename columns dynamically in package itself" contradicts to basic SSIS approach, which is "fix metadata, including column type and name, at design phase, and reuse at runtime". So, no script component can rename your columns.
You can use BIML or EzAPI/Microsoft SSIS DLLs to generate package based on your metadata; but once you design it, the package metadata including column names is fixed.

create a table in an outlook message using access vba

I am using Access to create outlook messages. I need to create a table that i will populate with text strings. What I need to start with is how to create a simple table with one column two rows that is not folder or html based? The first row will say "I am a Heading" and the second row will say "I am a row". Thanks
The Outlook object model provides three main ways for working with item bodies:
Body.
HTMLBody.
The Word editor. The WordEditor property of the Inspector class returns an instance of the Word Document which represents the message body. So, you can use the Word object model do whatever you need with the message body (create a table using the Word object model).
See Chapter 17: Working with Item Bodies for more information.

How to reference a chart object on an MS Access subform?

I have created a dozen different charts using the chart form wizard in Access (so each chart is really a separate form). I have also set up a GUI that has the following nested form structure:
frmMain -> frmSubMain -> Child0 (a subform of frmSubMain)
I have a list box on frmSubMain that lists all the charts, and when a user selects one, I use VBA to change the Source Object of Child0 to the appropriate form for the selected chart. (So in essence, a user can select the desired chart and it is presented.)
I am now trying to add a button to frmSubMain that will copy the currently selected chart to PowerPoint, but I am having trouble with the copy command and referencing the chart object. The chart object on each of the forms is called OLEUnbound0, and here is what I've tried (I have the form name for the chart as a variable 'my_form'):
Forms(my_form).OLEUnbound0.acOLECopy
Me.Child0.OLEUnbound0.acOLECopy
Me.Controls(my_form).OLEUnbound0.acOLECopy
Each gives a different error (for example, the second one gives the error "Method or data member not found"). Part of my confusion is that I have the form name but as a variable, and I'm not sure how to use that variable (since I can't use the standard Forms![frmMain]![frmSubMain]! etc.). What is the syntax for using a variable to reference a subform?
Try:
Me.Child0.Form.OLEUnbound0.Action = acOLECopy