Saturday, 29 May 2021

Importing data from postgresql with Dask

So I have a large (7GB) dataset stored in postgres that I'm trying to import into Dask. I'm trying the read_sql_table function, but keep getting ArgumentErrors.

My info in postgres is the following:

  • database is "my_database"
  • schema is "public"
  • data table is "table"
  • username is "fred"
  • password is "my_pass"
  • index in postgres is 'idx'

I am trying to get this piece of code to work:

df = dd.read_sql_table('public.table', 'jdbc:postgresql://localhost/my_database?user=fred&password=my_pass', index_col='idx') 

Am I formatting something incorrectly?



from Importing data from postgresql with Dask

Why Android App Link works in one domain but fails in other domain even tough both resolves same?

I am trying App Linking from URL in Android , that is opening app directly when clicking a respective link without showing suggestions from intent chooser (app not yet live in play store )

I am using this URL : https://admin.glowify.app/.well-known/assetlinks.json

If I open the link in browser , it resolves correct JSON

But, in the app , it's Direct app Link is not working , only I am getting app name in the intent isuggestions

But , When using this firebase hosting URL (and changed also in manifest )

https://deeplinktest-986b4.web.app/.well-known/assetlinks.json

The app link works perfectly

Why ? Both hosts resolving same but one works other not ?

Ref my old question for more details which is the beginning of the issue :

Direct App Deep Link not working evethough all configs are correct in Android



from Why Android App Link works in one domain but fails in other domain even tough both resolves same?

Should we compare new state with old state in the reducer

I am using spread operator in the reducer function, so what is happening when i am dispatching the action then it is creating new state (obj) even old state is same as like new state so it is re-rendering react component.

Is it good approach to compare new state with old state as object could be complex ? Deep comparison ?

const initialState = {};

export const reducer = (state = initialState, action: any = {}): any => {
  if (action.type === ActionTypes.RC) {
    return {
      ...state,
      ...action.config,
    };
  }
  return state;
};

Or redux does it out of the box for you in mapStateToProps ?



from Should we compare new state with old state in the reducer