You need to click on the ellipsis button and close open items:
Here are the steps that I have documented for running PDFPlumber inside an AWS Lambda function. PDFPlumber is really good at extracting content (especially structured content) from a PDF. It can do this without the use of any GenAI models, but the downside is that it cant handle varying content very well. But if you have PDFs that have the same format and have well structured tables, then this tool can do a very good job at extracting that information.
mypublicnotes/AWS/Lambda/pdfplumber.md at master · rajrao/mypublicnotes
My kid goes to a school that uses Infinite Campus and I suddenly started getting an error where I was unable to log into the site.
I tried different browsers, clearing cookies and nothing seemed to help.
The error:
This site can’t be reached campus.dcsdk12.org took too long to respond.
Try: Checking the connection
ERR_CONNECTION_TIMED_OUT
In the Android app, I got a much less helpful error message about something going wrong with the connection. The odd thing was that the site and app was working for everyone else in my family.
Finally I was able to figure out that the issue was that I was on a VPN. Once I disabled the VPN, I was able to successfully use the site and app. Lucky for me, my VPN allows me to add apps to an exception list. Adding campus Infinity to the exception list in my VPN app fixed the connection issue for me.
We had a business requirement to show charts with regions. For the first use case we had to show body injury data and what we had was an SVG that had all the body injury locations.
We looked at a lot of solutions:
1. Storing the SVG data in a table/measure and displaying it.
This did not work, as the SVG data I could only get to display in a table visual and that would be very small for our use case. Additionally we wanted to be able to pick locations and display regions with color coding.
2. Using the ShapeMap.
I tried to convert the SVG vector to TopoJson, but nothing seemed to be able to convert the SVG to a good TopoJson. I even tried to trace the SVG into a vector file using QGIS and then convert it to a TopoJson file. But it always ended up looking like a "Picaso Painting"
Here are the details: Add Visio Visuals to Power BI reports - Microsoft Support
And here is what it can look like:
We will be investigating this option more, but I wanted to put this out there as a potential solution.
A dataflow that I had suddenly stopped work.
The error was
Encountered user gateway exception: '<ccon>ODBC: ERROR [HY000] Incorrect number of arguments: </ccon>
After a lot of troubleshooting, I figured out it was being caused by some steps I had added to add additional columns. Most likely, those steps were being query-folded to the database and it was not working.
I solved it by adding a call to Table.StopFolding right before I added the steps.
Table.StopFolding - Table Function | Power Query M
In a AWS lambda, we suddenly started seeing this error:
{
"errorType": "Sandbox.Timedout",
"errorMessage": "RequestId: xxxxxx-xxxx-xxx-xxxxxxxxxxx Error: Task timed out after 3.00 seconds"
}
The "Sandbox.Timeout" threw me and I could not figure out where it was coming from.
Turned out, the error was being thrown by the AWS Lambda Infrastructure, because it was configured to run for only 3 seconds. This is done via the Configuration tab and editing the "General Configuration" and increasing the timeout setting.
I was getting an error when trying to connect using the PostGreSQL connector in PowerBi.
The remote certificate is invalid according to the validation procedure
The basic solution is informed by this AWS post: Set up SSL/TLS client connections to Amazon RDS for SQL Server and Amazon RDS for Oracle | AWS Database Blog, but I found it didnt work exactly the way in that post (PEM file didnt work).
Luckily for us, AWS now provides a PKCS7 file. So, go to Using SSL/TLS to encrypt a connection to a DB instance or cluster - Amazon Relational Database Service and download the bundle appropriate for your AWS Region. (You can use the global bundle, but the problem with that is you will have to hit approve in the Import Wizard many times (approximately 3 for every zone)). So, using your region's cert bundle will lessen the number of clicks.
Once downloaded, you will have to open your Windows Certificate Manager (Windows >> Run >> CertMgr.msc).
In the CertMgr, click on "Trusted Root Certification Authorities" >> Certificates and then Import.
In the Import Wizard, you will have to find the P7B file you downloaded from AWS and import it. Approve the next few steps. You should now be able to connect to PostgreSql running AWS-RDS.
These steps should also work for connecting SQL Server to PostgreSql in AWS.
In Microsoft Forms you can create a "Form" or a "Quiz". But what is the difference between the two?
In a quiz, you can specify the correct answer and the points for the answer, if correct.
Select Blinds Ac 114 remote pairing/copy code to new remote
Works for AC114-06B and 02B remotes.
Paired remote: the one that currently is programmed and working
New remote: the one you wish to program
Steps:
1. Select the channel on the paired remote that you wish to copy to new remote
2. Select the channel on the new remote
3. Press stop button once on paired remote and then press and hold until the blinds jog up and down once
4. Quickly on the new remote press up button. Blinds should jog to let you know the code got copied.
Manual: https://drive.google.com/file/d/1mcOqt3M_EZQjjxoddzVfIvbzJvrlqGQ3/view?usp=drivesdk
If Hibernate is not available as an option, the following 2 commands run from PowerShell should enable it:
1. powercfg /hibernate on
2. powercfg /h /type full
The above commands need to be run from a Administrator Powershell window.
In Windows 11, you can then go to: Start >> Type: Control Panel >> Control Panel >> Power Options >> Choose what the power buttons do.
If you would like to customize the Airflow UI title to include some additional information, you can do so in MWAA by setting webserver.instance_name
This post is based on my github page: mypublicnotes/AWS/Athena/iceberg_tracking_changes.md at master · rajrao/mypublicnotes (github.com)
Change data capture using Athena and iceberg
Many times in a datalake, you have a source, where the source doesnt provide information about which records changed. Another use case is where you have an ETL, where you have multiple tables and columns taking part in it and its traditionally difficult to track which records changed in that ETL query. This page shows you one method for being able to track those changes and insert only those records that are new or had updates. (at the end, I also show how to track deletes). The method leverages AWS Iceberg tables in Athena (Athena Engine 3) and the upsert mechanism provided via the merge-into statement.
TL;DR; Check out the merge statement used to update only those records that had changes.
Setup: A CTE for source data
I am using a CTE to simulate source data, in practice, you would typically use another Athena table as your source, or a query that brings data together from multiple tables (aka ETL), etc. A key part to this method is using a hashing function that can be used to determine when a record has changes. I use xxhas64
with cte(id, value1, value2) as
(
select 1,'a1','b' union all
select 4,'raj','rao' union all
select 2,'c2','d2'
)
select *, xxhash64(from_base64(value1 || value2)) as hash from cteNote 1: You can use murmur3 instead of xxhash64 using the following code: murmur3(to_utf8(value1 || value2)).
Note 2: Here are the other hashing functions available: https://trino.io/docs/current/functions/binary.html
Setup: Create an iceberg table
The iceberg table is your final table. This will track the data that had changes. Id is the primary key in this case, you can have more columns that are part of the primary key used for the update.
CREATE TABLE
test_db.hash_test (
id int,
value1 string,
value2 string,
hash string,
last_updated_on timestamp)
LOCATION 's3://my_test_bucket/hash_test'
TBLPROPERTIES ( 'table_type' ='ICEBERG')The ##Merge## statement
Here is a merge statement that inserts new records and updates only when there are changes. The merge statement uses the CTE described above as its source data. You can manipulate the CTE to test various scenarios. The hash column is used to determine when to insert/update data.
MERGE INTO hash_test as tgt
USING (
with cte(id, value1, value2, value3) as
(
select 1,'a1','b',100 union all
select 4,'rao','raj',200 union all
select 2,'c2','d2',300
)
select *, xxhash64(to_utf8(concat_ws('::',coalesce(value1,'-'),coalesce(value2,'-'),coalesce(cast(value3 as varchar))))) as hash from cte
) as src
ON tgt.id = src.id
WHEN MATCHED and src.hash <> tgt.hash
THEN UPDATE SET
value1 = src.value1,
value2 = src.value2,
hash = src.hash,
last_updated_on = current_timestamp
WHEN NOT MATCHED
THEN INSERT (id, value1, value2, hash, last_updated_on)
VALUES (src.id, src.value1, src.value2, src.hash, current_timestamp) If you need to deal with deletes, you can add as your first matched phrase one of the following options (delete, or archive):
WHEN MATCHED and src.IsDeleted = 1
THEN DELETEor
WHEN MATCHED and src.IsDeleted = 1
THEN UPDATE SET
is_archived = 1,
last_updated_on = current_timestampFinally some examples of queries to view the data
-- see the history of changes
select * from test_db."hash_test$history" order by made_current_at desc
-- use a snasphot_id from above as your value for xxxxx
select * from test_db.hash_test for version as of xxxxx
-- get only the latest records from the table
select * from test_db.hash_test
where last_updated_on in (select max(last_updated_on) from test_db.hash_test)
order by last_updated_onReference:
Testing Hashing Behavior
When hashing you need to make sure that null values are handled appropriately.
Ex: null, a, null and a, null, null should be treated as changes. If they generate the same hash, then you will miss this change. Also the hash functions need string input and hence, one needs to cast the data when its not of type string. For this reason, the computation of the hash gets complicated and I have not found a simpler solution around this.
with cte(id,note, value1, value2,value3) as
(
select 1,null,'a1','b',1 union all
select 4,null,'raj','rao',2 union all
select 5,'both null',null,null,null union all
select 6,'empty & null','',null,null union all
select 7,'null & empty',null,'',1 union all
select 8,'empty-empty','','',2 union all
select 9,'str-null','a',null,3 union all
select 10,'null-str',null,'a',4 union all
select 100,null,'c2','d2',5
)
select *
,concat_ws('::',coalesce(value1,'-'),coalesce(value2,'-'),coalesce(cast(value3 as varchar)))
, murmur3(to_utf8(concat_ws('::',coalesce(value1,'-'),coalesce(value2,'-'),coalesce(cast(value3 as varchar))))) as hash1
, xxhash64(to_utf8(concat_ws('::',coalesce(value1,'-'),coalesce(value2,'-'),coalesce(cast(value3 as varchar))))) as hash2
from cte
order by idWhen you have errors in your excel file, they sometimes leak through and adding "Table.ReplaceErrorValues" or "Table.RemoveRowsWithErrors" doesnt really work. What I have found is to add the error fix step right after the navigation step that loads the sheet.
In the screenshot below, I have used "Table.RemoveRowsWithErrors" after the Navigation step and it fixed the error.
We needed a new passport for our daughter as her passport expires in 5 months and 3 weeks from date of travel (country requires 6 months).
Panicking, we emailed our senators and representatives. Got a call from one of them and they advised to call passport phone number and tell them country we were travelling to needs a visa (urgent passport appointment is provided 28 days out for countries needing passport).
Time line
May 5: figured out we needed new passport. Called passport agency, was told to call back 2 weeks prior to travel.
May 6: emailed senators and representatives
May 8: got call back from one of the representatives' staff advising about calling back and telling them that we needed a visa
May 9: called passport agency and got an interview date for May 23 at Colorado office in Aurora. Lucky for us this is a 30 minute drive for us.
May 23: appointment was for 8am. Should have lined up 30 minutes early. Line was long, but efficiently managed. Had flight tickets, birth certificate (as passport was for kid and this is considered a new application and not renewal), paper work about needing visa. The entire appointment lasted less than 60 minutes. Was told to return after 2pm on 25th to pick up passport.
May 25: got passport (took 15 minutes)
Reflections:
1. Everyone we spoke to from the phone staff to the people in the Colorado passport office were extremely helpful, efficient and great to work with.
2. Didn't really need help from senator/representatives, but the help they provided telling us the provision for visa, was the breakthrough we needed.
3. Next time we will apply for passport 12 months prior to expiration, as many countries need 6 months validity on passport for travel.
4. Kids need a ds-11 and you are reapplying for a new passport (I believe until age of 16). Their passports are valid for only 5 years.
During a AWS CF deployment I got the following error:
Properties validation failed for resource LAMBDAXXXX with message: #/Code: expected type: JSONObject, found: String
After struggling for over 4 hours, it turned out that the issue was that the path was not correct in the CF Template!!!
How I hate CloudFormation!!!
Hope this saves someone else time!
Currently, there is no way to insert an image into a PowerBi report via PowerBi.com (power bi service).
One, workaround though, is to insert a "Blank" button and then set the "Fill" options Background