Including column headers in CSV export from RDS postgres db using AWS Data Pipeline?

Uncategorized
Question: I set up a data pipeline that dumps data from our RDS postgres db to a S3 location but the column headers are not included. I would like to avoid using the solution outlined here because it seems brittle (if the columns change, also want to avoid casting columns as string). Thanks in advance Answer: I'm not sure how do you set the pipeline (you did not describe it), but the standard way of including column headers - with bare PostgreSQL - is COPY (SELECT some,fields FROM any.table ORDER BY something) TO STDOUT WITH (FORMAT csv, HEADER on); It might be tricky to receive such stream, not all DI tools support it - but the engine will generate it in proper CSV format. Read more
Read More

How to run a powershell script with white spaces in path from command line?

powershell
Question: So I've tried a bunch of different ways to run a powershell script from the command line and every single one returns an error. Here is this path: C:UserstestDocumentstestline spacePS Scripttest.ps1 I've tried these:powershell -File '"C:UserstestDocumentstestline spacePS Scripttest.ps1"' powershell "& ""C:UserstestDocumentstestline spacePS Scripttest.ps1""" Powershell "& 'C:UserstestDocumentstestline spacePS Scripttest.ps1'" Powershell -File 'C:UserstestDocumentstestline spacePS Scripttest.ps1'" I get all these errors: & : The term 'C:UserstestDocumentstestline spacePS Script' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. Processing -File ''C:UserstestDocumentstestline spacePS Script'' failed: The given path's format is not support ed. Specify a valid path for the -File parameter. Any help would be greatly appreciated!…
Read More

Restart List Numbering for Word Doc from Excel VBA

excel
Question: I have a spreadsheet which has a matrix, with text in the first column that gets implemented into a built Word document if there is an "X" in the cell in the same row as that line of text. From this, I make lists with headings, but am having trouble restarting the list after every heading. Below is my code that attempts to restart the list. It returns no errors until the last line item before the End If (List Galleries). Can anyone help? If Range("A" & X - 1).Value = "Heading" Then With ListGalleries(wdNumberGallery).ListTemplates(1).ListLevels(1) .NumberFormat = "(%1)" .TrailingCharacter = wdTrailingTab .NumberStyle = wdListNumberStyleLowercaseLetter .NumberPosition = CentimetersToPoints(2) .Alignment = wdListLevelAlignLeft .TextPosition = CentimetersToPoints(2.63) .TabPosition = wdUndefined .ResetOnHigher = 0 .StartAt = 1 With .Font .Bold = wdUndefined .Italic =…
Read More

force WebView to load remote webpage with the certain encoding

Uncategorized
Question: The remote website provide non-English page with "euc-kr" encoded file(webpage). I want to load the webpage properly, but the Strings(characters) are not shown properly. The problem is that the HTML of the website does not have an encoding tag such as "" or "" and, of course, I cannot modify the HTML of the website because I am not the owner. How can I force the WebView controller to load the web page with the proper encoding? Answer: Read more
Read More

echo from a function that returns a string to the calling function causes newlines to appear before the string

Uncategorized
Question: I am trying to return an S3 link from a bash function using echo. function1(){ sample_code_line1 sample_code_line2 S3_LINK="http://xxxx-xxxxxx.s3.amazonaws.com/KRD-4386801114873926480_15224268_komaccas-monopoly-app-au-ios-production-bnfvp.Event201704301400-201705071400-TZ_Australia-NSW.csv?AWSAccessKeyId=AKIAJ4JWD2OCXDYVOG4A&Expires=1503638429&Signature=oEsbOnqkEDMuyCsN%2Bwu%2FJS7%2F27U%3D" echo "$S3_LINK" } S3_REPORT_LINK="$(function1 "${arg1}" "${arg2}")" curl -o report.csv "${S3_REPORT_LINK}" The curl command produces an error because the returned string containing the S3 link has preceding newlines to it. Although, I have no issues removing the newlines; I am curious to know why this behavior occurs in the first place. When I run the script in debug mode, I can clearly see that the variable S3_LINK carries the string without any newlines but when passed does. Answer: Read more
Read More

How can I move all of my WhatsApp history from an iPhone to an Android device? Our company is transitioning, but we dont want to lose any of the data

Uncategorized
Question: My company is transitioning from iPhone to Android devices. We use WhatsApp for communicating internally and with clients. What is the best way to export all of the WhatsApp history from an iPhone and bring it into the new Android device? I'm happy to touch each one individually, but have not found a way to keep all of the history as I make the transition. On the iPhone I'm able to do a backup of the chat history to iCloud. When I open the new Android device, I'm only able to restore from G-Suite. Any suggestions? Answer: Read more
Read More

How to concat Multiple view in Vega using either vertical or horizontal operator?

Uncategorized
Question: i want to concat Multiple view in Vega using either vertical or horizontal operator? i'm trying to put one specification inside "vconcat" array but visiualization is doesn't showing.what i to do for multiple view. i gone through the following link https://vega.github.io/vega-lite/docs/concat.html Any one help to give sample example? Thanks Answer: Read more
Read More